diff options
author | unknown <jimw@mysql.com> | 2005-08-11 18:58:22 -0700 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-08-11 18:58:22 -0700 |
commit | 7eebb75132d7316b3608a1e7c1b0930443a6c4e8 (patch) | |
tree | 7938a2593a4978018f3aaa25e99fa2e4c2e47b79 /sql/item_func.h | |
parent | 036c5b28d7985b50c8ae111e5aabfd88179cc8f0 (diff) | |
download | mariadb-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 'sql/item_func.h')
-rw-r--r-- | sql/item_func.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/item_func.h b/sql/item_func.h index e8db9d70ae7..1f25b762b70 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -874,6 +874,7 @@ public: } }; + class Item_func_benchmark :public Item_int_func { ulong loop_count; @@ -888,6 +889,16 @@ public: }; +class Item_func_sleep :public Item_int_func +{ +public: + Item_func_sleep(Item *a) :Item_int_func(a) {} + const char *func_name() const { return "sleep"; } + longlong val_int(); +}; + + + #ifdef HAVE_DLOPEN class Item_udf_func :public Item_func |