List:Commits« Previous MessageNext Message »
From:Sneha Modi Date:December 21 2011 1:33pm
Subject:bzr push into mysql-5.5 branch (sneha.modi:3657 to 3658) Bug#6857
Bug#11754150
View as plain text  
 3658 Sneha Modi	2011-12-21
      Bug#11754150: A TEST CASE FOR BUG#6857 IS DISABLED IN SP.TEST
      
      Unix_timestamp for time comparison has some problems...Re-using current_time for 
      time comparison.

    modified:
      mysql-test/r/sp.result
      mysql-test/t/sp.test
 3657 Sneha Modi	2011-12-21
      Bug#11754150: A TEST CASE FOR BUG#6857 IS DISABLED IN SP.TEST
      
      The time comparison using current_time() stored in an int variable was giving wrong results as 
      the current_time() format as an int implementation has been changed in mysql-trunk but not in mysql-5.5.
      
      The time is stored in the format hh:mm:ss as 'time' datatype.But as an int, it is stored as hhmmss,
      but only on the trunk. On mysql-5.5,as an int, it is stored as hh.
      Hence, the current_time() function has been changed to unix_timestamp() function.

    modified:
      mysql-test/r/sp.result
      mysql-test/t/sp.test
=== modified file 'mysql-test/r/sp.result'
--- a/mysql-test/r/sp.result	2011-12-21 09:44:55 +0000
+++ b/mysql-test/r/sp.result	2011-12-21 13:30:07 +0000
@@ -2776,19 +2776,16 @@ create procedure bug6857(counter int)
 begin
 declare t0, t1 int;
 declare plus bool default 0;
-set t0 = unix_timestamp();
+set t0 = current_time();
 while counter > 0 do
 set counter = counter - 1;
 end while;
-set t1 = unix_timestamp();
+set t1 = current_time();
 if t1 > t0 then
 set plus = 1;
 end if;
 select plus;
 end|
-call bug6857(300000)|
-plus
-1
 drop procedure bug6857|
 drop procedure if exists bug8757|
 create procedure bug8757()

=== modified file 'mysql-test/t/sp.test'
--- a/mysql-test/t/sp.test	2011-12-21 09:44:55 +0000
+++ b/mysql-test/t/sp.test	2011-12-21 13:30:07 +0000
@@ -3341,11 +3341,11 @@ begin
   declare t0, t1 int;
   declare plus bool default 0;
 
-  set t0 = unix_timestamp();
+  set t0 = current_time();
   while counter > 0 do
     set counter = counter - 1;
   end while;
-  set t1 = unix_timestamp();
+  set t1 = current_time();
   if t1 > t0 then
     set plus = 1;
   end if;
@@ -3357,7 +3357,7 @@ end|
 #     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)|
+#call bug6857(300000)|
 
 drop procedure bug6857|
 

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.5 branch (sneha.modi:3657 to 3658) Bug#6857Bug#11754150Sneha Modi21 Dec