• Welcome to the Chevereto User Community!

    Here, users from all over the world come together to learn, share, and collaborate on everything related to Chevereto. It's a place to exchange ideas, ask questions, and help improve the software.

    Please keep in mind:

    • This community is user-driven. Always be polite and respectful to others.
    • Support development by purchasing a Chevereto license, which also gives you priority support.
    • Go further by joining the Community Subscription for even faster response times and to help sustain this space
  • Chevereto Support CLST

    Support response

    Support checklist

    • Got a Something went wrong message? Read this guide and provide the actual error. Do not skip this.
    • Confirm that the server meets the System Requirements
    • Check for any available Hotfix - your issue could be already reported/fixed
    • Read documentation - It will be required to Debug and understand Errors for a faster support response

Update failed 3.9.0 (0000-00-00 date stuff)

Status
Not open for further replies.

mmybaka

Chevereto Member
3.9.0 (3.8.13 DB) install update

SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect date value: '0000-00-00' for column 'stat_date_gmt' at row 1
 

Attachments

  • QQ截图20170524215122.png
    QQ截图20170524215122.png
    55.1 KB · Views: 10
This seems to be a bug related to newer MySQL versions. The conflicting code (stats stuff) is present in the code way before v3.9.0 so the bug is older than this new release.

Can you indicate which mysql version are you running?
 
This seems to be a bug related to newer MySQL versions. The conflicting code (stats stuff) is present in the code way before v3.9.0 so the bug is older than this new release.

Can you indicate which mysql version are you running?

[root@159649 ~]# mysql --version
mysql Ver 14.14 Distrib 5.7.12, for linux-glibc2.5 (x86_64) using EditLine wrapper

Do I need to fix the database?
 
I'm running 5.7.9 without issues, my sql mode is this:

Code:
sql-mode="STRICT_ALL_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE,NO_AUTO_CREATE_USER"

I'm installing MySQL 5.7.14 now to test this.
 
I'm also finding that MySQL 5.7.14 throws an error related to sql-mode "ONLY_FULL_GROUP_BY". My advice is to remove that mode for now because I've to review all the queries to make them fully compatible with SQL92.

Having said that, the safe MySQL mode is this one:

Code:
sql-mode="STRICT_ALL_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE,NO_AUTO_CREATE_USER"

You should use that mode in your MySQL ini file. If you can change that file, then try to use an older MySQL version.
 
I'm also finding that MySQL 5.7.14 throws an error related to sql-mode "ONLY_FULL_GROUP_BY". My advice is to remove that mode for now because I've to review all the queries to make them fully compatible with SQL92.

Having said that, the safe MySQL mode is this one:

Code:
sql-mode="STRICT_ALL_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE,NO_AUTO_CREATE_USER"

You should use that mode in your MySQL ini file. If you can change that file, then try to use an older MySQL version.

I tried to modify my.cnf, added sql-mode="STRICT_ALL_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_ZERO_DATE,NO_ZERO_IN_DATE,NO_AUTO_CREATE_USER"

Save after the restart mysql, but still the error ... it seems I need to use the old version of mysql ...
 
In some servers there are several cnf and ini files. You must update the on being used by you server.

You could give this one a try:
Code:
SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));
 
This is not a bug, is just you using outdated stuff.

Chevereto v3.8.0 added this statement:
Code:
("1", "0000-00-00", "total")

But in v3.8.1 (very next to v3.8.0) it was changed to:
Code:
("1", NULL, "total")

So if you get this MySQL error is because you did something that broke this stuff. Bottom line is that this is not a bug.

If you are still able to get that error then please go to install/?debug and paste that output here, that helps me to check which queries are being populated by the installer.

Cheers,
Rodolfo.
 
This is not a bug, is just you using outdated stuff.

Chevereto v3.8.0 added this statement:
Code:
("1", "0000-00-00", "total")

But in v3.8.1 (very next to v3.8.0) it was changed to:
Code:
("1", NULL, "total")

So if you get this MySQL error is because you did something that broke this stuff. Bottom line is that this is not a bug.

If you are still able to get that error then please go to install/?debug and paste that output here, that helps me to check which queries are being populated by the installer.

Cheers,
Rodolfo.

I tried to change the version of database (5.7.12→5.7.18)and fresh reinstalled 3.8.13, which can correctly update to 3.9.0 (and 3.9.2);

but the error still occur when using original data and files; and the error still occur after the recently downloaded 3.8.13 have been replaced;

I think this error might come from the accumulation of past update problems and is on data level, since I didn't change the program's files at all;

so I tried to search for this error in database, and found it in table _stats(chv_stats). You can see it in the attachment;

and the error stop occur after I change 0000-00-00 to 1970-01-01;

In short there is no mistake, everything is normal! ~(^-^)V
 

Attachments

  • 20170529221409.png
    20170529221409.png
    29.9 KB · Views: 6
Status
Not open for further replies.
Back
Top