mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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.
This commit is contained in:

parent
730bea634f
commit
1ed076e41b
@ -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"));
|
||||
|
Reference in New Issue
Block a user