-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errors due to MySQL8 ONLY_FULL_GROUP_BY setting #729
Comments
Another way of working around this for now is to enable the STRICT_MODE_FIX setting in conf.php
|
Can you confirm your MySQL version? |
Thanks for the alternative solution. I'm using mysql 8.0.26 as packaged in ubuntu 20.04.02 I found when trying the STRICT_MODE_FIX it also gives an error: Syntax error or access violation: 1231 Variable 'sql_mode' can't be set to the value of 'NO_AUTO_CREATE_USER' in /home/www/html/jethro/include/init.php:44 Stack trace: #0 /home/www/html/jethro/include/init.php(44): It seems that my install of mysql also doesn't accept the NO_AUTO_CREATE_USER flag in the sql_mode. If I remove that flag from init.php, then it works fine. The default sql_mode for my version is: select @@sql_mode; |
Thanks for the info. I've done some reading which is telling me that
so as well as the problem you report in this issue, it looks like STRICT_MODE_FIX also needs adjusting. |
…LY_FULL_GROUP_BY is enabled by default in Mysql8 but Jethro can't function with that restriction.
Thanks for reporting. Overall diagnosis is:
|
I've now switched my dev environment to mysql8 (rather than mariaDB) to catch these issues |
With a new installation on Ubuntu 20.04, I've had issues with the rank keyword, but after working through that I'm finding that autosuggest doesn't work. The Javascript console reveals this:
Uncaught SyntaxError: expected expression, got '<'
setSuggestions http://localhost/jethro/resources/js/bsn_autosuggest.js?t=1634468773:186
This is caused by an uncaught exception in a HTTP request
GET | http://localhost/jethro/?call=find_person_json&search=h
SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'pp.first_name' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Line 162 of File /home/www/html/jethro/include/jethrodb.php
This can be overcome by turning off the ONLY_FULL_GROUP_BY mode in MySQL
This command will temporarily clear the flag, allowing the query to work:
SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
The text was updated successfully, but these errors were encountered: