summaryrefslogtreecommitdiff
path: root/mysql-test/r/func_misc.result
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2005-08-11 18:58:22 -0700
committerunknown <jimw@mysql.com>2005-08-11 18:58:22 -0700
commit7eebb75132d7316b3608a1e7c1b0930443a6c4e8 (patch)
tree7938a2593a4978018f3aaa25e99fa2e4c2e47b79 /mysql-test/r/func_misc.result
parent036c5b28d7985b50c8ae111e5aabfd88179cc8f0 (diff)
downloadmariadb-git-7eebb75132d7316b3608a1e7c1b0930443a6c4e8.tar.gz
Add SLEEP(seconds) function, which always returns 0 after the given
number of seconds (which can include microseconds). (Bug #6760) mysql-test/r/func_misc.result: Add new results mysql-test/t/func_misc.test: Add new regression test. sql/item_create.cc: Add create_func_sleep() sql/item_create.h: Add create_func_sleep() sql/item_func.cc: Add sleep() implementation sql/item_func.h: Add class for sleep() function sql/lex.h: Handle SLEEP() function
Diffstat (limited to 'mysql-test/r/func_misc.result')
-rw-r--r--mysql-test/r/func_misc.result11
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result
index 5e74e6fa68a..670b8754e30 100644
--- a/mysql-test/r/func_misc.result
+++ b/mysql-test/r/func_misc.result
@@ -59,3 +59,14 @@ t1 CREATE TABLE `t1` (
`length(uuid())` int(10) NOT NULL default '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
+create table t1 (a timestamp default '2005-05-05 01:01:01',
+b timestamp default '2005-05-05 01:01:01');
+insert into t1 set a = now();
+select sleep(3);
+sleep(3)
+0
+update t1 set b = now();
+select timediff(b, a) >= '00:00:03' from t1;
+timediff(b, a) >= '00:00:03'
+1
+drop table t1;