diff options
author | unknown <gkodinov/kgeorge@magare.gmz> | 2007-07-30 19:02:21 +0300 |
---|---|---|
committer | unknown <gkodinov/kgeorge@magare.gmz> | 2007-07-30 19:02:21 +0300 |
commit | e5fd6b3c71d3ac5c0d0f2d46cdc301dc99390022 (patch) | |
tree | 7da108a5ff817f9b4aec681922a904983e5f804b /mysql-test/suite | |
parent | c0b65fb77dcb7010056dff7e476b7397dd912c89 (diff) | |
parent | 1307d3b8033985d842b900ec8ebe7be9f0a4e092 (diff) | |
download | mariadb-git-e5fd6b3c71d3ac5c0d0f2d46cdc301dc99390022.tar.gz |
(Pushing for Andrei)
Merge magare.gmz:/home/kgeorge/mysql/work/B27417-5.0-opt
into magare.gmz:/home/kgeorge/mysql/work/B27417-5.1-opt
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_table.cc:
Auto merged
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
merge of bug 27471 from 5.0-opt to 5.1-opt
sql/log.cc:
merge of bug 27471 from 5.0-opt to 5.1-opt
sql/set_var.cc:
merge of bug 27471 from 5.0-opt to 5.1-opt
sql/sp_head.cc:
merge of bug 27471 from 5.0-opt to 5.1-opt
sql/sql_delete.cc:
merge of bug 27471 from 5.0-opt to 5.1-opt
sql/sql_insert.cc:
merge of bug 27471 from 5.0-opt to 5.1-opt
sql/sql_load.cc:
merge of bug 27471 from 5.0-opt to 5.1-opt
sql/sql_parse.cc:
merge of bug 27471 from 5.0-opt to 5.1-opt
sql/sql_update.cc:
merge of bug 27471 from 5.0-opt to 5.1-opt
Diffstat (limited to 'mysql-test/suite')
-rw-r--r-- | mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result | 113 |
1 files changed, 113 insertions, 0 deletions
diff --git a/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result b/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result index c74fb17d600..56dee7838cd 100644 --- a/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result +++ b/mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result @@ -380,3 +380,116 @@ select @a like "%#%error_code=0%ROLLBACK/*!*/;%ROLLBACK /* added by mysqlbinlog */;%" @a not like "%#%error_code=%error_code=%" 1 1 drop table t1, t2; +create temporary table tt (a int unique); +create table ti (a int) engine=innodb; +reset master; +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 98 +begin; +insert into ti values (1); +insert into ti values (2) ; +insert into tt select * from ti; +rollback; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +select count(*) from tt /* 2 */; +count(*) +2 +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 507 +show binlog events from 98; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; BEGIN +master-bin.000001 # Query 1 # use `test`; insert into ti values (1) +master-bin.000001 # Query 1 # use `test`; insert into ti values (2) +master-bin.000001 # Query 1 # use `test`; insert into tt select * from ti +master-bin.000001 # Query 1 # use `test`; ROLLBACK +select count(*) from ti /* zero */; +count(*) +0 +insert into ti select * from tt; +select * from ti /* that is what slave would miss - a bug */; +a +1 +2 +delete from ti; +delete from tt where a=1; +reset master; +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 98 +begin; +insert into ti values (1); +insert into ti values (2) /* to make the dup error in the following */; +insert into tt select * from ti /* one affected and error */; +ERROR 23000: Duplicate entry '2' for key 1 +rollback; +Warnings: +Warning 1196 Some non-transactional changed tables couldn't be rolled back +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 581 +show binlog events from 98; +Log_name Pos Event_type Server_id End_log_pos Info +master-bin.000001 # Query 1 # use `test`; BEGIN +master-bin.000001 # Query 1 # use `test`; insert into ti values (1) +master-bin.000001 # Query 1 # use `test`; insert into ti values (2) /* to make the dup error in the following */ +master-bin.000001 # Query 1 # use `test`; insert into tt select * from ti /* one affected and error */ +master-bin.000001 # Query 1 # use `test`; ROLLBACK +select count(*) from ti /* zero */; +count(*) +0 +insert into ti select * from tt; +select * from tt /* that is what otherwise slave missed - the bug */; +a +1 +2 +drop table ti; +drop function if exists bug27417; +drop table if exists t1,t2; +CREATE TABLE t1 (a int NOT NULL auto_increment primary key) ENGINE=MyISAM; +CREATE TABLE t2 (a int NOT NULL auto_increment, PRIMARY KEY (a)); +create function bug27417(n int) +RETURNS int(11) +begin +insert into t1 values (null); +return n; +end| +reset master; +insert into t2 values (bug27417(1)); +insert into t2 select bug27417(2); +reset master; +insert into t2 values (bug27417(2)); +ERROR 23000: Duplicate entry '2' for key 1 +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 98 +/* only (!) with fixes for #23333 will show there is the query */; +select count(*) from t1 /* must be 3 */; +count(*) +3 +reset master; +select count(*) from t2; +count(*) +2 +delete from t2 where a=bug27417(3); +select count(*) from t2 /* nothing got deleted */; +count(*) +2 +show master status; +File Position Binlog_Do_DB Binlog_Ignore_DB +master-bin.000001 195 +/* the query must be in regardless of #23333 */; +select count(*) from t1 /* must be 5 */; +count(*) +5 +delete t2 from t2 where t2.a=bug27417(100) /* must not affect t2 */; +affected rows: 0 +select count(*) from t1 /* must be 7 */; +count(*) +7 +drop function bug27417; +drop table t1,t2; +end of tests |