Details
-
Bug
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
10.4(EOL), 10.5, 10.6, 10.9(EOL), 10.10(EOL), 11.0(EOL), 11.1(EOL), 11.2(EOL)
-
None
-
None
Description
Cursor protocol gives incorrect result with sql_mode='ALLOW_INVALID_DATES'- invalid dates are replaced with "0000-00-00" , but it is important for repeating that after inserting invalid date to set sql_mode='ansi,traditional' and insert correct date:
Testcase:
CREATE TABLE t1 (col1 date); |
|
set @@sql_mode='STRICT_ALL_TABLES,ALLOW_INVALID_DATES'; |
INSERT INTO t1 VALUES ('2004-2-30'); |
|
set @@sql_mode='ansi,traditional'; |
INSERT IGNORE INTO t1 VALUES('2004-02-29'); |
|
select * from t1; |
drop table t1; |
Expected value:
col1
|
2004-02-30
|
2004-02-29
|
Actual value:
col1
|
0000-00-00
|
2004-02-29
|
Attachments
Issue Links
- relates to
-
MDEV-31005 Make working ./mtr --cursor-protocol
- Stalled