evekb / evedev-kb

EVE Killboard
www.evekb.org
41 stars 22 forks source link

Database error #76

Closed MorganKell closed 7 years ago

MorganKell commented 7 years ago

Hello, i have updatet my server to ubunut 16.04 and php7. Now i get an error when connecting to my kb:

Database error: Expression #30 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'list.fbcrp_name' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by SQL: SELECT list. , count(distinct com.id) as comments, count(distinct ind.ind_order) as inv FROM (SELECT kll.kll_id, kll.kll_timestamp, kll.kll_external_id, mdn.itemID, mdn.itemName, plt.plt_name, crp.crp_name, crp.crp_id, ali.all_name, ali.all_id, kll.kll_system_id, kll.kll_ship_id, kll.kll_dmgtaken, kll.kll_victim_id, plt.plt_externalid, kll.kll_crp_id, kll.kll_points, kll.kll_isk_loss, shp.shp_class, shp.shp_id, scl.scl_id, scl.scl_class, scl.scl_value, sys.sys_id, sys.sys_name, sys.sys_sec, fbplt.plt_name as fbplt_name, fbplt.plt_id as fbplt_id, fbplt.plt_externalid as fbplt_externalid, fbcrp.crp_name as fbcrp_name, fbali.all_name as fball_name, fbcrp.crp_id as fbcrp_id, fbali.all_id as fball_id FROM kb3_kills kll STRAIGHT_JOIN kb3_pilots plt ON ( plt.plt_id = kll.kll_victim_id ) STRAIGHT_JOIN kb3_corps crp ON ( crp.crp_id = kll.kll_crp_id ) STRAIGHT_JOIN kb3_alliances ali ON ( ali.all_id = kll.kll_all_id ) STRAIGHT_JOIN kb3_pilots fbplt ON ( fbplt.plt_id = kll.kll_fb_plt_id ) STRAIGHT_JOIN kb3_inv_detail fb ON ( fb.ind_kll_id = kll.kll_id AND fb.ind_plt_id = kll.kll_fb_plt_id ) STRAIGHT_JOIN kb3_corps fbcrp ON ( fbcrp.crp_id = fb.ind_crp_id ) STRAIGHT_JOIN kb3_alliances fbali ON ( fbali.all_id = fb.ind_all_id ) LEFT JOIN kb3_mapdenormalize mdn ON (kll.kll_location = mdn.itemID) STRAIGHT_JOIN kb3_systems sys ON ( sys.sys_id = kll.kll_system_id ) STRAIGHT_JOIN kb3_ships shp ON ( shp.shp_id = kll.kll_ship_id ) STRAIGHT_JOIN kb3_ship_classes scl ON ( scl.scl_id = shp.shp_class ) INNER JOIN kb3_inv_crp inc ON (inc.inc_kll_id = kll.kll_id) WHERE inc.inc_crp_id in (1 ) order by inc.inc_timestamp desc limit 10 OFFSET 0) list join kb3_inv_detail ind ON (ind.ind_kll_id = list.kll_id) left join kb3_comments com ON (list.kll_id = com.kll_id AND (com.site = "FSWE" OR com.site IS NULL)) group by list.kll_id order by kll_timestamp desc / kill list */

If i open mysql and run the command: SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY','')); everyting is fine untill the next reboot of the server.

Salvoxia commented 7 years ago

Hi,

sorry for my late reply. The ONLY_FULL_GROUP_BY mode was enabled by default in MySQL 5.7.5, so that's the reason for that error. I'm afraid EDK's database queries will not be modified for compatibility with that mode, so you'll have to disable it. To keep that change after a restart, you'll have to modify your my.conf file (see https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sql-mode-setting for more information).

Best Regards, Salvoxia