Loading mysql-test/r/sp.result +16 −0 Original line number Diff line number Diff line Loading @@ -2158,6 +2158,22 @@ call bug8116(42)| userid drop procedure bug8116| drop table t3| drop procedure if exists bug6857| create procedure bug6857(counter int) begin declare t0, t1 int; declare plus bool default 0; set t0 = current_time(); while counter > 0 do set counter = counter - 1; end while; set t1 = current_time(); if t1 > t0 then set plus = 1; end if; select plus; end| drop procedure bug6857| drop table if exists fac| create table fac (n int unsigned not null primary key, f bigint unsigned)| drop procedure if exists ifac| Loading mysql-test/t/sp.test +31 −0 Original line number Diff line number Diff line Loading @@ -2645,6 +2645,37 @@ call bug8116(42)| drop procedure bug8116| drop table t3| # # BUG#6857: current_time() in STORED PROCEDURES # --disable_warnings drop procedure if exists bug6857| --enable_warnings create procedure bug6857(counter int) begin declare t0, t1 int; declare plus bool default 0; set t0 = current_time(); while counter > 0 do set counter = counter - 1; end while; set t1 = current_time(); if t1 > t0 then set plus = 1; end if; select plus; end| # QQ: This is currently disabled. Not only does it slow down a normal test # 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| # # Some "real" examples Loading sql/sp_head.cc +1 −0 Original line number Diff line number Diff line Loading @@ -503,6 +503,7 @@ sp_head::execute(THD *thd) if (i == NULL) break; DBUG_PRINT("execute", ("Instruction %u", ip)); thd->set_time(); // Make current_time() et al work ret= i->execute(thd, &ip); thd->rollback_item_tree_changes(); if (i->free_list) Loading Loading
mysql-test/r/sp.result +16 −0 Original line number Diff line number Diff line Loading @@ -2158,6 +2158,22 @@ call bug8116(42)| userid drop procedure bug8116| drop table t3| drop procedure if exists bug6857| create procedure bug6857(counter int) begin declare t0, t1 int; declare plus bool default 0; set t0 = current_time(); while counter > 0 do set counter = counter - 1; end while; set t1 = current_time(); if t1 > t0 then set plus = 1; end if; select plus; end| drop procedure bug6857| drop table if exists fac| create table fac (n int unsigned not null primary key, f bigint unsigned)| drop procedure if exists ifac| Loading
mysql-test/t/sp.test +31 −0 Original line number Diff line number Diff line Loading @@ -2645,6 +2645,37 @@ call bug8116(42)| drop procedure bug8116| drop table t3| # # BUG#6857: current_time() in STORED PROCEDURES # --disable_warnings drop procedure if exists bug6857| --enable_warnings create procedure bug6857(counter int) begin declare t0, t1 int; declare plus bool default 0; set t0 = current_time(); while counter > 0 do set counter = counter - 1; end while; set t1 = current_time(); if t1 > t0 then set plus = 1; end if; select plus; end| # QQ: This is currently disabled. Not only does it slow down a normal test # 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| # # Some "real" examples Loading
sql/sp_head.cc +1 −0 Original line number Diff line number Diff line Loading @@ -503,6 +503,7 @@ sp_head::execute(THD *thd) if (i == NULL) break; DBUG_PRINT("execute", ("Instruction %u", ip)); thd->set_time(); // Make current_time() et al work ret= i->execute(thd, &ip); thd->rollback_item_tree_changes(); if (i->free_list) Loading