List:Commits« Previous MessageNext Message »
From:msvensson Date:June 29 2007 12:56pm
Subject:bk commit into 5.0 tree (msvensson:1.2508) BUG#28356
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-06-29 14:56:30+02:00, msvensson@pilot.(none) +2 -0
  Bug#28356 Exec'ing "diff" from "mysqltest" loses the output, no information available
   - Add primary key to make rand comparison failsafe

  mysql-test/r/rpl_misc_functions.result@stripped, 2007-06-29 14:56:28+02:00, msvensson@pilot.(none) +10 -7
    Add a primary key to make comparison of rand values failsafe

  mysql-test/t/rpl_misc_functions.test@stripped, 2007-06-29 14:56:28+02:00, msvensson@pilot.(none) +10 -7
    Add a primary key to make comparison of rand values failsafe

diff -Nrup a/mysql-test/r/rpl_misc_functions.result b/mysql-test/r/rpl_misc_functions.result
--- a/mysql-test/r/rpl_misc_functions.result	2007-06-29 10:26:19 +02:00
+++ b/mysql-test/r/rpl_misc_functions.result	2007-06-29 14:56:28 +02:00
@@ -20,11 +20,14 @@ select * from t1, t2 where (t1.id=t2.id)
 id	i	r1	r2	p	id	i	r1	r2	p
 drop table t1;
 DROP TABLE IF EXISTS t1;
-CREATE TABLE t1 (col_a double default NULL);
+CREATE TABLE t1 (
+col_a int primary key auto_increment,
+col_b double default NULL
+);
 CREATE PROCEDURE test_replication_sp1()
 BEGIN
-INSERT INTO t1 VALUES (rand()), (rand());
-INSERT INTO t1 VALUES (rand());
+INSERT INTO t1 VALUES (NULL, rand()), (NULL, rand());
+INSERT INTO t1 VALUES (NULL, rand());
 END|
 CREATE PROCEDURE test_replication_sp2()
 BEGIN
@@ -37,14 +40,14 @@ RETURN (rand() + rand());
 END|
 CALL test_replication_sp1();
 CALL test_replication_sp2();
-INSERT INTO t1 VALUES (test_replication_sf());
-INSERT INTO t1 VALUES (test_replication_sf());
-INSERT INTO t1 VALUES (test_replication_sf());
+INSERT INTO t1 VALUES (NULL, test_replication_sf());
+INSERT INTO t1 VALUES (NULL, test_replication_sf());
+INSERT INTO t1 VALUES (NULL, test_replication_sf());
 select * from t1 into outfile "../tmp/t1_slave.txt";
 create temporary table t1_slave select * from t1 where 1=0;
 load data infile '../tmp/t1_slave.txt' into table t1_slave;
 select count(*) into @aux from t1, t1_slave
-where ABS(t1.col_a - t1_slave.col_a) < 0.0001 ;
+where t1.col_a = t1_slave.col_a and ABS(t1.col_b - t1_slave.col_b) < 0.0001;
 SELECT @aux;
 @aux
 12
diff -Nrup a/mysql-test/t/rpl_misc_functions.test b/mysql-test/t/rpl_misc_functions.test
--- a/mysql-test/t/rpl_misc_functions.test	2007-06-29 10:26:19 +02:00
+++ b/mysql-test/t/rpl_misc_functions.test	2007-06-29 14:56:28 +02:00
@@ -43,15 +43,18 @@ drop table t1;
 DROP TABLE IF EXISTS t1;
 --enable_warnings
 
-CREATE TABLE t1 (col_a double default NULL);
+CREATE TABLE t1 (
+  col_a int primary key auto_increment,
+  col_b double default NULL
+);
 
 DELIMITER |;
 
 # Use a SP that calls rand() multiple times
 CREATE PROCEDURE test_replication_sp1()
 BEGIN
- INSERT INTO t1 VALUES (rand()), (rand());
- INSERT INTO t1 VALUES (rand());
+ INSERT INTO t1 VALUES (NULL, rand()), (NULL, rand());
+ INSERT INTO t1 VALUES (NULL, rand());
 END|
 
 # Use a SP that calls another SP to call rand() multiple times
@@ -73,9 +76,9 @@ DELIMITER ;|
 # the master to those on the slave.
 CALL test_replication_sp1();
 CALL test_replication_sp2();
-INSERT INTO t1 VALUES (test_replication_sf());
-INSERT INTO t1 VALUES (test_replication_sf());
-INSERT INTO t1 VALUES (test_replication_sf());
+INSERT INTO t1 VALUES (NULL, test_replication_sf());
+INSERT INTO t1 VALUES (NULL, test_replication_sf());
+INSERT INTO t1 VALUES (NULL, test_replication_sf());
 
 --sync_slave_with_master
 
@@ -91,7 +94,7 @@ load data infile '../tmp/t1_slave.txt' i
 # Compare master and slave temp table, use subtraction
 # for floating point comparison of "double"
 select count(*) into @aux from t1, t1_slave
-where ABS(t1.col_a - t1_slave.col_a) < 0.0001 ;
+where t1.col_a = t1_slave.col_a and ABS(t1.col_b - t1_slave.col_b) < 0.0001;
 SELECT @aux;
 if (`SELECT @aux <> 12 OR @aux IS NULL`)
 {
Thread
bk commit into 5.0 tree (msvensson:1.2508) BUG#28356msvensson29 Jun