-
Notifications
You must be signed in to change notification settings - Fork 65
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
issue #445, licensing: use ANY_VALUE() around shortName column #536
base: development
Are you sure you want to change the base?
issue #445, licensing: use ANY_VALUE() around shortName column #536
Conversation
The underlying error from `PHP Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given in …/licensing/admin/classes/domain/License.php on line 731, referer: http://localhost:8080/coral/organizations/index.php` is `Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'coral_licensing.L.shortName' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by` Running the query directly in MySQL 5.7 will produce the error. Using the ANY_VALUE() function suppresses the test for nondeterminism. https://dev.mysql.com/doc/refman/5.7/en/miscellaneous-functions.html#function_any-value
Results of my test, which are not conclusive:
Can someone else test this? |
I've done some further testing on this and the results are confusing. MySQL 5.7 and MariaDB 10.3 each have different results with MariaDB 10.3
no
no
no
no
MySQL 5.7
no
no
no
no
|
MariaDB does not have the ANY_VALUE() function: https://jira.mariadb.org/browse/MDEV-10426 We can use a different aggregate function to get around the I'll work on some experiments with MIN() and MAX() and maybe others. https://mariadb.com/kb/en/library/aggregate-functions/ |
MariaDB does not have ANY_VALUE() function.
This issues turned out to be the easy one. I just matched the SELECT value to the GROUP BY value exactly by adding UPPER() around the GROUP BY. The other patches I made in other issues using ANY_VALUE() are not going to work. I will work on those. |
see #445
The underlying error from
PHP Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given in …/licensing/admin/classes/domain/License.php on line 731, referer: http://localhost:8080/coral/organizations/index.php
is
Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'coral_licensing.L.shortName' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
Running the query directly in MySQL 5.7 will produce the error. Using the
ANY_VALUE() function suppresses the test for nondeterminism.
https://dev.mysql.com/doc/refman/5.7/en/miscellaneous-functions.html#function_any-value