Please answer these questions before submitting your issue. Thanks!
select time("10:11:1212");
select time("-1? 10:11:12");
mysql> select time("10:11:1212");
+--------------------+
| time("10:11:1212") |
+--------------------+
| NULL |
+--------------------+
1 row in set, 1 warning (0.00 sec)
mysql> select time("-1? 10:11:12");
+----------------------+
| time("-1? 10:11:12") |
+----------------------+
| -00:00:01 |
+----------------------+
1 row in set, 1 warning (0.00 sec)
Note: according to https://dev.mysql.com/doc/refman/5.7/en/time.html
The first result should be 00:00:00 insteal of NULL
mysql> select time("10:11:1212");
+--------------------+
| time("10:11:1212") |
+--------------------+
| 10:11:12 |
+--------------------+
1 row in set (0.00 sec)
mysql> select time("-1? 10:11:12");
+----------------------+
| time("-1? 10:11:12") |
+----------------------+
| -10:11:12 |
+----------------------+
1 row in set (0.00 sec)
tidb-server -V or run select tidb_version(); on TiDB)?mysql> select tidb_version();
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version() |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v4.0.0-alpha-119-ge8597cd03
Git Commit Hash: e8597cd0398e9ef3fc71803271270c179cd1fb7d
Git Branch: fix_time
UTC Build Time: 2019-08-26 05:04:46
GoVersion: go version go1.12.4 linux/amd64
Race Enabled: false
TiKV Min Version: v3.0.0-60965b006877ca7234adaced7890d7b029ed1306
Check Table Before Drop: false |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
I am working on it
This problem still exists on Master:
mysql> select time("10:11:1212");
+--------------------+
| time("10:11:1212") |
+--------------------+
| 00:00:00 |
+--------------------+
1 row in set, 1 warning (0.00 sec)
mysql> select time("-1? 10:11:12");
+----------------------+
| time("-1? 10:11:12") |
+----------------------+
| 00:00:00 |
+----------------------+
1 row in set, 1 warning (0.00 sec)
/assign
/pick-up
Pick up success.
Hi @dragonly do you have any updates on this?
@dragonly You did not submit PR within 7 days, so give up automatically.
/assign @dragonly
Most helpful comment
I am working on it