mod-playerbots icon indicating copy to clipboard operation
mod-playerbots copied to clipboard

40 random bot accounts with 0 characters available

Open justaswell opened this issue 3 years ago • 2 comments

I changed the default bots count to 40, and got this issues:

Building random item cache from 46096 items [1055] Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'acore_world.c.map' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by Unhandled MySQL errno 1055. Unexpected behaviour possible.

i don't know the reason.

justaswell avatar Dec 05 '22 06:12 justaswell

原因:使用GROUP BY 语句违背了sql_mode=only_full_group_by。因为mysql版本5.7之后默认的模式是ONLY_FULL_GROUP_BY。需要去掉这个设置。按下面这样设置: 1.先使用下面SQL预计查询 sql_mode: SELECT @@GLOBAL.sql_mode; 可以得到下面结果: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION 2.然后调用下面sql语句重新设置sql_mode,删除ONLY_FULL_GROUP_BY: SET GLOBAL.sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';

lipengg avatar Dec 16 '22 15:12 lipengg

@justaswell I believe this issue has been resolved if you can confirm and close out this issue. Thanks!

Dreathean avatar Sep 15 '23 11:09 Dreathean