Server version: 5.6.25-73.1-log Percona Server (GPL), Release 73.1, Revision 07b797f on Centos 6
I tried to upload a 10k screen capture unsuccessfully, but here is my question. when I use the CLI to run the query SELECT sysdate(), SLEEP(5), sysdate(); I get the same time and date to the second. even with a 60 second sleep.
when I manually run successive CLI queries of queries of SELECT sysdate();, I get identical results if run quickly, if I pause between individual queries of about 5 seconds then I get the results I expected to get different values.
Is this because the query is cached?
Hi linuxxunil;
I’m not quite following your exact test case, so if you could just copy/paste your terminal text that would help.
That aside, I’d check to see if you have sysdate-is-now set to true.
[url]MySQL :: MySQL 5.6 Reference Manual :: 5.1.6 Server Command Options
-Scott
Double check you queries:
I tried to test it but I don’t get same results as you explained.
+---------------------+
| sysdate() |
+---------------------+
| 2015-08-17 22:11:10 |
+---------------------+
1 row in set (0.00 sec)
+-----------+
| sleep(10) |
+-----------+
| 0 |
+-----------+
1 row in set (10.00 sec)
+---------------------+
| sysdate() |
+---------------------+
| 2015-08-17 22:11:20 |
+---------------------+
1 row in set (0.00 sec)
+-----------------+------------------------------------------------------+
| @@version | @@version_comment |
+-----------------+------------------------------------------------------+
| 5.6.25-73.1-log | Percona Server (GPL), Release 73.1, Revision 07b797f |
+-----------------+------------------------------------------------------+
1 row in set (0.00 sec)
My apologies for not getting back to this topic in a timely fashion. Work has moved me to another task but I will revisit this at a future date.
.
Thank you every one for your help, I will revisit this issue.