Canadensys / vascan

The Database of Vascular Plants of Canada
MIT License
2 stars 2 forks source link

Checklist builder: Download extensive list as a Darwin Core Archive fails #39

Open JeGoi opened 5 years ago

JeGoi commented 5 years ago

In Vascan front end, when you try to create a archive from Checklist builder "Download extensive list as a Darwin Core Archive", it fails and return an error. In Vascan log:

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Expression #3 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'vascan_newprod.lookup.status' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by

JeGoi commented 5 years ago

It is due to the passage from mysql 5.1 to 5.7 @cgendreau has found : "However, in MySQL prior to version 5.7 the default behaviour has been more forgiving because it will not complain and then arbitrarily choose any value!" On ubuntu 16.04, it could be temporarely fixed with: sudo vim /etc/mysql/mysql.conf.d/mysqld.cnf and add this line after [mysqld] sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"