Closed
Bug 1804082
Opened 1 year ago
Closed 1 year ago
Cron jobs require sql_mode=only_full_group_by
Categories
(bugzilla.mozilla.org :: General, defect)
bugzilla.mozilla.org
General
Tracking
()
RESOLVED
FIXED
People
(Reporter: jbuck, Unassigned)
Details
Attachments
(1 file)
After migrating to GCP the weekly cron jobs were failing to run with the following error message:
DBD::mysql::db selectall_arrayref failed: Expression #4 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'bugs.bugs_activity.removed' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by [for Statement "
SELECT
bug_id,
bug_when,
field.name AS field_name,
CONCAT(removed) AS removed,
CONCAT(added) AS added
FROM
bugs_activity
JOIN fielddefs AS field ON fieldid = field.id
JOIN bugs AS bug USING (bug_id)
WHERE
bug_id IN (205735, 253942, 575294, 624198, 635852, 677032, 706442, 711695, 715149, 718290, 719750, 720619, 723465, 725499, 725770, 726264, 729812, 743000, 743376, 743876, 744480, 744772, 745548, 746103, 746376, 746896, 747054, 747688, 747926, 748119, 748613, 748764, 749039, 749385, 749994, 750066, 750109, 750231, 750327, 750575, 751454, 751995, 752340, 754150, 754242, 754725, 754989, 755750, 755916, 756236, 756241, 756600, 756851, 756863, 757128, 757149, 757304, 757431, 758200, 758344, 758408, 758471, 759249, 759283, 759325, 759719, 759788, 759802, 760996, 761422, 761507, 761863, 761864, 762005, 762059, 762197, 762280, 762324, 762907, 762920, 762936, 762984, 763112, 763129, 763440, 764176, 764289, 764296, 765139, 765179, 765266, 765335, 765409, 765479, 765621, 765711, 765936, 766075, 766430, 767273, 767765, 767817, 768101, 768243, 768313, 768732, 769108, 769192, 769232, 769303, 769433, 769464, 770235, 770306, 770431, 770954, 771318, 771398, 771873, 771961, 771976, 771994, 772282, 772346, 773207, 774548, 774597, 774859, 774953, 775206, 775228, 775794, 775852, 776213, 776484, 777028, 777578, 777776, 777806, 777992, 778428, 779025, 779812, 779849, 780274, 780451, 780534, 780549, 780712, 780717, 780936, 780959, 780963, 781855, 781859, 782141, 782336, 782337, 783260, 783867, 783924, 783957, 784011, 784600, 785358, 785574, 785576, 785720, 785734, 78 ... , 1745305, 1745391, 1745595, 1745628, 1745666, 1745667, 1745842, 1745874, 1745972, 1746011, 1746448, 1746537, 1746543, 1746545, 1746720, 1746733, 1746921, 1747562, 1748210, 1748279, 1748401, 1748602, 1749278, 1749292, 1750565, 1750688, 1750817, 1750978, 1751699, 1751943, 1752979, 1753339, 1753508, 1753535, 1754701, 1754724, 1755081, 1755388, 1755555, 1755621, 1755806, 1756271, 1756388, 1756473, 1756567, 1756639, 1756643, 1756793, 1757430, 1757433, 1757476, 1757573, 1757715, 1757805, 1758247, 1758549, 1758776, 1759026, 1759731, 1760160, 1760611, 1760674, 1760765, 1760846, 1760905, 1761477, 1761981, 1762068, 1762078, 1762367, 1762368, 1762614, 1762620, 1763634, 1764112, 1764878, 1765028, 1765049, 1765343, 1765751, 1765951, 1766225, 1766283, 1766806, 1767177, 1767360, 1767365, 1767590, 1767920, 1768251, 1768337, 1768537, 1768559, 1768734, 1769155, 1769410, 1769739, 1769869, 1770219, 1770337, 1770397, 1770630, 1770832, 1770930, 1771334, 1771685, 1771780, 1771934, 1772091, 1772465, 1772909, 1773396, 1773403, 1776655, 1776658, 1776878, 1777374, 1777429, 1777574, 1777883, 1778619, 1779014, 1779342, 1779570, 1779628, 1779762, 1779766, 1779775, 1779833, 1779886, 1780011, 1780019, 1780613, 1782211, 1782219, 1783561, 1784835, 1785109, 1786073, 1787084, 1787281, 1787633, 1789075, 1789128, 1789440, 1789449, 1789569, 1789605, 1789629, 1789658, 1789808, 1790815, 1791152, 1791251, 1791296, 1791314, 1791520, 1791975, 1792984, 1793127, 1793314, 1793407, 1793485, 1793829, 1794061, 1794249, 1794292, 1794356, 1794373, 1794528, 1794622, 1794992, 1796460, 1796637, 1796706, 1796886, 1796901, 1797370, 1797372, 1797682, 1797685, 1797707, 1798494, 1798591, 1798798, 1799036, 1799156, 1799201, 1799441, 1799479, 1799568, 1799729, 1800172, 1800203, 1800278, 1800425, 1800446, 1801102, 1801315, 1801778, 1801833, 1802040, 1802294, 1803396)
AND field.name IN ('keywords' , 'bug_status')
AND bug_when >= '2021-12-04 12:03:35'
GROUP BY bug_id , bug_when , field.name
"] at Bugzilla/DB.pm line 71.
:dlactin fixed this by changing sql_mode but I think it'd be good to modify the SQL statement to include all columns in the GROUP BY clause
Comment 1•1 year ago
|
||
Comment 2•1 year ago
|
||
Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•