List:Commits« Previous MessageNext Message »
From:Daniel Fischer Date:May 31 2007 10:25am
Subject:bk commit into 5.1 tree (df:1.2520)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of df. When df 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-05-31 12:24:55+02:00, df@stripped +4 -0
  Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build-work-nn
  into  pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build-work-nn
  MERGE: 1.1810.2943.28

  mysql-test/extra/binlog_tests/blackhole.test@stripped, 2007-05-31 12:22:56+02:00, df@stripped +0 -0
    Auto merged
    MERGE: 1.4.9.2

  mysql-test/extra/binlog_tests/blackhole.test@stripped, 2007-05-31 12:22:56+02:00, df@stripped +0 -0
    Merge rename: mysql-test/t/blackhole.test -> mysql-test/extra/binlog_tests/blackhole.test

  mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test@stripped, 2007-05-31 12:24:45+02:00, df@stripped +0 -10
    change not needed
    MERGE: 1.20.9.2

  mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test@stripped, 2007-05-31 12:22:56+02:00, df@stripped +0 -0
    Merge rename: mysql-test/t/mix_innodb_myisam_binlog.test -> mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test

  mysql-test/t/mysqltest.test@stripped, 2007-05-31 12:22:56+02:00, df@stripped +0 -0
    Auto merged
    MERGE: 1.24.1.33

  mysql-test/t/sp_trans.test@stripped, 2007-05-31 12:22:56+02:00, df@stripped +0 -0
    Auto merged
    MERGE: 1.9.1.5

# 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:	df
# Host:	pippilotta.erinye.com
# Root:	/shared/home/df/mysql/build/mysql-5.1-build-work-nn/RESYNC

--- 1.4.9.1/mysql-test/t/blackhole.test	2007-05-31 10:09:31 +02:00
+++ 1.18/mysql-test/extra/binlog_tests/blackhole.test	2007-05-31 12:22:56 +02:00
@@ -122,10 +122,7 @@
 select * from t3;
 
 let $VERSION=`select version()`;
---replace_result $VERSION VERSION
---replace_column 2 # 5 #
-show binlog events;
-
+source include/show_binlog_events.inc;
 drop table t1,t2,t3;
 
 #
@@ -133,7 +130,6 @@
 #             table
 #
 CREATE TABLE t1(a INT) ENGINE=BLACKHOLE;
---error 1031
 INSERT DELAYED INTO t1 VALUES(1);
 DROP TABLE t1;
 
@@ -155,3 +151,21 @@
 DROP TABLE t1;
 
 # End of 5.0 tests
+
+# Test that a transaction which is rolled back does not go into binlog
+# and that a transaction which is committed does
+
+reset master;
+create table t1 (a int) engine=blackhole;
+set autocommit=0;
+start transaction;
+insert into t1 values(1);
+commit;
+start transaction;
+insert into t1 values(2);
+rollback;
+set autocommit=1;
+source include/show_binlog_events.inc;
+drop table if exists t1;
+
+# End of 5.1 tests

--- 1.20.9.1/mysql-test/t/mix_innodb_myisam_binlog.test	2007-05-31 12:21:48 +02:00
+++ 1.40/mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test	2007-05-31 12:24:45 +02: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,7 @@
 insert into t2 select * from t1;
 commit;
 
---replace_column 5 #
---replace_result "xid=15" "xid=9"
-show binlog events from 98;
+source include/show_binlog_events.inc;
 
 delete from t1;
 delete from t2;
@@ -42,8 +41,7 @@
 # should say some changes to non-transact1onal tables couldn't be rolled back
 rollback;
 
---replace_column 5 #
-show binlog events from 98;
+source include/show_binlog_events.inc;
 
 delete from t1;
 delete from t2;
@@ -57,9 +55,7 @@
 rollback to savepoint my_savepoint;
 commit;
 
---replace_column 5 #
---replace_result "xid=48" "xid=26"
-show binlog events from 98;
+source include/show_binlog_events.inc;
 
 delete from t1;
 delete from t2;
@@ -75,9 +71,7 @@
 commit;
 select a from t1 order by a; # check that savepoints work :)
 
