Stored procedure raising “incompatible with sql_mode=only_full_group_by” despite sql_mode being blank

狂风中的少年 提交于 2019-11-29 08:13:59

According to the documentation, MySQL uses the sql mode that was active when you created the procedure:

MySQL stores the sql_mode system variable setting in effect when a routine is created or altered, and always executes the routine with this setting in force, regardless of the current server SQL mode when the routine begins executing.

So recreate the procedure (or all, as it might not be the only one affected) with a different mode activated (or fix the group by syntax). Altering the procedure, though mentioned in the documentation, does not suffice. You should consider not to change the sql mode permanently for that (although you might have other incompatible code too).

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!