Ubuntu 16.04 and MySQL 5.7 - can't access events
Posted: Sun Apr 10, 2016 12:07 pm
Ubuntu 16.04 recently changed the MySQL metapackages to point to 5.7. It seemed fine but I've noticed that accessing events is broken due the changes in GROUP BY behavior to apparently make it more complaint with SQL99.
These are the errors when attempting to access an event:
In the meantime I've downgraded to mysql 5.6.
These are the errors when attempting to access an event:
zms ERR Can't run query: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'zm.M.Id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
I looked over the preliminary 16.04 information on the Wiki and didn't see mention of this. I'm running 1.29.0+dfsg-1ubuntu1.web_php FAT SQL-ERR 'SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'zm.Events.MonitorId' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by', statement was 'select Events.Id as Id, MonitorId, Name, Cause, StartTime, date_format( StartTime, '%y/%m/%d %H:%i:%S' ) as StartTimeShort, EndTime, Width, Height, Length, Frames, AlarmFrames, TotScore, AvgScore, MaxScore, Archived, Videoed, Uploaded, Emailed, Messaged, Executed, Notes, min(Frames.FrameId) as MinFrameId, max(Frames.FrameId) as MaxFrameId, min(Frames.Delta) as MinFrameDelta, max(Frames.Delta) as MaxFrameDelta from Events left join Frames on Events.Id = Frames.EventId where Events.Id = ? group by Frames.EventId limit 1'
In the meantime I've downgraded to mysql 5.6.