0
点赞
收藏
分享

微信扫一扫

mysql报错sql_mode=only_full_group_by的解决方法

今天的问题不在于开启了only_full_group_by报错,而是我明明没有加这个参数还是出现一样的错误。。。

具体情况是这样的,有个定时任务执行存储过程,一直执行失败,而且都是一样的错误。。

ArmException(code=100100012026, message=ArmException(code=200300000004, message=系统错误,
Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'xxxx.a.xxxxx' which is not functionally dependent on columns in GROUP BY clause; 
this is incompatible with sql_mode=only_full_group_by, reason=系统错误, solution=请查看日志, logStack=false),> 
updateProviderSettleTask('','')+存储过程--SysExecuteDBProcedure异常, reason=存储过程--SysExecuteDBProcedure异常, solution=, logStack=false)

刚开始检查了sql_mode确实是把only_full_group_by给勾上了,但是检查了其他的任务可以成功跑了,这个还是报错。
上午问了架构那边有没有其他地方控制,架构回复检查参数,要我提工单问服务提供商那边,我心想问是可以的,但是可能会得到需要检查应用的答复,参数已经没问题,问题不在配置上。
下午处理完手头上其他事情,重新整理了下思路,找到了定时任务对应的存储过程,手动输入参数执行了一把,也是不行的,然后一想,手动执行报错肯定问题是出在存储过程上,但是其他带group by的存储过程可以执行,说明配置是没问题的,于是使出了最后的杀手锏,把存储过程复制粘贴了一遍,原来的删掉,重新运行新的那份,然后执行成功了。。。我。。。
::: hljs-center

image.png

:::

举报

相关推荐

0 条评论