-
What did you do?
If possible, provide a recipe for reproducing the error.
SELECT SYSDATE(), SLEEP(1), SYSDATE(), SLEEP(2), SYSDATE();
-
What did you expect to see?
mysql> SELECT SYSDATE(), SLEEP(1), SYSDATE(), SLEEP(2), SYSDATE();
+---------------------+----------+---------------------+----------+---------------------+
| SYSDATE() | SLEEP(1) | SYSDATE() | SLEEP(2) | SYSDATE() |
+---------------------+----------+---------------------+----------+---------------------+
| 2017-08-18 22:33:51 | 0 | 2017-08-18 22:33:52 | 0 | 2017-08-18 22:33:54 |
+---------------------+----------+---------------------+----------+---------------------+
1 row in set (3.01 sec)
- What did you see instead?
in TiDB SYSDATE() behaves the same as now(), it returns statement begin time but not execute time
MySQL [(none)]> SELECT SYSDATE(), SLEEP(1), SYSDATE(), SLEEP(2), SYSDATE();
+---------------------+----------+---------------------+----------+---------------------+
| SYSDATE() | SLEEP(1) | SYSDATE() | SLEEP(2) | SYSDATE() |
+---------------------+----------+---------------------+----------+---------------------+
| 2017-08-18 22:33:44 | 0 | 2017-08-18 22:33:44 | 0 | 2017-08-18 22:33:44 |
+---------------------+----------+---------------------+----------+---------------------+
1 row in set (3.00 sec)
- What version of TiDB are you using (
tidb-server -V)?
Git Commit Hash: 365e4ab
Git Commit Branch: master
UTC Build Time: 2017-08-16 01:24:27
What did you do?
If possible, provide a recipe for reproducing the error.
SELECT SYSDATE(), SLEEP(1), SYSDATE(), SLEEP(2), SYSDATE();What did you expect to see?
in TiDB SYSDATE() behaves the same as now(), it returns statement begin time but not execute time
tidb-server -V)?Git Commit Hash: 365e4ab
Git Commit Branch: master
UTC Build Time: 2017-08-16 01:24:27