Browse Source
Manual merge of mysql-5.1-bugteam to mysql-trunk-merge.
Manual merge of mysql-5.1-bugteam to mysql-trunk-merge.
Conflicts: conflict Makefile.am conflict mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result conflict mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test conflict sql/opt_sum.cc conflict sql/set_var.cc conflict sql/sql_base.cc conflict sql/sql_priv.h conflict sql/sql_show.ccpull/73/head
38 changed files with 785 additions and 270 deletions
-
4Makefile.am
-
3dbug/dbug.c
-
2mysql-test/extra/binlog_tests/mix_innodb_myisam_side_effects.test
-
68mysql-test/extra/rpl_tests/rpl_record_compare.test
-
9mysql-test/r/delete.result
-
20mysql-test/r/group_by.result
-
33mysql-test/r/log_state.result
-
2mysql-test/r/renamedb.result
-
28mysql-test/r/upgrade.result
-
2mysql-test/r/variables_debug.result
-
4mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result
-
2mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result
-
46mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result
-
60mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result
-
32mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result
-
10mysql-test/suite/rpl/t/rpl_row_rec_comp_innodb.test
-
31mysql-test/suite/rpl/t/rpl_row_rec_comp_myisam.test
-
38mysql-test/suite/rpl/t/rpl_stm_mixing_engines.test
-
4mysql-test/suite/rpl_ndb/my.cnf
-
1mysql-test/suite/rpl_ndb/r/rpl_ndb_stm_innodb.result
-
4mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test
-
12mysql-test/t/delete.test
-
15mysql-test/t/group_by.test
-
38mysql-test/t/log_state.test
-
1mysql-test/t/mysqldump.test
-
2mysql-test/t/renamedb.test
-
34mysql-test/t/upgrade.test
-
3mysql-test/t/variables_debug.test
-
34sql/log_event.cc
-
36sql/log_event_old.cc
-
298sql/opt_sum.cc
-
11sql/sql_class.h
-
4sql/sql_delete.cc
-
103sql/sql_show.cc
-
23sql/sql_table.cc
-
1sql/sql_table.h
-
3sql/sql_update.cc
-
34sql/table.cc
@ -0,0 +1,68 @@ |
|||
|
|||
# |
|||
# BUG#52868: Wrong handling of NULL value during update, replication out of sync |
|||
# |
|||
-- echo ## case #1 - last_null_bit_pos==0 in record_compare without X bit |
|||
|
|||
-- source include/master-slave-reset.inc |
|||
-- connection master |
|||
|
|||
-- eval CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 varchar(1) DEFAULT '', c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0, c8 bigint(20) DEFAULT 0) ENGINE=$engine DEFAULT CHARSET=latin1 |
|||
|
|||
INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); |
|||
INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); |
|||
-- disable_warnings |
|||
UPDATE t1 SET c5 = 'a'; |
|||
-- enable_warnings |
|||
-- sync_slave_with_master |
|||
|
|||
-- let $diff_table_1= master:test.t1 |
|||
-- let $diff_table_2= slave:test.t1 |
|||
-- source include/diff_tables.inc |
|||
|
|||
--connection master |
|||
DROP TABLE t1; |
|||
-- sync_slave_with_master |
|||
|
|||
-- echo ## case #1.1 - last_null_bit_pos==0 in record_compare with X bit |
|||
-- echo ## (1 column less and no varchar) |
|||
-- source include/master-slave-reset.inc |
|||
-- connection master |
|||
|
|||
-- eval CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 bigint(20) DEFAULT 0, c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0) ENGINE=$engine DEFAULT CHARSET=latin1 |
|||
|
|||
INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); |
|||
INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); |
|||
-- disable_warnings |
|||
UPDATE t1 SET c5 = 'a'; |
|||
-- enable_warnings |
|||
-- sync_slave_with_master |
|||
|
|||
-- let $diff_table_1= master:test.t1 |
|||
-- let $diff_table_2= slave:test.t1 |
|||
-- source include/diff_tables.inc |
|||
|
|||
--connection master |
|||
DROP TABLE t1; |
|||
-- sync_slave_with_master |
|||
|
|||
-- echo ## case #2 - X bit is wrongly set. |
|||
|
|||
-- source include/master-slave-reset.inc |
|||
-- connection master |
|||
|
|||
-- eval CREATE TABLE t1 (c1 int, c2 varchar(1) default '') ENGINE=$engine DEFAULT CHARSET= latin1 |
|||
INSERT INTO t1(c1) VALUES (10); |
|||
INSERT INTO t1(c1) VALUES (NULL); |
|||
UPDATE t1 SET c1= 0; |
|||
-- sync_slave_with_master |
|||
|
|||
-- let $diff_table_1= master:test.t1 |
|||
-- let $diff_table_2= slave:test.t1 |
|||
-- source include/diff_tables.inc |
|||
|
|||
-- connection master |
|||
DROP TABLE t1; |
|||
-- sync_slave_with_master |
|||
|
|||
|
|||
@ -0,0 +1,46 @@ |
|||
stop slave; |
|||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; |
|||
reset master; |
|||
reset slave; |
|||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; |
|||
start slave; |
|||
## case #1 - last_null_bit_pos==0 in record_compare without X bit |
|||
stop slave; |
|||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; |
|||
reset master; |
|||
reset slave; |
|||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; |
|||
start slave; |
|||
CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 varchar(1) DEFAULT '', c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0, c8 bigint(20) DEFAULT 0) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
|||
INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); |
|||
INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); |
|||
UPDATE t1 SET c5 = 'a'; |
|||
Comparing tables master:test.t1 and slave:test.t1 |
|||
DROP TABLE t1; |
|||
## case #1.1 - last_null_bit_pos==0 in record_compare with X bit |
|||
## (1 column less and no varchar) |
|||
stop slave; |
|||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; |
|||
reset master; |
|||
reset slave; |
|||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; |
|||
start slave; |
|||
CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 bigint(20) DEFAULT 0, c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0) ENGINE=InnoDB DEFAULT CHARSET=latin1; |
|||
INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); |
|||
INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); |
|||
UPDATE t1 SET c5 = 'a'; |
|||
Comparing tables master:test.t1 and slave:test.t1 |
|||
DROP TABLE t1; |
|||
## case #2 - X bit is wrongly set. |
|||
stop slave; |
|||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; |
|||
reset master; |
|||
reset slave; |
|||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; |
|||
start slave; |
|||
CREATE TABLE t1 (c1 int, c2 varchar(1) default '') ENGINE=InnoDB DEFAULT CHARSET= latin1; |
|||
INSERT INTO t1(c1) VALUES (10); |
|||
INSERT INTO t1(c1) VALUES (NULL); |
|||
UPDATE t1 SET c1= 0; |
|||
Comparing tables master:test.t1 and slave:test.t1 |
|||
DROP TABLE t1; |
|||
@ -0,0 +1,60 @@ |
|||
stop slave; |
|||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; |
|||
reset master; |
|||
reset slave; |
|||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; |
|||
start slave; |
|||
## case #1 - last_null_bit_pos==0 in record_compare without X bit |
|||
stop slave; |
|||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; |
|||
reset master; |
|||
reset slave; |
|||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; |
|||
start slave; |
|||
CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 varchar(1) DEFAULT '', c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0, c8 bigint(20) DEFAULT 0) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
|||
INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); |
|||
INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); |
|||
UPDATE t1 SET c5 = 'a'; |
|||
Comparing tables master:test.t1 and slave:test.t1 |
|||
DROP TABLE t1; |
|||
## case #1.1 - last_null_bit_pos==0 in record_compare with X bit |
|||
## (1 column less and no varchar) |
|||
stop slave; |
|||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; |
|||
reset master; |
|||
reset slave; |
|||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; |
|||
start slave; |
|||
CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 bigint(20) DEFAULT 0, c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
|||
INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 ); |
|||
INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 ); |
|||
UPDATE t1 SET c5 = 'a'; |
|||
Comparing tables master:test.t1 and slave:test.t1 |
|||
DROP TABLE t1; |
|||
## case #2 - X bit is wrongly set. |
|||
stop slave; |
|||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; |
|||
reset master; |
|||
reset slave; |
|||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; |
|||
start slave; |
|||
CREATE TABLE t1 (c1 int, c2 varchar(1) default '') ENGINE=MyISAM DEFAULT CHARSET= latin1; |
|||
INSERT INTO t1(c1) VALUES (10); |
|||
INSERT INTO t1(c1) VALUES (NULL); |
|||
UPDATE t1 SET c1= 0; |
|||
Comparing tables master:test.t1 and slave:test.t1 |
|||
DROP TABLE t1; |
|||
## coverage purposes - Field_bits |
|||
## 1 X bit + 2 Null bits + 5 bits => last_null_bit_pos==0 |
|||
stop slave; |
|||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; |
|||
reset master; |
|||
reset slave; |
|||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; |
|||
start slave; |
|||
CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bit(5)) ENGINE=MyISAM DEFAULT CHARSET=latin1; |
|||
INSERT INTO t1(c1,c2) VALUES (10, b'1'); |
|||
INSERT INTO t1(c1,c2) VALUES (NULL, b'1'); |
|||
UPDATE t1 SET c1= 0; |
|||
Comparing tables master:test.t1 and slave:test.t1 |
|||
DROP TABLE t1; |
|||
@ -0,0 +1,10 @@ |
|||
-- source include/have_binlog_format_row.inc |
|||
-- source include/master-slave.inc |
|||
-- source include/have_innodb.inc |
|||
|
|||
# |
|||
# BUG#52868 Wrong handling of NULL value during update, replication out of sync |
|||
# |
|||
|
|||
-- let $engine= InnoDB |
|||
-- source extra/rpl_tests/rpl_record_compare.test |
|||
@ -0,0 +1,31 @@ |
|||
-- source include/have_binlog_format_row.inc |
|||
-- source include/master-slave.inc |
|||
|
|||
# |
|||
# BUG#52868 Wrong handling of NULL value during update, replication out of sync |
|||
# |
|||
|
|||
-- let $engine= MyISAM |
|||
-- source extra/rpl_tests/rpl_record_compare.test |
|||
|
|||
-- echo ## coverage purposes - Field_bits |
|||
-- echo ## 1 X bit + 2 Null bits + 5 bits => last_null_bit_pos==0 |
|||
## Added here because AFAIK it's only MyISAM and NDB that use Field_bits |
|||
|
|||
-- source include/master-slave-reset.inc |
|||
-- connection master |
|||
|
|||
-- eval CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bit(5)) ENGINE=$engine DEFAULT CHARSET=latin1 |
|||
|
|||
INSERT INTO t1(c1,c2) VALUES (10, b'1'); |
|||
INSERT INTO t1(c1,c2) VALUES (NULL, b'1'); |
|||
UPDATE t1 SET c1= 0; |
|||
-- sync_slave_with_master |
|||
|
|||
-- let $diff_table_1= master:test.t1 |
|||
-- let $diff_table_2= slave:test.t1 |
|||
-- source include/diff_tables.inc |
|||
|
|||
-- connection master |
|||
DROP TABLE t1; |
|||
-- sync_slave_with_master |
|||
Write
Preview
Loading…
Cancel
Save
Reference in new issue