Context: in TiDB we added the SQL mode ALLOW_INVALID_DATES: pingcap/tidb#8263
This is tested to work for INSERT and I think select works for mocktikv. However, in my testing it does not work with the TiKV co-processor.
Bug Report
Docker images:
- pingcap/tikv:v2.1.0
- a docker build of the latest of the 2.1 release branch
What did you do?
From a TiDB MySQL client:
mysql> CREATE TABLE d1 (d DATE);
Query OK, 0 rows affected (0.56 sec)
mysql> SET sql_mode='STRICT_TRANS_TABLES,ALLOW_INVALID_DATES';
Query OK, 0 rows affected (0.17 sec)
mysql> INSERT INTO d1 VALUES ('2010-00-01');
Query OK, 1 row affected (0.52 sec)
mysql> SELECT * from d1 WHERE d='2010-00-01';
ERROR 1105 (HY000): other error: eval error code: 1105 msg: "Other(StringError(\"[src/coprocessor/codec/mysql/time/mod.rs:100]: \\'2010-0-1 0:0:0.000000000\\' is not a valid datetime in specified time zone\"))
What did you expect to see?
No error
What did you see instead?
The above error