Loading include/my_dbug.h +2 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ extern FILE *_db_fp_(void); #define DBUG_ASSERT(A) assert(A) #define DBUG_EXPLAIN(buf,len) _db_explain_(0, (buf),(len)) #define DBUG_EXPLAIN_INITIAL(buf,len) _db_explain_init_((buf),(len)) #define IF_DBUG(A) A #else /* No debugger */ #define DBUG_ENTER(a1) Loading @@ -106,6 +107,7 @@ extern FILE *_db_fp_(void); #define DBUG_UNLOCK_FILE #define DBUG_EXPLAIN(buf,len) #define DBUG_EXPLAIN_INITIAL(buf,len) #define IF_DBUG(A) #endif #ifdef __cplusplus } Loading mysql-test/extra/binlog_tests/blackhole.test +15 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,21 @@ show binlog events; drop table t1,t2,t3; # #Bug#19717: DELETE Query Error on BLACKHOLE when using WHERE on column with UNIQUE INDEX # CREATE TABLE t1(a INT, b INT) ENGINE=BLACKHOLE; DELETE FROM t1 WHERE a=10; ALTER TABLE t1 ADD INDEX(a); DELETE FROM t1 WHERE a=10; ALTER TABLE t1 DROP INDEX a; ALTER TABLE t1 ADD UNIQUE INDEX(a); DELETE FROM t1 WHERE a=10; ALTER TABLE t1 DROP INDEX a; ALTER TABLE t1 ADD PRIMARY KEY(a); DELETE FROM t1 WHERE a=10; DROP TABLE t1; # End of 4.1 tests # Test that a transaction which is rolled back does not go into binlog # and that a transaction which is committed does Loading mysql-test/mysql-test-run.pl +15 −15 Original line number Diff line number Diff line Loading @@ -409,24 +409,24 @@ sub main () { { next if $test->{skip}; if (!$opt_extern) { $need_ndbcluster||= $test->{ndb_test}; $need_im||= $test->{component_id} eq 'im'; # Count max number of slaves used by a test case if ( $test->{slave_num} > $max_slave_num) { if ( $test->{slave_num} > $max_slave_num) { $max_slave_num= $test->{slave_num}; mtr_error("Too many slaves") if $max_slave_num > 3; } # Count max number of masters used by a test case if ( $test->{master_num} > $max_master_num) { if ( $test->{master_num} > $max_master_num) { $max_master_num= $test->{master_num}; mtr_error("Too many masters") if $max_master_num > 2; mtr_error("Too few masters") if $max_master_num < 1; } } $use_innodb||= $test->{'innodb_test'}; } Loading mysql-test/r/binlog_row_blackhole.result +11 −0 Original line number Diff line number Diff line Loading @@ -122,6 +122,17 @@ master-bin.000001 # Query 1 # use `test`; alter table t1 add b int master-bin.000001 # Query 1 # use `test`; alter table t1 drop b master-bin.000001 # Query 1 # use `test`; create table t3 like t1 drop table t1,t2,t3; CREATE TABLE t1(a INT, b INT) ENGINE=BLACKHOLE; DELETE FROM t1 WHERE a=10; ALTER TABLE t1 ADD INDEX(a); DELETE FROM t1 WHERE a=10; ALTER TABLE t1 DROP INDEX a; ALTER TABLE t1 ADD UNIQUE INDEX(a); DELETE FROM t1 WHERE a=10; ALTER TABLE t1 DROP INDEX a; ALTER TABLE t1 ADD PRIMARY KEY(a); DELETE FROM t1 WHERE a=10; DROP TABLE t1; reset master; create table t1 (a int) engine=blackhole; set autocommit=0; Loading mysql-test/r/binlog_stm_blackhole.result +11 −0 Original line number Diff line number Diff line Loading @@ -123,6 +123,17 @@ master-bin.000001 # Query 1 # use `test`; create table t3 like t1 master-bin.000001 # Query 1 # use `test`; insert into t1 select * from t3 master-bin.000001 # Query 1 # use `test`; replace into t1 select * from t3 drop table t1,t2,t3; CREATE TABLE t1(a INT, b INT) ENGINE=BLACKHOLE; DELETE FROM t1 WHERE a=10; ALTER TABLE t1 ADD INDEX(a); DELETE FROM t1 WHERE a=10; ALTER TABLE t1 DROP INDEX a; ALTER TABLE t1 ADD UNIQUE INDEX(a); DELETE FROM t1 WHERE a=10; ALTER TABLE t1 DROP INDEX a; ALTER TABLE t1 ADD PRIMARY KEY(a); DELETE FROM t1 WHERE a=10; DROP TABLE t1; reset master; create table t1 (a int) engine=blackhole; set autocommit=0; Loading Loading
include/my_dbug.h +2 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,7 @@ extern FILE *_db_fp_(void); #define DBUG_ASSERT(A) assert(A) #define DBUG_EXPLAIN(buf,len) _db_explain_(0, (buf),(len)) #define DBUG_EXPLAIN_INITIAL(buf,len) _db_explain_init_((buf),(len)) #define IF_DBUG(A) A #else /* No debugger */ #define DBUG_ENTER(a1) Loading @@ -106,6 +107,7 @@ extern FILE *_db_fp_(void); #define DBUG_UNLOCK_FILE #define DBUG_EXPLAIN(buf,len) #define DBUG_EXPLAIN_INITIAL(buf,len) #define IF_DBUG(A) #endif #ifdef __cplusplus } Loading
mysql-test/extra/binlog_tests/blackhole.test +15 −0 Original line number Diff line number Diff line Loading @@ -128,6 +128,21 @@ show binlog events; drop table t1,t2,t3; # #Bug#19717: DELETE Query Error on BLACKHOLE when using WHERE on column with UNIQUE INDEX # CREATE TABLE t1(a INT, b INT) ENGINE=BLACKHOLE; DELETE FROM t1 WHERE a=10; ALTER TABLE t1 ADD INDEX(a); DELETE FROM t1 WHERE a=10; ALTER TABLE t1 DROP INDEX a; ALTER TABLE t1 ADD UNIQUE INDEX(a); DELETE FROM t1 WHERE a=10; ALTER TABLE t1 DROP INDEX a; ALTER TABLE t1 ADD PRIMARY KEY(a); DELETE FROM t1 WHERE a=10; DROP TABLE t1; # End of 4.1 tests # Test that a transaction which is rolled back does not go into binlog # and that a transaction which is committed does Loading
mysql-test/mysql-test-run.pl +15 −15 Original line number Diff line number Diff line Loading @@ -409,24 +409,24 @@ sub main () { { next if $test->{skip}; if (!$opt_extern) { $need_ndbcluster||= $test->{ndb_test}; $need_im||= $test->{component_id} eq 'im'; # Count max number of slaves used by a test case if ( $test->{slave_num} > $max_slave_num) { if ( $test->{slave_num} > $max_slave_num) { $max_slave_num= $test->{slave_num}; mtr_error("Too many slaves") if $max_slave_num > 3; } # Count max number of masters used by a test case if ( $test->{master_num} > $max_master_num) { if ( $test->{master_num} > $max_master_num) { $max_master_num= $test->{master_num}; mtr_error("Too many masters") if $max_master_num > 2; mtr_error("Too few masters") if $max_master_num < 1; } } $use_innodb||= $test->{'innodb_test'}; } Loading
mysql-test/r/binlog_row_blackhole.result +11 −0 Original line number Diff line number Diff line Loading @@ -122,6 +122,17 @@ master-bin.000001 # Query 1 # use `test`; alter table t1 add b int master-bin.000001 # Query 1 # use `test`; alter table t1 drop b master-bin.000001 # Query 1 # use `test`; create table t3 like t1 drop table t1,t2,t3; CREATE TABLE t1(a INT, b INT) ENGINE=BLACKHOLE; DELETE FROM t1 WHERE a=10; ALTER TABLE t1 ADD INDEX(a); DELETE FROM t1 WHERE a=10; ALTER TABLE t1 DROP INDEX a; ALTER TABLE t1 ADD UNIQUE INDEX(a); DELETE FROM t1 WHERE a=10; ALTER TABLE t1 DROP INDEX a; ALTER TABLE t1 ADD PRIMARY KEY(a); DELETE FROM t1 WHERE a=10; DROP TABLE t1; reset master; create table t1 (a int) engine=blackhole; set autocommit=0; Loading
mysql-test/r/binlog_stm_blackhole.result +11 −0 Original line number Diff line number Diff line Loading @@ -123,6 +123,17 @@ master-bin.000001 # Query 1 # use `test`; create table t3 like t1 master-bin.000001 # Query 1 # use `test`; insert into t1 select * from t3 master-bin.000001 # Query 1 # use `test`; replace into t1 select * from t3 drop table t1,t2,t3; CREATE TABLE t1(a INT, b INT) ENGINE=BLACKHOLE; DELETE FROM t1 WHERE a=10; ALTER TABLE t1 ADD INDEX(a); DELETE FROM t1 WHERE a=10; ALTER TABLE t1 DROP INDEX a; ALTER TABLE t1 ADD UNIQUE INDEX(a); DELETE FROM t1 WHERE a=10; ALTER TABLE t1 DROP INDEX a; ALTER TABLE t1 ADD PRIMARY KEY(a); DELETE FROM t1 WHERE a=10; DROP TABLE t1; reset master; create table t1 (a int) engine=blackhole; set autocommit=0; Loading