Commit 762b39f8 authored by Alfranio Correia's avatar Alfranio Correia

BUG#48091 valgrind errors when slave has double not null and master has double null

      
Backporting BUG#43789 to mysql-5.1-bugteam

Post-fix for BUG#43789.
parent 4f164c4c
...@@ -81,13 +81,13 @@ source include/diff_tables.inc; ...@@ -81,13 +81,13 @@ source include/diff_tables.inc;
--echo TABLES t2 and t3 must be different. --echo TABLES t2 and t3 must be different.
connection master; connection master;
SELECT * FROM t3; SELECT * FROM t3 ORDER BY a;
connection slave; connection slave;
SELECT * FROM t3; SELECT * FROM t3 ORDER BY a;
connection master; connection master;
SELECT * FROM t4; SELECT * FROM t4 ORDER BY a;
connection slave; connection slave;
SELECT * FROM t4; SELECT * FROM t4 ORDER BY a;
--echo ************* EXECUTION WITH UPDATES and REPLACES ************* --echo ************* EXECUTION WITH UPDATES and REPLACES *************
connection master; connection master;
...@@ -139,9 +139,9 @@ INSERT INTO t1(a) VALUES (5); ...@@ -139,9 +139,9 @@ INSERT INTO t1(a) VALUES (5);
--echo TABLES t1 and t2 must be different. --echo TABLES t1 and t2 must be different.
sync_slave_with_master; sync_slave_with_master;
connection master; connection master;
SELECT a,b+0,c+0 FROM t1; SELECT a,b+0,c+0 FROM t1 ORDER BY a;
connection slave; connection slave;
SELECT a,b+0,c+0 FROM t1; SELECT a,b+0,c+0 FROM t1 ORDER BY a;
--echo ************* EXECUTION WITH UPDATES and REPLACES ************* --echo ************* EXECUTION WITH UPDATES and REPLACES *************
connection master; connection master;
...@@ -262,17 +262,17 @@ sync_slave_with_master; ...@@ -262,17 +262,17 @@ sync_slave_with_master;
# connection slave; # connection slave;
# --source include/wait_for_slave_sql_to_stop.inc # --source include/wait_for_slave_sql_to_stop.inc
# connection master; # connection master;
# SELECT * FROM t1; # SELECT * FROM t1 ORDER BY a;
# connection slave; # connection slave;
# SELECT * FROM t1; # SELECT * FROM t1 ORDER BY a;
# connection master; # connection master;
# SELECT * FROM t2; # SELECT * FROM t2 ORDER BY a;
# connection slave; # connection slave;
# SELECT * FROM t2; # SELECT * FROM t2 ORDER BY a;
# connection master; # connection master;
# SELECT * FROM t3; # SELECT * FROM t3 ORDER BY a;
# connection slave; # connection slave;
# SELECT * FROM t3; # SELECT * FROM t3 ORDER BY a;
# --source include/reset_master_and_slave.inc # --source include/reset_master_and_slave.inc
# #
# connection master; # connection master;
...@@ -343,17 +343,17 @@ connection master; ...@@ -343,17 +343,17 @@ connection master;
sync_slave_with_master; sync_slave_with_master;
connection master; connection master;
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
connection slave; connection slave;
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
connection master; connection master;
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
connection slave; connection slave;
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
connection master; connection master;
SELECT * FROM t3; SELECT * FROM t3 ORDER BY a;
connection slave; connection slave;
SELECT * FROM t3; SELECT * FROM t3 ORDER BY a;
connection master; connection master;
......
...@@ -48,24 +48,24 @@ TABLES t1 and t2 must be equal otherwise an error will be thrown. ...@@ -48,24 +48,24 @@ TABLES t1 and t2 must be equal otherwise an error will be thrown.
Comparing tables master:test.t1 and slave:test.t1 Comparing tables master:test.t1 and slave:test.t1
Comparing tables master:test.t2 and slave:test.t2 Comparing tables master:test.t2 and slave:test.t2
TABLES t2 and t3 must be different. TABLES t2 and t3 must be different.
SELECT * FROM t3; SELECT * FROM t3 ORDER BY a;
a b a b
1 NULL 1 NULL
2 1111-11-11 2 1111-11-11
3 NULL 3 NULL
SELECT * FROM t3; SELECT * FROM t3 ORDER BY a;
a b c a b c
1 NULL 500 1 NULL 500
2 1111-11-11 500 2 1111-11-11 500
3 NULL 500 3 NULL 500
SELECT * FROM t4; SELECT * FROM t4 ORDER BY a;
a b c a b c
1 NULL 1 1 NULL 1
2 1111-11-11 2 2 1111-11-11 2
3 NULL NULL 3 NULL NULL
4 NULL 4 4 NULL 4
5 NULL NULL 5 NULL NULL
SELECT * FROM t4; SELECT * FROM t4 ORDER BY a;
a b a b
1 NULL 1 NULL
2 1111-11-11 2 1111-11-11
...@@ -100,14 +100,14 @@ INSERT INTO t1(a,c) VALUES (4, b'01'); ...@@ -100,14 +100,14 @@ INSERT INTO t1(a,c) VALUES (4, b'01');
INSERT INTO t1(a) VALUES (5); INSERT INTO t1(a) VALUES (5);
************* SHOWING THE RESULT SETS WITH INSERTS ************* ************* SHOWING THE RESULT SETS WITH INSERTS *************
TABLES t1 and t2 must be different. TABLES t1 and t2 must be different.
SELECT a,b+0,c+0 FROM t1; SELECT a,b+0,c+0 FROM t1 ORDER BY a;
a b+0 c+0 a b+0 c+0
1 NULL 1 1 NULL 1
2 0 1 2 0 1
3 NULL NULL 3 NULL NULL
4 NULL 1 4 NULL 1
5 NULL NULL 5 NULL NULL
SELECT a,b+0,c+0 FROM t1; SELECT a,b+0,c+0 FROM t1 ORDER BY a;
a b+0 c+0 a b+0 c+0
1 NULL 1 1 NULL 1
2 0 1 2 0 1
...@@ -163,34 +163,34 @@ REPLACE INTO t3(a, b) VALUES (5, null); ...@@ -163,34 +163,34 @@ REPLACE INTO t3(a, b) VALUES (5, null);
REPLACE INTO t3(a, b) VALUES (3, null); REPLACE INTO t3(a, b) VALUES (3, null);
UPDATE t3 SET b = NULL where a = 4; UPDATE t3 SET b = NULL where a = 4;
************* SHOWING THE RESULT SETS ************* ************* SHOWING THE RESULT SETS *************
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
1 NULL 1 NULL
2 NULL 2 NULL
3 1 3 1
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b c a b c
1 0 0 1 0 0
2 0 0 2 0 0
3 1 0 3 1 0
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
1 NULL 1 NULL
2 NULL 2 NULL
3 1 3 1
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b c a b c
1 0 NULL 1 0 NULL
2 0 NULL 2 0 NULL
3 1 NULL 3 1 NULL
SELECT * FROM t3; SELECT * FROM t3 ORDER BY a;
a b a b
1 NULL 1 NULL
2 NULL 2 NULL
3 NULL 3 NULL
4 NULL 4 NULL
5 NULL 5 NULL
SELECT * FROM t3; SELECT * FROM t3 ORDER BY a;
a b c a b c
1 0 500 1 0 500
2 0 500 2 0 500
......
...@@ -48,24 +48,24 @@ TABLES t1 and t2 must be equal otherwise an error will be thrown. ...@@ -48,24 +48,24 @@ TABLES t1 and t2 must be equal otherwise an error will be thrown.
Comparing tables master:test.t1 and slave:test.t1 Comparing tables master:test.t1 and slave:test.t1
Comparing tables master:test.t2 and slave:test.t2 Comparing tables master:test.t2 and slave:test.t2
TABLES t2 and t3 must be different. TABLES t2 and t3 must be different.
SELECT * FROM t3; SELECT * FROM t3 ORDER BY a;
a b a b
1 NULL 1 NULL
2 1111-11-11 2 1111-11-11
3 NULL 3 NULL
SELECT * FROM t3; SELECT * FROM t3 ORDER BY a;
a b c a b c
1 NULL 500 1 NULL 500
2 1111-11-11 500 2 1111-11-11 500
3 NULL 500 3 NULL 500
SELECT * FROM t4; SELECT * FROM t4 ORDER BY a;
a b c a b c
1 NULL 1 1 NULL 1
2 1111-11-11 2 2 1111-11-11 2
3 NULL NULL 3 NULL NULL
4 NULL 4 4 NULL 4
5 NULL NULL 5 NULL NULL
SELECT * FROM t4; SELECT * FROM t4 ORDER BY a;
a b a b
1 NULL 1 NULL
2 1111-11-11 2 1111-11-11
...@@ -100,14 +100,14 @@ INSERT INTO t1(a,c) VALUES (4, b'01'); ...@@ -100,14 +100,14 @@ INSERT INTO t1(a,c) VALUES (4, b'01');
INSERT INTO t1(a) VALUES (5); INSERT INTO t1(a) VALUES (5);
************* SHOWING THE RESULT SETS WITH INSERTS ************* ************* SHOWING THE RESULT SETS WITH INSERTS *************
TABLES t1 and t2 must be different. TABLES t1 and t2 must be different.
SELECT a,b+0,c+0 FROM t1; SELECT a,b+0,c+0 FROM t1 ORDER BY a;
a b+0 c+0 a b+0 c+0
1 NULL 1 1 NULL 1
2 0 1 2 0 1
3 NULL NULL 3 NULL NULL
4 NULL 1 4 NULL 1
5 NULL NULL 5 NULL NULL
SELECT a,b+0,c+0 FROM t1; SELECT a,b+0,c+0 FROM t1 ORDER BY a;
a b+0 c+0 a b+0 c+0
1 NULL 1 1 NULL 1
2 0 1 2 0 1
...@@ -163,34 +163,34 @@ REPLACE INTO t3(a, b) VALUES (5, null); ...@@ -163,34 +163,34 @@ REPLACE INTO t3(a, b) VALUES (5, null);
REPLACE INTO t3(a, b) VALUES (3, null); REPLACE INTO t3(a, b) VALUES (3, null);
UPDATE t3 SET b = NULL where a = 4; UPDATE t3 SET b = NULL where a = 4;
************* SHOWING THE RESULT SETS ************* ************* SHOWING THE RESULT SETS *************
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b a b
1 NULL 1 NULL
2 NULL 2 NULL
3 1 3 1
SELECT * FROM t1; SELECT * FROM t1 ORDER BY a;
a b c a b c
1 0 0 1 0 0
2 0 0 2 0 0
3 1 0 3 1 0
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b a b
1 NULL 1 NULL
2 NULL 2 NULL
3 1 3 1
SELECT * FROM t2; SELECT * FROM t2 ORDER BY a;
a b c a b c
1 0 NULL 1 0 NULL
2 0 NULL 2 0 NULL
3 1 NULL 3 1 NULL
SELECT * FROM t3; SELECT * FROM t3 ORDER BY a;
a b a b
1 NULL 1 NULL
2 NULL 2 NULL
3 NULL 3 NULL
4 NULL 4 NULL
5 NULL 5 NULL
SELECT * FROM t3; SELECT * FROM t3 ORDER BY a;
a b c a b c
1 0 500 1 0 500
2 0 500 2 0 500
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment