Bug #71402 Improved logging of warnings/errors resulting from sql_modes
Submitted: 16 Jan 2014 23:06
Reporter: Matthew Lord Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Logging Severity:S4 (Feature request)
Version:5.7 OS:Any
Assigned to: CPU Architecture:Any
Tags: SQL_MODE, strict

[16 Jan 2014 23:06] Matthew Lord
Description:
When a warning or error is reported due to an sql_mode being set, it would be nice if that was noted in the message so that the user can decide if they want to alter the sql_mode setting in order to change the behavior and avoid the given warning/error.

How to repeat:
N/A

Suggested fix:
For example:

mysql> create table test (c1 datetime) engine=innodb;
Query OK, 0 rows affected (0.38 sec)

mysql> insert into test values ('');
ERROR 1292 (22007): Incorrect datetime value: '' for column 'c1' at row 1 (invalid dates are not allowed when the STRICT_TRANS_TABLE sql_mode is set)
[16 Jan 2014 23:25] Morgan Tocker
Duplicate of #70796