Strict MySQL (5.6), cause problems

Bug #1020860 reported by Adrian Liechti
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PHPDevShell
Fix Committed
High
Greg

Bug Description

Every query which sets the auto_increment-id with '', should be changed into NULL.

The MySQL Error looks like this:
The MySQL database engine returned with an error (code 1366 - Incorrect integer value: '' for column 'id' at row 1)

Example (/includes/config/models/PHPDS_db.query.php, about line 48):

Change this:
INSERT INTO
 _db_core_menu_access_logs (log_id, menu_id, user_id, timestamp)
VALUES
 ('', '%s', '%u', '%s')

Into this:
INSERT INTO
 _db_core_menu_access_logs (log_id, menu_id, user_id, timestamp)
VALUES
 (NULL, '%s', '%u', '%s')

Greg (gregfr)
Changed in phpdevshell:
importance: Undecided → High
assignee: nobody → Greg (gregfr)
status: New → Confirmed
Revision history for this message
Greg (gregfr) wrote :

Some changes have been submitted, I hope they will address this.

Changed in phpdevshell:
status: Confirmed → Fix Committed
Greg (gregfr)
Changed in phpdevshell:
milestone: none → 3.2.1-stable
Revision history for this message
Adrian Liechti (jahweh) wrote :

The Installation-Queries are in the same way affected.

V3.2
An error occured trying to send the queries (query 75/527).
The error was: [1366] Incorrect integer value: '' for column 'id' at row 1
The offending query was: " INSERT INTO `pds_core_menu_structure` VALUES ('', '2266433229', '0', '2')"

Revision history for this message
Greg (gregfr) wrote :

Please try this file and tell me if it's working.

Revision history for this message
Adrian Liechti (jahweh) wrote :

works, thx

Greg (gregfr)
Changed in phpdevshell:
milestone: 3.2.1-stable → 3.5
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.