Below is the list of changes that have just been committed into a local
5.1 repository of tsmith. When tsmith 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-07-04 12:26:39-06:00, tsmith@stripped +2 -0
rpl_misc_functions.result, rpl_misc_functions.test:
Remove indeterministic behavior from a test
mysql-test/suite/rpl/r/rpl_misc_functions.result@stripped, 2007-07-04 12:26:17-06:00, tsmith@stripped +9 -8
Remove indeterministic behavior from a test
mysql-test/suite/rpl/t/rpl_misc_functions.test@stripped, 2007-07-04 12:26:17-06:00, tsmith@stripped +11 -10
Remove indeterministic behavior from a test
diff -Nrup a/mysql-test/suite/rpl/r/rpl_misc_functions.result b/mysql-test/suite/rpl/r/rpl_misc_functions.result
--- a/mysql-test/suite/rpl/r/rpl_misc_functions.result 2007-07-03 19:51:17 -06:00
+++ b/mysql-test/suite/rpl/r/rpl_misc_functions.result 2007-07-04 12:26:17 -06:00
@@ -20,11 +20,12 @@ 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 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
+col_a DOUBLE DEFAULT NULL);
CREATE PROCEDURE test_replication_sp1()
BEGIN
-INSERT INTO t1 VALUES (rand()), (rand());
-INSERT INTO t1 VALUES (rand());
+INSERT INTO t1 (col_a) VALUES (rand()), (rand());
+INSERT INTO t1 (col_a) VALUES (rand());
END|
CREATE PROCEDURE test_replication_sp2()
BEGIN
@@ -37,14 +38,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 (col_a) VALUES (test_replication_sf());
+INSERT INTO t1 (col_a) VALUES (test_replication_sf());
+INSERT INTO t1 (col_a) VALUES (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 ;
+select count(*) into @aux from t1 join t1_slave using (id)
+where ABS(t1.col_a - t1_slave.col_a) < 0.0000001 ;
SELECT @aux;
@aux
12
diff -Nrup a/mysql-test/suite/rpl/t/rpl_misc_functions.test b/mysql-test/suite/rpl/t/rpl_misc_functions.test
--- a/mysql-test/suite/rpl/t/rpl_misc_functions.test 2007-07-03 19:51:17 -06:00
+++ b/mysql-test/suite/rpl/t/rpl_misc_functions.test 2007-07-04 12:26:17 -06:00
@@ -43,15 +43,16 @@ drop table t1;
DROP TABLE IF EXISTS t1;
--enable_warnings
-CREATE TABLE t1 (col_a double default NULL);
+CREATE TABLE t1 (id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
+ col_a 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 (col_a) VALUES (rand()), (rand());
+ INSERT INTO t1 (col_a) VALUES (rand());
END|
# Use a SP that calls another SP to call rand() multiple times
@@ -73,9 +74,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 (col_a) VALUES (test_replication_sf());
+INSERT INTO t1 (col_a) VALUES (test_replication_sf());
+INSERT INTO t1 (col_a) VALUES (test_replication_sf());
--sync_slave_with_master
@@ -90,14 +91,14 @@ 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 ;
+select count(*) into @aux from t1 join t1_slave using (id)
+where ABS(t1.col_a - t1_slave.col_a) < 0.0000001 ;
SELECT @aux;
if (`SELECT @aux <> 12 OR @aux IS NULL`)
{
--echo # ERROR: We expected to get count(*) = 12.
- SELECT col_a FROM t1;
- SELECT col_a FROM t1_slave;
+ SELECT id, col_a FROM t1;
+ SELECT id, col_a FROM t1_slave;
--echo # abort
exit;
}
| Thread |
|---|
| • bk commit into 5.1 tree (tsmith:1.2536) | tim | 4 Jul |