Below is the list of changes that have just been committed into a local
5.1 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-01-16 17:54:55+01:00, msvensson@neptunus.(none) +1 -0
Merge neptunus.(none):/home/msvensson/mysql/bug15518/my50-bug15518
into neptunus.(none):/home/msvensson/mysql/mysql-5.1-maint
MERGE: 1.1810.2431.3
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test@stripped, 2007-01-16 17:54:52+01:00, msvensson@neptunus.(none) +0 -10
Manual merge 5.1 uses replace_regex, keep those
MERGE: 1.20.4.2
mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test@stripped, 2007-01-16 17:53:24+01:00, msvensson@neptunus.(none) +0 -0
Merge rename: mysql-test/t/mix_innodb_myisam_binlog.test -> mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: msvensson
# Host: neptunus.(none)
# Root: /home/msvensson/mysql/mysql-5.1-maint/RESYNC
--- 1.20.4.1/mysql-test/t/mix_innodb_myisam_binlog.test 2007-01-16 17:55:03 +01:00
+++ 1.32/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test 2007-01-16 17:55:03 +01:00
@@ -9,6 +9,7 @@
-- source include/not_embedded.inc
-- source include/have_innodb.inc
+-- source include/have_debug.inc
--disable_warnings
drop table if exists t1, t2;
@@ -28,9 +29,9 @@ insert into t1 values(1);
insert into t2 select * from t1;
commit;
---replace_column 5 #
---replace_result "xid=14" "xid=8"
-show binlog events from 98;
+--replace_column 2 # 5 #
+--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
+show binlog events from 102;
delete from t1;
delete from t2;
@@ -42,8 +43,9 @@ insert into t2 select * from t1;
# should say some changes to non-transact1onal tables couldn't be rolled back
rollback;
---replace_column 5 #
-show binlog events from 98;
+--replace_column 2 # 5 #
+--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
+show binlog events from 102;
delete from t1;
delete from t2;
@@ -57,9 +59,9 @@ insert into t2 select * from t1;
rollback to savepoint my_savepoint;
commit;
---replace_column 5 #
---replace_result "xid=47" "xid=25"
-show binlog events from 98;
+--replace_column 2 # 5 #
+--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
+show binlog events from 102;
delete from t1;
delete from t2;
@@ -75,9 +77,9 @@ insert into t1 values(7);
commit;
select a from t1 order by a; # check that savepoints work :)
---replace_column 5 #
---replace_result "xid=69" "xid=37"
-show binlog events from 98;
+--replace_column 2 # 5 #
+--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
+show binlog events from 102;
# and when ROLLBACK is not explicit?
delete from t1;
@@ -97,8 +99,9 @@ connection con2;
# so SHOW BINLOG EVENTS may come before con1 does the loggin. To be sure that
# logging has been done, we use a user lock.
select get_lock("a",10);
---replace_column 5 #
-show binlog events from 98;
+--replace_column 2 # 5 #
+--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
+show binlog events from 102;
# and when not in a transact1on?
delete from t1;
@@ -108,9 +111,9 @@ reset master;
insert into t1 values(9);
insert into t2 select * from t1;
---replace_column 5 #
---replace_result "xid=117" "xid=60"
-show binlog events from 98;
+--replace_column 2 # 5 #
+--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
+show binlog events from 102;
# Check that when the query updat1ng the MyISAM table is the first in the
# transaction, we log it immediately.
@@ -121,15 +124,15 @@ reset master;
insert into t1 values(10); # first make t1 non-empty
begin;
insert into t2 select * from t1;
---replace_column 5 #
---replace_result "xid=131" "xid=66"
-show binlog events from 98;
+--replace_column 2 # 5 #
+--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
+show binlog events from 102;
insert into t1 values(11);
commit;
---replace_column 5 #
---replace_result "xid=131" "xid=66" "xid=134" "xid=68"
-show binlog events from 98;
+--replace_column 2 # 5 #
+--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
+show binlog events from 102;
# Check that things work like before this BEGIN/ROLLBACK code was added,
@@ -146,9 +149,9 @@ insert into t1 values(12);
insert into t2 select * from t1;
commit;
---replace_column 5 #
---replace_result "xid=153" "xid=78"
-show binlog events from 98;
+--replace_column 2 # 5 #
+--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
+show binlog events from 102;
delete from t1;
delete from t2;
@@ -159,8 +162,9 @@ insert into t1 values(13);
insert into t2 select * from t1;
rollback;
---replace_column 5 #
-show binlog events from 98;
+--replace_column 2 # 5 #
+--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
+show binlog events from 102;
delete from t1;
delete from t2;
@@ -174,9 +178,9 @@ insert into t2 select * from t1;
rollback to savepoint my_savepoint;
commit;
---replace_column 5 #
---replace_result "xid=185" "xid=94"
-show binlog events from 98;
+--replace_column 2 # 5 #
+--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
+show binlog events from 102;
delete from t1;
delete from t2;
@@ -192,9 +196,9 @@ insert into t1 values(18);
commit;
select a from t1 order by a; # check that savepoints work :)
---replace_column 5 #
---replace_result "xid=206" "xid=105"
-show binlog events from 98;
+--replace_column 2 # 5 #
+--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
+show binlog events from 102;
# Test for BUG#5714, where a MyISAM update in the transaction used to
# release row-level locks in InnoDB
@@ -205,7 +209,7 @@ connection con3;
delete from t1;
delete from t2;
--disable_warnings
-alter table t2 type=MyISAM;
+alter table t2 engine=MyISAM;
--enable_warnings
insert into t1 values (1);
begin;
@@ -230,8 +234,8 @@ select (@after-@before) >= 2;
drop table t1,t2;
commit;
-# test for BUG#7947 - DO RELEASE_LOCK() not written to binlog on rollback in the middle
-# of a transaction
+# test for BUG#7947 - DO RELEASE_LOCK() not written to binlog on rollback in
+# the middle of a transaction
connection con2;
begin;
@@ -253,14 +257,77 @@ insert into t2 values (3);
disconnect con2;
connection con3;
select get_lock("lock1",60);
---replace_column 5 #
---replace_result "xid=206" "xid=105" "xid=224" "xid=114" "xid=227" "xid=115" "xid=231" "xid=117" "xid=258" "xid=132"
-show binlog events from 98;
+--replace_column 2 # 5 #
+--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
+show binlog events from 102;
do release_lock("lock1");
drop table t0,t2;
# End of 4.1 tests
+#
+# Test behaviour of CREATE ... SELECT when mixing MyISAM and InnoDB tables
+#
+
+set autocommit=0;
+CREATE TABLE t1 (a int, b int) engine=myisam;
+reset master;
+INSERT INTO t1 values (1,1),(1,2);
+--error 1062
+CREATE TABLE t2 (primary key (a)) engine=innodb select * from t1;
+# This should give warning
+DROP TABLE if exists t2;
+INSERT INTO t1 values (3,3);
+--error 1062
+CREATE TEMPORARY TABLE t2 (primary key (a)) engine=innodb select * from t1;
+ROLLBACK;
+# This should give warning
+DROP TABLE IF EXISTS t2;
+
+CREATE TABLE t2 (a int, b int, primary key (a)) engine=innodb;
+INSERT INTO t1 VALUES (4,4);
+--error 1062
+CREATE TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1;
+SELECT * from t2;
+TRUNCATE table t2;
+INSERT INTO t1 VALUES (5,5);
+--error 1062
+INSERT INTO t2 select * from t1;
+SELECT * FROM t2;
+DROP TABLE t2;
+
+INSERT INTO t1 values (6,6);
+CREATE TEMPORARY TABLE t2 (a int, b int, primary key (a)) engine=innodb ;
+INSERT INTO t1 values (7,7);
+ROLLBACK;
+INSERT INTO t1 values (8,8);
+--error 1062
+CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1;
+COMMIT;
+INSERT INTO t1 values (9,9);
+--error 1062
+CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1;
+ROLLBACK;
+SELECT * from t2;
+TRUNCATE table t2;
+INSERT INTO t1 values (10,10);
+--error 1062
+INSERT INTO t2 select * from t1;
+SELECT * from t1;
+INSERT INTO t2 values (100,100);
+--error 1062
+CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1;
+COMMIT;
+INSERT INTO t2 values (101,101);
+--error 1062
+CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1;
+ROLLBACK;
+SELECT * from t2;
+DROP TABLE t1,t2;
+--replace_column 2 # 5 #
+--replace_regex /table_id: [0-9]+/table_id: #/ /\/\* xid=.* \*\//\/* xid= *\//
+show binlog events from 102;
+
# Test for BUG#16559 (ROLLBACK should always have a zero error code in
# binlog). Has to be here and not earlier, as the SELECTs influence
# XIDs differently between normal and ps-protocol (and SHOW BINLOG
@@ -280,16 +347,3 @@ disconnect con3;
connection con4;
select get_lock("a",10); # wait for rollback to finish
-# we check that the error code of the "ROLLBACK" event is 0 and not
-# ER_SERVER_SHUTDOWN (i.e. disconnection just rolls back transaction
-# and does not make slave to stop)
---exec $MYSQL_BINLOG --start-position=547 $MYSQLTEST_VARDIR/log/master-bin.000001 > $MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output
---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
-eval select
-(@a:=load_file("$MYSQLTEST_VARDIR/tmp/mix_innodb_myisam_binlog.output"))
-is not null;
---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR
-eval select
-@a like "%#%error_code=0%ROLLBACK;%ROLLBACK /* added by mysqlbinlog */;%",
-@a not like "%#%error_code=%error_code=%";
-drop table t1, t2;
| Thread |
|---|
| • bk commit into 5.1 tree (msvensson:1.2392) | msvensson | 16 Jan |