summaryrefslogtreecommitdiff
path: root/mysql-test/r/func_str.result
diff options
context:
space:
mode:
authorunknown <tnurnberg@mysql.com/white.intern.koehntopp.de>2008-02-24 01:31:54 +0100
committerunknown <tnurnberg@mysql.com/white.intern.koehntopp.de>2008-02-24 01:31:54 +0100
commit7b8717ace88805a6a243a2800fc7d3fc70d2fddc (patch)
treecd84aa795f9c47d4d5eff3b0deae320b06e2507a /mysql-test/r/func_str.result
parent72f1b329e16f8911cb445d11f2ad3367196f7737 (diff)
downloadmariadb-git-7b8717ace88805a6a243a2800fc7d3fc70d2fddc.tar.gz
Bug#20752: BENCHMARK with many iterations returns too quickly
In BENCHMARK(count, expr), count could overflow/wrap-around. Patch changes to a sufficiently large data-type. Adds a warning for negative count values. mysql-test/r/func_str.result: show that a negative 'count' for BENCHMARK(count, expr) throws a warning and returns NULL. mysql-test/t/func_str.test: show that a negative 'count' for BENCHMARK(count, expr) throws a warning and returns NULL. sql/item_func.cc: use ulonglong rather than ulong in BENCHMARK(count, expr) throw warning on negative 'count'; return SQL-NULL.
Diffstat (limited to 'mysql-test/r/func_str.result')
-rw-r--r--mysql-test/r/func_str.result5
1 files changed, 5 insertions, 0 deletions
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result
index 6f6edd5112b..8bb764ad608 100644
--- a/mysql-test/r/func_str.result
+++ b/mysql-test/r/func_str.result
@@ -1431,6 +1431,11 @@ benchmark(100, NULL)
select benchmark(NULL, 1+1);
benchmark(NULL, 1+1)
NULL
+select benchmark(-1, 1);
+benchmark(-1, 1)
+NULL
+Warnings:
+Error 1411 Incorrect count value: '-1' for function benchmark
set @password="password";
set @my_data="clear text to encode";
select md5(encode(@my_data, "password"));