MantisBT

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005804ATutorInstallationpublic2017-09-22 18:542018-03-12 19:08
Reportergreg 
Assigned Tocindy 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version2.2.3Fixed in Version2.2.3 
Summary0005804: Mysql 5.7 Strict mode
DescriptionBy default MySQL is set to strict mod, which causes any table creation DATETIME values set to 0000-00-00 00:00:00 to fail.

Steps To ReproduceWork around:
It is possible to disable strict mode, in /etc/mysql/conf.d/mysql.cnf, adding this line, which remove NO_ZERO DATE from the default settings, but can't expect everyone to change this setting.

sql_mode = "STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"

TagsNo tags attached.
Affects versionSVN
SVN Revision#c4fe68ae8377f1b536517e6240ff4316cb694117
Attached Files

- Relationships
related to 0005802closedgreg During installation tables are reported by ATutor as created, even when they are not. 
related to 0005746closedgreg MySQL strict mode in 5.7+ fails 

-  Notes
(0007761)
cindy (administrator)
2018-02-17 18:50

After some reading on mysql documentation, the proper fix seems to replace "0000-00-00 00:00:00" with NULL, which makes more sense than using an invalid all 0 datetime.
(0007767)
greg (administrator)
2018-02-18 16:20

Yes replacing 0000-00-00 00:00:00 seems like the fix.

Do you have any ideas on how to approach this? Is it as easy as search and replace?
(0007777)
cindy (administrator)
2018-02-19 11:11

Not as simple as search and replace but still quite straightforward. I've issued a pull request that deals with the part of the problem: https://github.com/atutor/ATutor/pull/152 [^]

This pull request can only be used after an ATutor upgrade that converts all the existing use of "0000-00-00 00:00:00" in all tables to NULL. So still need an upgrade SQL script.
(0007868)
greg (administrator)
2018-02-27 19:03

Merged pull request from cindyli, replacing 0000 dates with NULL
(0007948)
greg (administrator)
2018-03-12 19:08

Resolved in 2.2.3

- Issue History
Date Modified Username Field Change
2017-09-22 18:54 greg New Issue
2018-02-13 19:00 greg Steps to Reproduce Updated View Revisions
2018-02-13 19:09 greg Assigned To => cindy
2018-02-13 19:09 greg Status new => assigned
2018-02-17 18:50 cindy Note Added: 0007761
2018-02-18 16:20 greg Note Added: 0007767
2018-02-19 11:11 cindy Note Added: 0007777
2018-02-22 08:47 greg Relationship added related to 0005802
2018-02-25 18:16 greg Relationship added related to 0005746
2018-02-27 19:03 greg SVN Revision# => c4fe68ae8377f1b536517e6240ff4316cb694117
2018-02-27 19:03 greg Note Added: 0007868
2018-02-27 19:03 greg Status assigned => resolved
2018-02-27 19:03 greg Fixed in Version => 2.2.3
2018-02-27 19:03 greg Resolution open => fixed
2018-03-12 19:08 greg Note Added: 0007948
2018-03-12 19:08 greg Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker