After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 791851 - can not create transactions anymore after MySQL migration to 5.7.20
can not create transactions anymore after MySQL migration to 5.7.20
Status: RESOLVED DUPLICATE of bug 784623
Product: GnuCash
Classification: Other
Component: Backend - SQL
2.6.19
Other Linux
: Normal critical
: ---
Assigned To: gnucash-core-maint
gnucash-core-maint
Depends on:
Blocks:
 
 
Reported: 2017-12-21 16:16 UTC by Raigedas
Modified: 2018-06-30 00:01 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Raigedas 2017-12-21 16:16:40 UTC
I can not create transactions anymore after MySQL migration to 5.7.20. I see this in console:


* 16:58:09  CRIT <gnc.backend.dbi> [mysql_error_fn()] DBI error: 1292: Incorrect datetime value: '19700101000000' for column 'timespec_val' at row 1                                                                                                                                                                                                                      
* 16:58:09  CRIT <gnc.backend.dbi> [conn_execute_nonselect_statement()] Error executing SQL INSERT INTO slots(obj_guid,name,slot_type,int64_val,string_val,double_val,timespec_val,guid_val,numeric_val_num,numeric_val_denom,gdate_val) VALUES('80416126ac2ce3d6a79afb49f29e77f9','date-posted',10,0,NULL,0,'19700101000000',NULL,0,1,'20171221')                        
* 16:58:09  CRIT <gnc.backend.sql> [gnc_sql_do_db_operation()] SQL error: INSERT INTO slots(obj_guid,name,slot_type,int64_val,string_val,double_val,timespec_val,guid_val,numeric_val_num,numeric_val_denom,gdate_val) VALUES('80416126ac2ce3d6a79afb49f29e77f9','date-posted',10,0,NULL,0,'19700101000000',NULL,0,1,'20171221')                                          
* 16:58:09  CRIT <gnc.backend.sql> [save_transaction()] Transaction aaa dated 2017.12.21 in account Maistas not saved due to Slots save failed. Check trace log for SQL errors.
Comment 1 John Ralls 2017-12-21 16:42:37 UTC
This looks like bug 784623. What version of MySQL were you migrating from? Does removing STRICT_TRANS_TABLES from my.cnf as explained in bug 784623 comment 13 resolve the problem?
Comment 2 Raigedas 2017-12-21 17:52:36 UTC
I am sorry I can not tell exactly the previous MySQL version but I believe it was 5.5.x.

my.cnf did not have STRICT_TRANS_TABLES nor sql_mode string. But yes, I defined sql_mode without STRICT_TRANS_TABLES in my.cnf and that worked. 

I was struggling quite for a while with issue... Thank you very much.

*** This bug has been marked as a duplicate of bug 784623 ***
Comment 3 John Ralls 2018-06-30 00:01:59 UTC
GnuCash bug tracking has moved to a new Bugzilla host. This bug has been copied to https://bugs.gnucash.org/show_bug.cgi?id=791851. Please update any external references or bookmarks.