Commit bf9057f9 authored by Sven Sandberg's avatar Sven Sandberg

BUG#40257: Please remove --loose-skip-innodb from suite/rpl/rpl_1slave_base.cnf

Removed the flag that disables innodb on slave in the default
configuration of replication tests. That made the explicit
--innodb flag in -slave.opt files redundant, so lots of -slave.opt
files could be removed. Also, -master.opt files containing reduntant
--innodb flag were removed (those were redundant even without
changing the default). Removing .opt files is good because .opt
files cause server restarts and make tests less readable.
Also fixed a bug where rpl_innodb_mixed_ddl unintentionally
used myisam on slave.


mysql-test/suite/rpl/r/rpl_innodb.result:
  updated result file
mysql-test/suite/rpl/r/rpl_innodb_mixed_ddl.result:
  updated result file. this is how the test is supposed to be, it was a bug
  that it used myisam on the slave.
mysql-test/suite/rpl/rpl_1slave_base.cnf:
  Removed flag to disable innodb on slave, and added explicit --loose-innodb
  flags on both master and slave.
mysql-test/suite/rpl/t/rpl_innodb.test:
  Ensure that the slave uses myisam (this was previously done
  by not adding the --innodb flag on slave).
parent abe17734
...@@ -43,6 +43,7 @@ CREATE TEMPORARY TABLE mysqltest1.tmp (f1 BIGINT); ...@@ -43,6 +43,7 @@ CREATE TEMPORARY TABLE mysqltest1.tmp (f1 BIGINT);
CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE="InnoDB"; CREATE TABLE mysqltest1.t1 (f1 BIGINT) ENGINE="InnoDB";
SET AUTOCOMMIT = 0; SET AUTOCOMMIT = 0;
-------- switch to slave -------- -------- switch to slave --------
ALTER TABLE mysqltest1.t1 ENGINE = MyISAM;
SHOW CREATE TABLE mysqltest1.t1; SHOW CREATE TABLE mysqltest1.t1;
Table Create Table Table Create Table
t1 CREATE TABLE `t1` ( t1 CREATE TABLE `t1` (
......
...@@ -77,7 +77,7 @@ t1 CREATE TABLE `t1` ( ...@@ -77,7 +77,7 @@ t1 CREATE TABLE `t1` (
`b` char(254) DEFAULT NULL, `b` char(254) DEFAULT NULL,
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
KEY `index1` (`b`) KEY `index1` (`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
...@@ -85,7 +85,7 @@ t2 CREATE TABLE `t2` ( ...@@ -85,7 +85,7 @@ t2 CREATE TABLE `t2` (
`b` char(254) DEFAULT NULL, `b` char(254) DEFAULT NULL,
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
KEY `index1` (`b`) KEY `index1` (`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
******************** DDL for indexes ******************** ******************** DDL for indexes ********************
ALTER TABLE t2 ADD COLUMN d datetime; ALTER TABLE t2 ADD COLUMN d datetime;
...@@ -120,7 +120,7 @@ t1 CREATE TABLE `t1` ( ...@@ -120,7 +120,7 @@ t1 CREATE TABLE `t1` (
`b` char(254) DEFAULT NULL, `b` char(254) DEFAULT NULL,
PRIMARY KEY (`a`), PRIMARY KEY (`a`),
KEY `index1` (`b`) KEY `index1` (`b`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
SHOW CREATE TABLE t2; SHOW CREATE TABLE t2;
Table Create Table Table Create Table
t2 CREATE TABLE `t2` ( t2 CREATE TABLE `t2` (
...@@ -131,7 +131,7 @@ t2 CREATE TABLE `t2` ( ...@@ -131,7 +131,7 @@ t2 CREATE TABLE `t2` (
KEY `index1` (`b`), KEY `index1` (`b`),
KEY `index2` (`d`), KEY `index2` (`d`),
KEY `index3` (`a`,`d`) KEY `index3` (`a`,`d`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
ALTER TABLE t2 DROP COLUMN d; ALTER TABLE t2 DROP COLUMN d;
......
...@@ -8,6 +8,8 @@ ...@@ -8,6 +8,8 @@
log-bin= master-bin log-bin= master-bin
loose-innodb
[mysqld.2] [mysqld.2]
# Run the slave.sh script before starting this process # Run the slave.sh script before starting this process
#!run-slave-sh #!run-slave-sh
...@@ -39,7 +41,7 @@ slave-load-tmpdir= ../../tmp ...@@ -39,7 +41,7 @@ slave-load-tmpdir= ../../tmp
rpl-recovery-rank= @mysqld.2.server-id rpl-recovery-rank= @mysqld.2.server-id
loose-skip-innodb loose-innodb
[ENV] [ENV]
......
--innodb --innodb_lock_wait_timeout=4 --slave-transaction-retries=2 --max-relay-log-size=4096 --innodb_lock_wait_timeout=4 --slave-transaction-retries=2 --max-relay-log-size=4096
--slave-exec-mode=IDEMPOTENT --innodb --slave-exec-mode=IDEMPOTENT
--innodb --innodb_autoinc_lock_mode=0 --innodb_autoinc_lock_mode=0
...@@ -74,6 +74,17 @@ SET AUTOCOMMIT = 0; ...@@ -74,6 +74,17 @@ SET AUTOCOMMIT = 0;
sync_slave_with_master; sync_slave_with_master;
--echo -------- switch to slave -------- --echo -------- switch to slave --------
connection slave; connection slave;
# We want to verify that the following transactions are written to the
# binlog, despite the transaction is rolled back. (The should be
# written to the binlog since they contain non-transactional DROP
# TEMPORARY TABLE). To see that, we use the auxiliary table t1, which
# is transactional (InnoDB) on master and MyISAM on slave. t1 should
# be transactional on master so that the insert into t1 does not cause
# the transaction to be logged. Since t1 is non-transactional on
# slave, the change will not be rolled back, so the inserted rows will
# stay in t1 and we can verify that the transaction was replicated.
ALTER TABLE mysqltest1.t1 ENGINE = MyISAM;
SHOW CREATE TABLE mysqltest1.t1; SHOW CREATE TABLE mysqltest1.t1;
--echo -------- switch to master -------- --echo -------- switch to master --------
...@@ -100,8 +111,7 @@ connection slave; ...@@ -100,8 +111,7 @@ connection slave;
SHOW CREATE TABLE mysqltest1.tmp; SHOW CREATE TABLE mysqltest1.tmp;
--error ER_NO_SUCH_TABLE --error ER_NO_SUCH_TABLE
SHOW CREATE TABLE mysqltest1.tmp2; SHOW CREATE TABLE mysqltest1.tmp2;
# has two rows here : as the default is MyISAM and # t1 has two rows here: the transaction not rolled back since t1 uses MyISAM
# it can't be rolled back by the master's ROLLBACK.
SELECT COUNT(*) FROM mysqltest1.t1; SELECT COUNT(*) FROM mysqltest1.t1;
FLUSH LOGS; FLUSH LOGS;
......
--innodb --innodb_autoinc_lock_mode=0 --innodb_autoinc_lock_mode=0
--innodb --innodb_autoinc_lock_mode=0 --innodb_autoinc_lock_mode=0
-O max_relay_log_size=16384 -O max_relay_log_size=16384
--loose-innodb
--log-warnings --log-warnings
--binlog_ignore_db=test_ignore --loose-innodb --binlog_ignore_db=test_ignore
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment