ElkArte Community

Elk Development => Bug Reports => Exterminated Bugs => Topic started by: pi.tech on December 26, 2018, 01:47:23 pm

Title: "Your database version is 1.1.4"
Post by: pi.tech on December 26, 2018, 01:47:23 pm
Hello.

Every now and then I am getting this error. I am pretty sure I started on 1.1.5 but, it is possible it was 1.1.4 followed quickly by 1.1.5.

My question is, how do I update the db to 1.1.5?

thank you.

Version Information:
This version: ElkArte 1.1.5
Current version: 1.1.5
Code: [Select]
Expression #1 of ORDER BY clause is not in SELECT list, references column 'elkuser.t.id_last_msg' which is not in SELECT list; this is incompatible with DISTINCT
File: .../sources/subs/Unread.class.php
Line: 427

Note: Your database version is 1.1.4.
Title: Re: "Your database version is 1.1.4"
Post by: vbgamer45 on December 26, 2018, 08:56:10 pm
It is not a elkarte database version issue. It is a bug that needs to be fixed with elkarte or you can disable a setting in your myself configuration for group by's
Title: Re: "Your database version is 1.1.4"
Post by: pi.tech on December 26, 2018, 10:25:09 pm
OH! ok thank you so much for the reply.

Quote
or you can disable a setting in your myself configuration for group by's

I will see if I can find what you are referring to here.
Title: Re: "Your database version is 1.1.4"
Post by: vbgamer45 on December 26, 2018, 11:38:38 pm
I meant mysql configuration your my.cnf file
You have "ONLY_FULL_GROUP_BY" in your sql_mode setting
Title: Re: "Your database version is 1.1.4"
Post by: emanuele on December 27, 2018, 10:45:13 am
Well, technically is something we should fix and make elk align with the "recent" (well, few years ago I think) changes with mysql defaults (that would also mean align with psql leading to less maintenance).
Title: Re: "Your database version is 1.1.4"
Post by: emanuele on December 27, 2018, 10:49:58 am
Tracked at https://github.com/elkarte/Elkarte/issues/3273
Title: Re: "Your database version is 1.1.4"
Post by: pi.tech on December 28, 2018, 07:28:02 pm
Thank you both!

Quote
I meant mysql configuration your my.cnf file
You have "ONLY_FULL_GROUP_BY" in your sql_mode setting

I had no clue about making adjustments to mysql configuration. I found that my ubuntu 18.04 with mysql v 5.7 were configured as you said

Code: [Select]
| @@sql_mode  
ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

I had to make a new entry in my /etc/mysql/my.cnf  to
Code: [Select]
[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"

and restart mysql.

my  new "select @@sql_mode" shows that ONLY_FULL_GROUP_BY has been removed.

Does all that seem like the correct procedure to fix the problem at the server end?

As I mentioned I do not always run into this error, so, I am not sure what triggers it.

 I have had a this Note: Your database version is 1.1.4. before doing some other operation, but, I cannot find it in my/admin/error logs. they seem to have already been pruned.

Anyway, thanks again. Best!