Bug #75992 | no warning when, under "ALLOW_INVALID_DATES", an invalid date is discarded | ||
---|---|---|---|
Submitted: | 21 Feb 2015 18:29 | Modified: | 23 Feb 2015 9:43 |
Reporter: | Programmer Old | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Optimizer | Severity: | S3 (Non-critical) |
Version: | 5.6.14-log, 5.6.24 | OS: | Windows (Vista) |
Assigned to: | CPU Architecture: | Any |
[21 Feb 2015 18:29]
Programmer Old
[23 Feb 2015 9:43]
MySQL Verification Team
Hello! Thank you for the report and test case. Thanks, Umesh
[23 Feb 2015 9:45]
MySQL Verification Team
// mysql> show variables like '%version%'; +-------------------------+---------------------------------------------------------+ | Variable_name | Value | +-------------------------+---------------------------------------------------------+ | innodb_version | 5.6.24 | | protocol_version | 10 | | slave_type_conversions | | | version | 5.6.24-enterprise-commercial-advanced | | version_comment | MySQL Enterprise Server - Advanced Edition (Commercial) | | version_compile_machine | x86_64 | | version_compile_os | Linux | +-------------------------+---------------------------------------------------------+ 7 rows in set (0.00 sec) mysql> set session sql_mode='REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI,NO_AUTO_VALUE_ON_ZERO,STRICT_TRANS_TABLES,NO_ZERO_DATE,ALLOW_INVALID_DATES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'; Query OK, 0 rows affected, 1 warning (0.00 sec) mysql> show warnings; +---------+------+-----------------------------------------------------------------------+ | Level | Code | Message | +---------+------+-----------------------------------------------------------------------+ | Warning | 1681 | 'NO_ZERO_DATE' is deprecated and will be removed in a future release. | +---------+------+-----------------------------------------------------------------------+ 1 row in set (0.00 sec) mysql> select date '2014/2/31'; +------------------+ | date '2014/2/31' | +------------------+ | 2014-02-31 | +------------------+ 1 row in set (0.01 sec) mysql> select date '2014/2/31'; +------------------+ | date '2014/2/31' | +------------------+ | 2014-02-31 | +------------------+ 1 row in set (0.00 sec) mysql> select date '2014/1/31'; +------------------+ | date '2014/1/31' | +------------------+ | 2014-01-31 | +------------------+ 1 row in set (0.00 sec) mysql> select date '2014/2/31' + 1; +----------------------+ | date '2014/2/31' + 1 | +----------------------+ | 1 | +----------------------+ 1 row in set (0.00 sec) mysql> select date '2014/1/31' + 1; +----------------------+ | date '2014/1/31' + 1 | +----------------------+ | 20140132 | +----------------------+ 1 row in set (0.00 sec) mysql> select date(date '2014/2/31'); +------------------------+ | date(date '2014/2/31') | +------------------------+ | NULL | +------------------------+ 1 row in set (0.00 sec)