---replace_column 5 #
---replace_result "xid=70" "xid=38"
-show binlog events from 98;
+source include/show_binlog_events.inc;
 
 # and when ROLLBACK is not explicit?
 delete from t1;
@@ -97,8 +91,7 @@
 # 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;
+source include/show_binlog_events.inc;
 
 # and when not in a transact1on?
 delete from t1;
@@ -108,9 +101,7 @@
 insert into t1 values(9);
 insert into t2 select * from t1;
 
---replace_column 5 #
---replace_result "xid=118" "xid=61"
-show binlog events from 98;
+source include/show_binlog_events.inc;
 
 # Check that when the query updat1ng the MyISAM table is the first in the
 # transaction, we log it immediately.
@@ -121,16 +112,11 @@
 insert into t1 values(10); # first make t1 non-empty
 begin;
 insert into t2 select * from t1;
---replace_column 5 #
---replace_result "xid=132" "xid=67"
-show binlog events from 98;
+source include/show_binlog_events.inc;
 insert into t1 values(11);
 commit;
 
---replace_column 5 #
---replace_result "xid=132" "xid=67" "xid=135" "xid=69"
-show binlog events from 98;
-
+source include/show_binlog_events.inc;
 
 # Check that things work like before this BEGIN/ROLLBACK code was added,
 # when t2 is INNODB 
@@ -146,9 +132,7 @@
 insert into t2 select * from t1;
 commit;
 
---replace_column 5 #
---replace_result "xid=154" "xid=79"
-show binlog events from 98;
+source include/show_binlog_events.inc;
 
 delete from t1;
 delete from t2;
@@ -159,8 +143,7 @@
 insert into t2 select * from t1;
 rollback;
 
---replace_column 5 #
-show binlog events from 98;
+source include/show_binlog_events.inc;
 
 delete from t1;
 delete from t2;
@@ -174,9 +157,7 @@
 rollback to savepoint my_savepoint;
 commit;
 
---replace_column 5 #
---replace_result "xid=186" "xid=95"
-show binlog events from 98;
+source include/show_binlog_events.inc;
 
 delete from t1;
 delete from t2;
@@ -192,9 +173,7 @@
 commit;
 select a from t1 order by a; # check that savepoints work :)
 
---replace_column 5 #
---replace_result "xid=207" "xid=106"
-show binlog events from 98;
+source include/show_binlog_events.inc;
 
 # Test for BUG#5714, where a MyISAM update in the transaction used to
 # release row-level locks in InnoDB
@@ -205,7 +184,7 @@
 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 +209,8 @@
 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 +232,73 @@
 disconnect con2;
 connection con3;
 select get_lock("lock1",60);
---replace_column 5 #
---replace_result "xid=207" "xid=106" "xid=225" "xid=115" "xid=228" "xid=116" "xid=232" "xid=118" "xid=259" "xid=133"
-show binlog events from 98;
+source include/show_binlog_events.inc;
 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 ER_DUP_ENTRY_WITH_KEY_NAME
+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 ER_DUP_ENTRY_WITH_KEY_NAME
+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 ER_DUP_ENTRY_WITH_KEY_NAME
+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 ER_DUP_ENTRY_WITH_KEY_NAME
+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 ER_DUP_ENTRY_WITH_KEY_NAME
+CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1;
+COMMIT;
+INSERT INTO t1 values (9,9);
+--error ER_DUP_ENTRY_WITH_KEY_NAME
+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 ER_DUP_ENTRY_WITH_KEY_NAME
+INSERT INTO t2 select * from t1;
+SELECT * from t1;
+INSERT INTO t2 values (100,100);
+--error ER_DUP_ENTRY_WITH_KEY_NAME
+CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1;
+COMMIT;
+INSERT INTO t2 values (101,101);
+--error ER_DUP_ENTRY_WITH_KEY_NAME
+CREATE TEMPORARY TABLE IF NOT EXISTS t2 (primary key (a)) engine=innodb select * from t1;
+ROLLBACK;
+SELECT * from t2;
+DROP TABLE t1,t2;
+source include/show_binlog_events.inc;
+
 # 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 +318,3 @@
 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 (df:1.2520)Daniel Fischer31 May