diff options
author | Michael Widenius <monty@askmonty.org> | 2012-09-22 17:11:40 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2012-09-22 17:11:40 +0300 |
commit | 620d14f8c3521f9ec7283b8690e0e16434739d33 (patch) | |
tree | b3438fd90e14b3be2ec21e53cca37cd795090a00 /mysql-test/extra | |
parent | 288eeb3a31e4bfb52180f3906a4d354ac9cc457e (diff) | |
parent | 3e83c4e8f90851040be921443b52144a2862444a (diff) | |
download | mariadb-git-620d14f8c3521f9ec7283b8690e0e16434739d33.tar.gz |
Automatic merge
Diffstat (limited to 'mysql-test/extra')
4 files changed, 50 insertions, 5 deletions
diff --git a/mysql-test/extra/binlog_tests/binlog.test b/mysql-test/extra/binlog_tests/binlog.test index 3bbc693ceda..5b57eab1005 100644 --- a/mysql-test/extra/binlog_tests/binlog.test +++ b/mysql-test/extra/binlog_tests/binlog.test @@ -205,16 +205,55 @@ DROP PROCEDURE p4; --echo End of 5.0 tests -# Test of a too big SET INSERT_ID: see if the truncated value goes -# into binlog (right), or the too big value (wrong); we look at the -# binlog further down with SHOW BINLOG EVENTS. +# Test of a too big SET INSERT_ID. +# This should generate an error and should not be put in binlog +# We look at the binlog further down with SHOW BINLOG EVENTS. + reset master; create table t1 (id tinyint auto_increment primary key); +insert into t1 values(5); +set insert_id=128; +--error 167 +insert into t1 values(null) /* Not binlogged */; + +# The followin insert ignore will be put in binlog set insert_id=128; -insert into t1 values(null); +insert ignore into t1 values(null) /* Insert 128 */; + +# Insert with duplicate key error should not go into binglo +set insert_id=5; +--error ER_DUP_ENTRY +insert into t1 values(null) /* Not binlogged */; + +# Insert with autogenerated key + duplicate key error should go into binlog +set insert_id=5; +insert ignore into t1 values(null) /* Insert 5 */; select * from t1; drop table t1; +# Same tests but with 2 rows inserted at a time + +create table t1 (id tinyint auto_increment primary key) engine=myisam; +set insert_id=128; +--error 167 +insert into t1 values(5),(null) /* Insert_id 128 */; + +# The followin insert ignore will be put in binlog +set insert_id=128; +insert ignore into t1 values (4),(null) /* Insert_id 128 */; + +# Insert with duplicate key error should not go into binglo +set insert_id=5; +--error ER_DUP_ENTRY +insert into t1 values(3),(null) /* Insert_id 5 */; + +# Insert with autogenerated key + duplicate key error should go into binlog +set insert_id=5; +insert ignore into t1 values(2),(null) /* Insert_id 5 */; +select * from t1 order by id; +drop table t1; + + # bug#22027 create table t1 (a int); create table if not exists t2 select * from t1; diff --git a/mysql-test/extra/binlog_tests/binlog_insert_delayed.test b/mysql-test/extra/binlog_tests/binlog_insert_delayed.test index 7b31a3ebf17..8f669fc1152 100644 --- a/mysql-test/extra/binlog_tests/binlog_insert_delayed.test +++ b/mysql-test/extra/binlog_tests/binlog_insert_delayed.test @@ -28,6 +28,7 @@ # BUG#20627: INSERT DELAYED does not honour auto_increment_* variables # Bug in this test: BUG#38068: binlog_stm_binlog fails sporadically in pushbuild +reset master; create table t1 (a int not null auto_increment, primary key (a)) engine=myisam; diff --git a/mysql-test/extra/rpl_tests/rpl_auto_increment.test b/mysql-test/extra/rpl_tests/rpl_auto_increment.test index bd5943d46ea..8cd86de8040 100644 --- a/mysql-test/extra/rpl_tests/rpl_auto_increment.test +++ b/mysql-test/extra/rpl_tests/rpl_auto_increment.test @@ -111,7 +111,7 @@ set auto_increment_increment=11; set auto_increment_offset=4; insert into t1 values(null); insert into t1 values(null); ---error ER_DUP_ENTRY +--error 167 insert into t1 values(null); select a, mod(a-@@auto_increment_offset,@@auto_increment_increment) from t1 order by a; @@ -120,6 +120,8 @@ create table t2 (a tinyint unsigned not null auto_increment primary key) engine= set auto_increment_increment=10; set auto_increment_offset=1; set insert_id=1000; +insert into t2 values(10); +--error 167 insert into t2 values(null); select a, mod(a-@@auto_increment_offset,@@auto_increment_increment) from t2 order by a; @@ -127,6 +129,7 @@ select a, mod(a-@@auto_increment_offset,@@auto_increment_increment) from t2 orde create table t3 like t1; set auto_increment_increment=1000; set auto_increment_offset=700; +--error 167 insert into t3 values(null); select * from t3 order by a; sync_slave_with_master; diff --git a/mysql-test/extra/rpl_tests/rpl_insert_delayed.test b/mysql-test/extra/rpl_tests/rpl_insert_delayed.test index bb34f4be207..2dbba38166b 100644 --- a/mysql-test/extra/rpl_tests/rpl_insert_delayed.test +++ b/mysql-test/extra/rpl_tests/rpl_insert_delayed.test @@ -102,7 +102,9 @@ CREATE TABLE t1(a int, UNIQUE(a)); --let $_start= query_get_value(SHOW MASTER STATUS, Position, 1) INSERT DELAYED IGNORE INTO t1 VALUES(1); +--disable_warnings INSERT DELAYED IGNORE INTO t1 VALUES(1); +--enable_warnings flush table t1; # to wait for INSERT DELAYED to be done if (`SELECT @@global.binlog_format = 'STATEMENT'`) { |