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

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.049 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.