Details
-
Bug
-
Status: Open (View Workflow)
-
Minor
-
Resolution: Unresolved
-
5.5(EOL), 10.0(EOL), 10.1(EOL), 10.2(EOL)
-
None
Description
MariaDB [test]> create table t1 (d date, dt datetime, t timestamp); |
Query OK, 0 rows affected (0.29 sec) |
|
MariaDB [test]> set sql_mode='NO_ZERO_DATE'; |
Query OK, 0 rows affected (0.00 sec) |
|
MariaDB [test]> insert into t1 values ("0000-00-00", "0000-00-00", "0000-00-00"); |
Query OK, 1 row affected, 3 warnings (0.07 sec)
|
|
MariaDB [test]> show warnings;
|
+---------+------+---------------------------------------------+ |
| Level | Code | Message | |
+---------+------+---------------------------------------------+ |
| Warning | 1264 | Out of range value for column 'd' at row 1 | |
| Warning | 1264 | Out of range value for column 'dt' at row 1 | |
| Warning | 1265 | Data truncated for column 't' at row 1 | |
+---------+------+---------------------------------------------+ |
3 rows in set (0.00 sec) |
In MySQL 5.7 they are all the same:
MySQL [test]> create table t1 (d date, dt datetime, t timestamp); |
Query OK, 0 rows affected (0.35 sec) |
|
MySQL [test]> set sql_mode='NO_ZERO_DATE'; |
Query OK, 0 rows affected, 1 warning (0.00 sec) |
|
MySQL [test]> insert into t1 values ("0000-00-00", "0000-00-00", "0000-00-00"); |
Query OK, 1 row affected, 3 warnings (0.07 sec)
|
|
MySQL [test]> show warnings;
|
+---------+------+---------------------------------------------+ |
| Level | Code | Message | |
+---------+------+---------------------------------------------+ |
| Warning | 1264 | Out of range value for column 'd' at row 1 | |
| Warning | 1264 | Out of range value for column 'dt' at row 1 | |
| Warning | 1264 | Out of range value for column 't' at row 1 | |
+---------+------+---------------------------------------------+ |
3 rows in set (0.00 sec) |
Attachments
Issue Links
- relates to
-
MDEV-7635 update defaults and simplify mysqld config parameters
- Closed