diff --git a/mysql-test/r/rpl_crash_binlog_ib_1a.result b/mysql-test/r/rpl_crash_binlog_ib_1a.result deleted file mode 100644 index ec2c620b093..00000000000 --- a/mysql-test/r/rpl_crash_binlog_ib_1a.result +++ /dev/null @@ -1,27 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -flush logs; -set autocommit=1; -set sql_log_bin=0; -create table t1 (n int) engine=innodb; -set sql_log_bin=1; -create table t1 (n int) engine=myisam; -insert into t1 values (3); -show master status; -File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000002 64 - insert into t1 values (4); -select * from t1; -n -3 -set @a=load_file("MYSQL_TEST_DIR/var/log/master-bin.000002"); -select length(@a); -length(@a) -124 -select @a like "%values (4)%"; -@a like "%values (4)%" -1 diff --git a/mysql-test/r/rpl_crash_binlog_ib_1b.result b/mysql-test/r/rpl_crash_binlog_ib_1b.result deleted file mode 100644 index 1073811f126..00000000000 --- a/mysql-test/r/rpl_crash_binlog_ib_1b.result +++ /dev/null @@ -1,24 +0,0 @@ -select * from t1; -n -3 -insert into t1 values (5); -select * from t1; -n -3 -5 -select * from t1; -n -3 -start slave; -select * from t1; -n -3 -5 -set @a=load_file("MYSQL_TEST_DIR/var/log/master-bin.000002"); -select length(@a); -length(@a) -64 -select @a like "%values (4)%"; -@a like "%values (4)%" -0 -drop table if exists t1; diff --git a/mysql-test/r/rpl_crash_binlog_ib_2a.result b/mysql-test/r/rpl_crash_binlog_ib_2a.result deleted file mode 100644 index 4614dfe76f9..00000000000 --- a/mysql-test/r/rpl_crash_binlog_ib_2a.result +++ /dev/null @@ -1,32 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -flush logs; -set autocommit=0; -set sql_log_bin=0; -create table t1(n int) engine=innodb; -set sql_log_bin=1; -create table t1(n int) engine=myisam; -insert into t1 values (3); -insert into t1 values (4); -commit; -show master status; -File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000002 205 -insert into t1 values (5); -insert into t1 values (6); - commit; -select * from t1; -n -3 -4 -set @a=load_file("MYSQL_TEST_DIR/var/log/master-bin.000002"); -select length(@a); -length(@a) -406 -select @a like "%values (5)%"; -@a like "%values (5)%" -1 diff --git a/mysql-test/r/rpl_crash_binlog_ib_2b.result b/mysql-test/r/rpl_crash_binlog_ib_2b.result deleted file mode 100644 index 446bd4ad13f..00000000000 --- a/mysql-test/r/rpl_crash_binlog_ib_2b.result +++ /dev/null @@ -1,28 +0,0 @@ -select * from t1; -n -3 -4 -insert into t1 values (7); -select * from t1; -n -3 -4 -7 -select * from t1; -n -3 -4 -start slave; -select * from t1; -n -3 -4 -7 -set @a=load_file("MYSQL_TEST_DIR/var/log/master-bin.000002"); -select length(@a); -length(@a) -205 -select @a like "%values (5)%"; -@a like "%values (5)%" -0 -drop table if exists t1; diff --git a/mysql-test/r/rpl_crash_binlog_ib_3a.result b/mysql-test/r/rpl_crash_binlog_ib_3a.result deleted file mode 100644 index 5baef043c0e..00000000000 --- a/mysql-test/r/rpl_crash_binlog_ib_3a.result +++ /dev/null @@ -1,25 +0,0 @@ -stop slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -reset master; -reset slave; -drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9; -start slave; -flush logs; -set autocommit=1; -set sql_log_bin=0; -create table t1 (n int) engine=innodb; -set sql_log_bin=1; -create table t1 (n int) engine=myisam; -show master status; -File Position Binlog_Do_DB Binlog_Ignore_DB -master-bin.000002 4 - insert into t1 values (4); -select * from t1; -n -set @a=load_file("MYSQL_TEST_DIR/var/log/master-bin.000002"); -select length(@a); -length(@a) -64 -select @a like "%values (4)%"; -@a like "%values (4)%" -1 diff --git a/mysql-test/r/rpl_crash_binlog_ib_3b.result b/mysql-test/r/rpl_crash_binlog_ib_3b.result deleted file mode 100644 index ea7941699ba..00000000000 --- a/mysql-test/r/rpl_crash_binlog_ib_3b.result +++ /dev/null @@ -1,20 +0,0 @@ -select * from t1; -n -insert into t1 values (5); -select * from t1; -n -5 -select * from t1; -n -start slave; -select * from t1; -n -5 -set @a=load_file("MYSQL_TEST_DIR/var/log/master-bin.000002"); -select length(@a); -length(@a) -4 -select @a like "%values (4)%"; -@a like "%values (4)%" -0 -drop table if exists t1; diff --git a/mysql-test/t/rpl_crash_binlog_ib_1a-master.opt b/mysql-test/t/rpl_crash_binlog_ib_1a-master.opt deleted file mode 100644 index 13a18eb798b..00000000000 --- a/mysql-test/t/rpl_crash_binlog_ib_1a-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb-safe-binlog --crash-binlog-innodb=3 diff --git a/mysql-test/t/rpl_crash_binlog_ib_1a.test b/mysql-test/t/rpl_crash_binlog_ib_1a.test deleted file mode 100644 index 1a1464390a2..00000000000 --- a/mysql-test/t/rpl_crash_binlog_ib_1a.test +++ /dev/null @@ -1,71 +0,0 @@ -# Test if master cuts binlog at InnoDB crash's recovery, -# if the transaction had been written to binlog but not committed into InnoDB -# We need InnoDB in the master, and a debug build in the master. - -# There are 6 tests, in fact 3 pairs: -# 1st pair: -# rpl_crash_binlog_innodb_1a: crash when InnoDB in autocommit mode -# rpl_crash_binlog_innodb_1b: test of recovery after the crash of test 1a -# 2nd pair: -# rpl_crash_binlog_innodb_2a: crash when InnoDB in non autocommit mode -# rpl_crash_binlog_innodb_2b: test of recovery after the crash of test 1a -# 3rd pair: -# rpl_crash_binlog_innodb_3a: crash when InnoDB in autocommit mode, at -# very first transactional statement since master's startup (a purely -# academic case but which will be tested a lot) -# rpl_crash_binlog_innodb_3b: test of recovery after the crash of test 3a - -# The *b tests should always be run just after their 1a; don't run *b -# alone it won't work properly. - -# This test is only for autocommit mode. - -source include/master-slave.inc ; -source include/have_debug.inc ; -source include/have_innodb.inc ; -require_os unix ; - -flush logs; # this will help us be sure it's the same log in the next test - -# One problem: we need InnoDB to know of the last good position, so it -# must have committed at least one transaction and in the binlog before the crash. -# NOTE: the above should become false quite soon - -set autocommit=1; -set sql_log_bin=0; -create table t1 (n int) engine=innodb; -set sql_log_bin=1; -sync_slave_with_master; - -# We use MyISAM on slave so that any spurious statement received from the -# master has a visible effect. -create table t1 (n int) engine=myisam; -connection master; -insert into t1 values (3); -# The reported size here should be exactly the same as the one we measure -# at the end of rpl_crash_binlog_innodb_1b.test -show master status; - -# Master will crash in this (it crashes on 3rd binlog write, counting -# the DROP IF EXISTS in master-slave.inc): -error 2013; -send insert into t1 values (4); -sleep 4; # enough time to die -# No 'reap' as it may hang as master died hard. -# This kill speeds up: -system sh misc/kill_master.sh ; - -# Check that slave did not receive the spurious INSERT statement -connection slave; -select * from t1; - -# Check that the spurious statement is in the master's binlog -# LOAD_FILE() needs a file readable by all -system chmod ugo+r $MYSQL_TEST_DIR/var/log/master-bin.000002 ; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval set @a=load_file("$MYSQL_TEST_DIR/var/log/master-bin.000002"); -select length(@a); -select @a like "%values (4)%"; - -# Now we will run rpl_crash_binlog_innodb_1b.test to test -# if the spurious statement gets truncated at master's restart. diff --git a/mysql-test/t/rpl_crash_binlog_ib_1b-master.opt b/mysql-test/t/rpl_crash_binlog_ib_1b-master.opt deleted file mode 100644 index ad13bbfb62a..00000000000 --- a/mysql-test/t/rpl_crash_binlog_ib_1b-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb-safe-binlog diff --git a/mysql-test/t/rpl_crash_binlog_ib_1b.test b/mysql-test/t/rpl_crash_binlog_ib_1b.test deleted file mode 100644 index 2885865b854..00000000000 --- a/mysql-test/t/rpl_crash_binlog_ib_1b.test +++ /dev/null @@ -1,38 +0,0 @@ -# Test if master cuts binlog at InnoDB crash's recovery, -# after we crashed intentionally in rpl_crash_binlog_innodb_1a.test -# (1a and 1b are two tests, 1b should NOT be run if 1a has not be run -# just before). So don't run 1b alone. -# We need InnoDB in the master, and a debug build in the master. - -# We don't use master-slave.inc because it would RESET MASTER. -connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,); -connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,); - -source include/have_debug.inc -source include/have_innodb.inc -require_os unix ; - -connection master; -# check that transaction was rolled back on master -select * from t1; -insert into t1 values (5); -select * from t1; -save_master_pos; - -# Check that slave did not receive the spurious INSERT statement -connection slave; -select * from t1; -start slave; -sync_with_master; -select * from t1; -# Check that the spurious statement is NOT in the master's binlog anymore -# LOAD_FILE() needs a file readable by all -system chmod ugo+r $MYSQL_TEST_DIR/var/log/master-bin.000002 ; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval set @a=load_file("$MYSQL_TEST_DIR/var/log/master-bin.000002"); -select length(@a); -select @a like "%values (4)%"; - -connection master; -drop table if exists t1; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_crash_binlog_ib_2a-master.opt b/mysql-test/t/rpl_crash_binlog_ib_2a-master.opt deleted file mode 100644 index 13a18eb798b..00000000000 --- a/mysql-test/t/rpl_crash_binlog_ib_2a-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb-safe-binlog --crash-binlog-innodb=3 diff --git a/mysql-test/t/rpl_crash_binlog_ib_2a.test b/mysql-test/t/rpl_crash_binlog_ib_2a.test deleted file mode 100644 index 1531af2ea79..00000000000 --- a/mysql-test/t/rpl_crash_binlog_ib_2a.test +++ /dev/null @@ -1,42 +0,0 @@ -# Test if master cuts binlog at InnoDB crash's recovery, -# if the transaction had been written to binlog but not committed into InnoDB -# We need InnoDB in the master, and a debug build in the master. -# This test is only for NON autocommit mode. -# More comments in rpl_crash_binlog_ib_1a.test - -source include/master-slave.inc; -source include/have_debug.inc -source include/have_innodb.inc -require_os unix ; - -flush logs; - -set autocommit=0; -set sql_log_bin=0; -create table t1(n int) engine=innodb; -set sql_log_bin=1; -sync_slave_with_master; - -create table t1(n int) engine=myisam; -connection master; -insert into t1 values (3); -insert into t1 values (4); -commit; -show master status; -insert into t1 values (5); -insert into t1 values (6); -error 2013; -send commit; -sleep 4; -system sh misc/kill_master.sh ; - -connection slave; -select * from t1; -system chmod ugo+r $MYSQL_TEST_DIR/var/log/master-bin.000002 ; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval set @a=load_file("$MYSQL_TEST_DIR/var/log/master-bin.000002"); -select length(@a); -select @a like "%values (5)%"; - -# Now we will run rpl_crash_binlog_ib_2b.test to test -# if the spurious transaction gets truncated at master's restart. diff --git a/mysql-test/t/rpl_crash_binlog_ib_2b-master.opt b/mysql-test/t/rpl_crash_binlog_ib_2b-master.opt deleted file mode 100644 index ad13bbfb62a..00000000000 --- a/mysql-test/t/rpl_crash_binlog_ib_2b-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb-safe-binlog diff --git a/mysql-test/t/rpl_crash_binlog_ib_2b.test b/mysql-test/t/rpl_crash_binlog_ib_2b.test deleted file mode 100644 index 6072f64c357..00000000000 --- a/mysql-test/t/rpl_crash_binlog_ib_2b.test +++ /dev/null @@ -1,32 +0,0 @@ -# Test if master cuts binlog at InnoDB crash's recovery, -# after we crashed intentionally in rpl_crash_binlog_innodb_2a.test -# We need InnoDB in the master, and a debug build in the master. - -# We don't use master-slave.inc because it would RESET MASTER. -connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,); -connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,); - -source include/have_debug.inc -source include/have_innodb.inc -require_os unix ; - -connection master; -select * from t1; -insert into t1 values (7); -select * from t1; -save_master_pos; - -connection slave; -select * from t1; -start slave; -sync_with_master; -select * from t1; -system chmod ugo+r $MYSQL_TEST_DIR/var/log/master-bin.000002 ; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval set @a=load_file("$MYSQL_TEST_DIR/var/log/master-bin.000002"); -select length(@a); -select @a like "%values (5)%"; - -connection master; -drop table if exists t1; -sync_slave_with_master; diff --git a/mysql-test/t/rpl_crash_binlog_ib_3a-master.opt b/mysql-test/t/rpl_crash_binlog_ib_3a-master.opt deleted file mode 100644 index 2f03b11943e..00000000000 --- a/mysql-test/t/rpl_crash_binlog_ib_3a-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb-safe-binlog --crash-binlog-innodb=2 diff --git a/mysql-test/t/rpl_crash_binlog_ib_3a.test b/mysql-test/t/rpl_crash_binlog_ib_3a.test deleted file mode 100644 index a964a81af4b..00000000000 --- a/mysql-test/t/rpl_crash_binlog_ib_3a.test +++ /dev/null @@ -1,40 +0,0 @@ -# Test if master cuts binlog at InnoDB crash's recovery, -# if the transaction had been written to binlog but not committed into InnoDB -# We need InnoDB in the master, and a debug build in the master. -# This test is only for autocommit mode, with a crash at very first -# transactional statement since startup. -# More comments in rpl_crash_binlog_ib_1a.test - -source include/master-slave.inc ; -source include/have_debug.inc ; -source include/have_innodb.inc ; -require_os unix ; - -flush logs; - -set autocommit=1; -set sql_log_bin=0; -create table t1 (n int) engine=innodb; -set sql_log_bin=1; -sync_slave_with_master; - -create table t1 (n int) engine=myisam; -connection master; -show master status; - -error 2013; -send insert into t1 values (4); -sleep 4; # enough time to die -system sh misc/kill_master.sh ; - -connection slave; -select * from t1; - -system chmod ugo+r $MYSQL_TEST_DIR/var/log/master-bin.000002 ; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval set @a=load_file("$MYSQL_TEST_DIR/var/log/master-bin.000002"); -select length(@a); -select @a like "%values (4)%"; - -# Now we will run rpl_crash_binlog_innodb_3b.test to test -# if the spurious statement gets truncated at master's restart. diff --git a/mysql-test/t/rpl_crash_binlog_ib_3b-master.opt b/mysql-test/t/rpl_crash_binlog_ib_3b-master.opt deleted file mode 100644 index ad13bbfb62a..00000000000 --- a/mysql-test/t/rpl_crash_binlog_ib_3b-master.opt +++ /dev/null @@ -1 +0,0 @@ ---innodb-safe-binlog diff --git a/mysql-test/t/rpl_crash_binlog_ib_3b.test b/mysql-test/t/rpl_crash_binlog_ib_3b.test deleted file mode 100644 index a72453be620..00000000000 --- a/mysql-test/t/rpl_crash_binlog_ib_3b.test +++ /dev/null @@ -1,32 +0,0 @@ -# Test if master cuts binlog at InnoDB crash's recovery, -# after we crashed intentionally in rpl_crash_binlog_innodb_3a.test -# We need InnoDB in the master, and a debug build in the master. - -# We don't use master-slave.inc because it would RESET MASTER. -connect (master,127.0.0.1,root,,test,$MASTER_MYPORT,); -connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,); - -source include/have_debug.inc -source include/have_innodb.inc -require_os unix ; - -connection master; -select * from t1; -insert into t1 values (5); -select * from t1; -save_master_pos; - -connection slave; -select * from t1; -start slave; -sync_with_master; -select * from t1; -system chmod ugo+r $MYSQL_TEST_DIR/var/log/master-bin.000002 ; ---replace_result $MYSQL_TEST_DIR MYSQL_TEST_DIR -eval set @a=load_file("$MYSQL_TEST_DIR/var/log/master-bin.000002"); -select length(@a); -select @a like "%values (4)%"; - -connection master; -drop table if exists t1; -sync_slave_with_master; diff --git a/sql/mysqld.cc b/sql/mysqld.cc index c5a5bd58d7c..b2d9266c0ce 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -269,7 +269,7 @@ my_bool opt_secure_auth= 0; my_bool opt_short_log_format= 0; my_bool opt_log_queries_not_using_indexes= 0; my_bool lower_case_file_system= 0; -my_bool opt_innodb_safe_binlog; +my_bool opt_innodb_safe_binlog= 0; volatile bool mqh_used = 0; uint mysqld_port, test_flags, select_errors, dropping_tables, ha_open_options; @@ -4628,6 +4628,12 @@ replicating a LOAD DATA INFILE command.", (gptr*) &innobase_lock_wait_timeout, (gptr*) &innobase_lock_wait_timeout, 0, GET_LONG, REQUIRED_ARG, 50, 1, 1024 * 1024 * 1024, 0, 1, 0}, #ifdef HAVE_REPLICATION + /* + Disabled for the 4.1.3 release. Disabling just this paragraph of code is + enough, as then user can't set it to 1 so it will always be ignored in the + rest of code. + */ +#if MYSQL_VERSION_ID > 40103 /* innodb_safe_binlog is not a variable, just an option. Does not make sense to make it a variable, as it is only used at startup (and so the @@ -4640,6 +4646,7 @@ InnoDB committed transaction. Use only if this server updates ONLY InnoDB \ tables.", (gptr*) &opt_innodb_safe_binlog, (gptr*) &opt_innodb_safe_binlog, 0, GET_BOOL, NO_ARG, 0, 0, 1, 0, 1, 0}, +#endif #endif {"innodb_thread_concurrency", OPT_INNODB_THREAD_CONCURRENCY, "Helps in performance tuning in heavily concurrent environments.",