diff options
author | unknown <cmiller@zippy.(none)> | 2006-07-05 16:16:09 -0400 |
---|---|---|
committer | unknown <cmiller@zippy.(none)> | 2006-07-05 16:16:09 -0400 |
commit | 30de4903ae2b9cd03bd5f853715e7fc7b648c2c7 (patch) | |
tree | a0c67909c6e1a1b67caf4558144a68911d8dfb15 /mysql-test/extra | |
parent | f92fd7c98adad9542e7d8d29ee24db504980541f (diff) | |
parent | 2ef57b836248f945657c7bd0fe02fa7fe3660b54 (diff) | |
download | mariadb-git-30de4903ae2b9cd03bd5f853715e7fc7b648c2c7.tar.gz |
Merge zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.1
into zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.1-new-maint
BUILD/compile-dist:
Auto merged
BitKeeper/deleted/.del-partition_innodb.result:
Auto merged
BitKeeper/deleted/.del-partition_innodb.test:
Auto merged
client/mysqltest.c:
Auto merged
mysql-test/r/create.result:
Auto merged
mysql-test/r/create_not_windows.result:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/r/partition.result:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/t/innodb_mysql.test:
Auto merged
mysql-test/t/partition.test:
Auto merged
mysql-test/t/ps_1general.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/wait_timeout.test:
Auto merged
mysys/my_lib.c:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/unireg.cc:
Auto merged
mysql-test/extra/rpl_tests/rpl_log.test:
manuakl merge
mysql-test/lib/mtr_process.pl:
manuakl merge
mysql-test/mysql-test-run.pl:
manuakl merge
mysql-test/r/type_newdecimal.result:
manuakl merge
mysql-test/t/create.test:
manuakl merge
mysql-test/t/func_group.test:
manuakl merge
mysql-test/t/type_newdecimal.test:
manuakl merge
Diffstat (limited to 'mysql-test/extra')
-rw-r--r-- | mysql-test/extra/rpl_tests/rpl_ddl.test | 10 | ||||
-rw-r--r-- | mysql-test/extra/rpl_tests/rpl_log.test | 21 | ||||
-rw-r--r-- | mysql-test/extra/rpl_tests/rpl_truncate.test | 36 | ||||
-rw-r--r-- | mysql-test/extra/rpl_tests/rpl_truncate_helper.test | 41 |
4 files changed, 100 insertions, 8 deletions
diff --git a/mysql-test/extra/rpl_tests/rpl_ddl.test b/mysql-test/extra/rpl_tests/rpl_ddl.test index 4aab45db18b..15794e5e035 100644 --- a/mysql-test/extra/rpl_tests/rpl_ddl.test +++ b/mysql-test/extra/rpl_tests/rpl_ddl.test @@ -228,15 +228,11 @@ let $my_master_commit= true; let $my_slave_commit= true; --source include/rpl_stmt_seq.inc SELECT * FROM mysqltest1.t7; -connection slave; ---disable_query_log -SELECT '-------- switch to slave --------' as ""; ---enable_query_log +--echo -------- switch to slave -------- +sync_slave_with_master; SELECT * FROM mysqltest1.t7; +--echo -------- switch to master ------- connection master; ---disable_query_log -SELECT '-------- switch to master -------' as ""; ---enable_query_log ############################################################### # Cases with LOCK/UNLOCK diff --git a/mysql-test/extra/rpl_tests/rpl_log.test b/mysql-test/extra/rpl_tests/rpl_log.test index 74bde7b48c1..cc3a9b4ffb5 100644 --- a/mysql-test/extra/rpl_tests/rpl_log.test +++ b/mysql-test/extra/rpl_tests/rpl_log.test @@ -126,7 +126,26 @@ show slave status; show binlog events in 'slave-bin.000005' from 4; # The table drops caused Cluster Replication wrapper to fail as event ID would never be the same.# Moving drops here. -connection master; + DROP TABLE t1; DROP TABLE t2; DROP TABLE t3; + +# +# Bug #6880: LAST_INSERT_ID() within a statement +# + +create table t1(a int auto_increment primary key, b int); +insert into t1 values (NULL, 1); +reset master; +set insert_id=5; +insert into t1 values (NULL, last_insert_id()), (NULL, last_insert_id()); +--replace_result $VERSION VERSION +--replace_column 2 # 5 # +--replace_regex /\/\* xid=.* \*\//\/* XID *\// /table_id: [0-9]+/table_id: #/ +show binlog events; +select * from t1; +drop table t1; + +# End of 4.1 tests + diff --git a/mysql-test/extra/rpl_tests/rpl_truncate.test b/mysql-test/extra/rpl_tests/rpl_truncate.test new file mode 100644 index 00000000000..37fd9fbc064 --- /dev/null +++ b/mysql-test/extra/rpl_tests/rpl_truncate.test @@ -0,0 +1,36 @@ +# +# Copyright 2006 MySQL. All rights reserved. +# +# Test to check for the different version of truncating a table. +# The statements are "TRUNCATE tbl" and "DELETE FROM tbl". We check +# the behaviour of each possible value for BINLOG_FORMAT. +# +# Author(s): Mats Kindahl + +--source include/have_row_based.inc +--source include/master-slave.inc + +let $format = STATEMENT; +let $stmt = TRUNCATE TABLE; +--source extra/rpl_tests/rpl_truncate_helper.test + +let $format = MIXED; +let $stmt = TRUNCATE TABLE; +--source extra/rpl_tests/rpl_truncate_helper.test + +let $format = ROW; +let $stmt = TRUNCATE TABLE; +--source extra/rpl_tests/rpl_truncate_helper.test + +let $format = STATEMENT; +let $stmt = DELETE FROM; +--source extra/rpl_tests/rpl_truncate_helper.test + +let $format = MIXED; +let $stmt = DELETE FROM; +--source extra/rpl_tests/rpl_truncate_helper.test + +let $format = ROW; +let $stmt = DELETE FROM; +--source extra/rpl_tests/rpl_truncate_helper.test + diff --git a/mysql-test/extra/rpl_tests/rpl_truncate_helper.test b/mysql-test/extra/rpl_tests/rpl_truncate_helper.test new file mode 100644 index 00000000000..1e485baca36 --- /dev/null +++ b/mysql-test/extra/rpl_tests/rpl_truncate_helper.test @@ -0,0 +1,41 @@ + +--disable_query_log +--disable_warnings +connection slave; +STOP SLAVE; +connection master; +DROP TABLE IF EXISTS t1; +RESET MASTER; +connection slave; +DROP TABLE IF EXISTS t1; +RESET SLAVE; +START SLAVE; +--enable_warnings +--enable_query_log + +--echo **** On Master **** +connection master; +eval SET SESSION BINLOG_FORMAT=$format; +eval SET GLOBAL BINLOG_FORMAT=$format; + +eval CREATE TABLE t1 (a INT, b LONG) ENGINE=$engine; +INSERT INTO t1 VALUES (1,1), (2,2); +SELECT * FROM t1; +--echo **** On Slave **** +sync_slave_with_master; +INSERT INTO t1 VALUE (3,3); +SELECT * FROM t1; +--echo **** On Master **** +connection master; +eval $stmt t1; +SELECT * FROM t1; +--echo **** On Slave **** +sync_slave_with_master; +# Should be empty +SELECT * FROM t1; +--echo **** On Master **** +connection master; +DROP TABLE t1; +--replace_result $SERVER_VERSION SERVER_VERSION +--replace_regex /\/\* xid=[0-9]+ \*\//\/* xid= *\// /table_id: [0-9]+/table_id: #/ +SHOW BINLOG EVENTS; |