mirror of
https://github.com/MariaDB/server.git
synced 2025-08-05 13:16:09 +03:00
Bug#11754150: A TEST CASE FOR BUG#6857 IS DISABLED IN SP.TEST
unix_timestamp() is implemented in this part of the code in place of current_time(). Also, since the pb2 machines may be extremely fast, instead of looping through the code, we use sleep(1.1) so that the variables t0 and t1 have different values.
This commit is contained in:
@@ -2772,20 +2772,23 @@ userid
|
|||||||
drop procedure bug8116|
|
drop procedure bug8116|
|
||||||
drop table t3|
|
drop table t3|
|
||||||
drop procedure if exists bug6857|
|
drop procedure if exists bug6857|
|
||||||
create procedure bug6857(counter int)
|
create procedure bug6857()
|
||||||
begin
|
begin
|
||||||
declare t0, t1 int;
|
declare t0, t1 int;
|
||||||
declare plus bool default 0;
|
declare plus bool default 0;
|
||||||
set t0 = current_time();
|
set t0 = unix_timestamp();
|
||||||
while counter > 0 do
|
select sleep(1.1);
|
||||||
set counter = counter - 1;
|
set t1 = unix_timestamp();
|
||||||
end while;
|
|
||||||
set t1 = current_time();
|
|
||||||
if t1 > t0 then
|
if t1 > t0 then
|
||||||
set plus = 1;
|
set plus = 1;
|
||||||
end if;
|
end if;
|
||||||
select plus;
|
select plus;
|
||||||
end|
|
end|
|
||||||
|
call bug6857()|
|
||||||
|
sleep(1.1)
|
||||||
|
0
|
||||||
|
plus
|
||||||
|
1
|
||||||
drop procedure bug6857|
|
drop procedure bug6857|
|
||||||
drop procedure if exists bug8757|
|
drop procedure if exists bug8757|
|
||||||
create procedure bug8757()
|
create procedure bug8757()
|
||||||
|
@@ -3336,28 +3336,21 @@ drop table t3|
|
|||||||
--disable_warnings
|
--disable_warnings
|
||||||
drop procedure if exists bug6857|
|
drop procedure if exists bug6857|
|
||||||
--enable_warnings
|
--enable_warnings
|
||||||
create procedure bug6857(counter int)
|
create procedure bug6857()
|
||||||
begin
|
begin
|
||||||
declare t0, t1 int;
|
declare t0, t1 int;
|
||||||
declare plus bool default 0;
|
declare plus bool default 0;
|
||||||
|
|
||||||
set t0 = current_time();
|
set t0 = unix_timestamp();
|
||||||
while counter > 0 do
|
select sleep(1.1);
|
||||||
set counter = counter - 1;
|
set t1 = unix_timestamp();
|
||||||
end while;
|
|
||||||
set t1 = current_time();
|
|
||||||
if t1 > t0 then
|
if t1 > t0 then
|
||||||
set plus = 1;
|
set plus = 1;
|
||||||
end if;
|
end if;
|
||||||
select plus;
|
select plus;
|
||||||
end|
|
end|
|
||||||
|
|
||||||
# QQ: This is currently disabled. Not only does it slow down a normal test
|
call bug6857()|
|
||||||
# run, it makes running with valgrind (or similar tools) extremely
|
|
||||||
# painful.
|
|
||||||
# Make sure this takes at least one second on all machines in all builds.
|
|
||||||
# 30000 makes it about 3 seconds on an old 1.1GHz linux.
|
|
||||||
#call bug6857(300000)|
|
|
||||||
|
|
||||||
drop procedure bug6857|
|
drop procedure bug6857|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user