#At file:///home/lsoares/Workspace/mysql-server/bugfix/b44958%2Bb44938%2Bb44779/mysql-azalea-bugfixing-to-push/ based on revid:holyfoot@stripped
2812 Luis Soares 2009-06-29 [merge]
local merge: azalea-bugfixing bug branch --> azalea-bugfixing latest
removed:
mysql-test/suite/rpl/t/rpl_failed_optimize-master.opt
modified:
mysql-test/extra/rpl_tests/rpl_failed_optimize.test
mysql-test/suite/binlog/r/binlog_max_extension.result
mysql-test/suite/binlog/t/binlog_max_extension.test
mysql-test/suite/binlog/t/disabled.def
mysql-test/suite/rpl/r/rpl_failed_optimize.result
mysql-test/suite/rpl/r/rpl_read_only.result
mysql-test/suite/rpl/t/disabled.def
mysql-test/suite/rpl/t/rpl_read_only.test
=== modified file 'mysql-test/extra/rpl_tests/rpl_failed_optimize.test'
--- a/mysql-test/extra/rpl_tests/rpl_failed_optimize.test 2006-05-05 17:08:40 +0000
+++ b/mysql-test/extra/rpl_tests/rpl_failed_optimize.test 2009-06-26 14:26:53 +0000
@@ -2,22 +2,24 @@
#
# BUG#5551 "Failed OPTIMIZE TABLE is logged to binary log"
-# Replication should work when OPTIMIZE TABLE timeouts, and
-# when OPTIMIZE TABLE is executed on a non-existing table
+# Replication should work when when OPTIMIZE TABLE is
+# executed on a non-existing table.
#
+# Due to patch for BUG#989, checking that an OPTIMIZE
+# that fails due to a lock wait timeout on an InnoDB table
+# is not valid anymore, as an mdl lock is hit before,
+# thence no timeout occurs, but instead a deadlock.
+#
+
eval CREATE TABLE t1 ( a int ) ENGINE=$engine_type;
BEGIN;
INSERT INTO t1 VALUES (1);
connection master1;
-OPTIMIZE TABLE t1;
-
OPTIMIZE TABLE non_existing;
sync_slave_with_master;
-# End of 4.1 tests
-
connection master;
select * from t1;
commit;
=== modified file 'mysql-test/suite/binlog/r/binlog_max_extension.result'
--- a/mysql-test/suite/binlog/r/binlog_max_extension.result 2009-04-24 12:55:11 +0000
+++ b/mysql-test/suite/binlog/r/binlog_max_extension.result 2009-06-26 14:28:57 +0000
@@ -1,12 +1,5 @@
RESET MASTER;
-**** Stop master server ****
-INDEX: MYSQLTEST_VARDIR/mysqld.1/data//master-bin.index
-BINLOG: MYSQLTEST_VARDIR/mysqld.1/data//master-bin.000001
-RENAMED BINLOG: MYSQLTEST_VARDIR/mysqld.1/data//master-bin.2147483646
-WROTE into index file last entry: ./master-bin.2147483646
-**** ReStart master server ****
FLUSH LOGS;
Warnings:
Warning 1098 Can't generate a unique log-filename master-bin.(1-999)
-RESET MASTER;
=== modified file 'mysql-test/suite/binlog/t/binlog_max_extension.test'
--- a/mysql-test/suite/binlog/t/binlog_max_extension.test 2009-04-24 12:55:11 +0000
+++ b/mysql-test/suite/binlog/t/binlog_max_extension.test 2009-06-26 14:28:57 +0000
@@ -19,54 +19,70 @@
# the new maximum and calls flush logs to get warning.
#
-source include/have_log_bin.inc;
-RESET MASTER;
-let $MYSQLTEST_DATADIR= `select @@datadir`;
+-- source include/have_log_bin.inc
+RESET MASTER;
-let DATADIR= $MYSQLTEST_DATADIR;
+-- let $MYSQLD_DATADIR= `select @@datadir`
###############################################
# check hitting maximum file name extension:
###############################################
-# Stop master server
---echo **** Stop master server ****
---write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+##########
+# Prepare
+##########
+
+# 1. Stop master server
+-- write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
wait
EOF
---shutdown_server 10
---source include/wait_until_disconnected.inc
-
---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
-perl;
-
-my $index_file= $ENV{'DATADIR'} . "/master-bin.index";
-my $bin_file= $ENV{'DATADIR'} . "/master-bin.000001";
-my $bin_long_file= $ENV{'DATADIR'} . "/master-bin.2147483646";
-
-print("INDEX: $index_file\n");
-print("BINLOG: $bin_file\n");
-print("RENAMED BINLOG: $bin_long_file\n");
-
-use File::Copy;
-copy($bin_file, $bin_long_file) or die "File cannot be copied.";
-
-open (F, ">>$index_file");
-print F "./master-bin.2147483646\n";
-close F;
-print("WROTE into index file last entry: ./master-bin.2147483646\n");
+-- shutdown_server 10
+-- source include/wait_until_disconnected.inc
+# 2. Prepare log and index file
+-- copy_file $MYSQLD_DATADIR/master-bin.index $MYSQLD_DATADIR/master-bin.index.orig
+-- copy_file $MYSQLD_DATADIR/master-bin.000001 $MYSQLD_DATADIR/master-bin.2147483646
+-- append_file $MYSQLD_DATADIR/master-bin.index
+master-bin.2147483646
EOF
---echo **** ReStart master server ****
---append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+# 3. Restart the server
+-- append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
restart
EOF
---enable_reconnect
---source include/wait_until_connected_again.inc
+-- enable_reconnect
+-- source include/wait_until_connected_again.inc
+
+###########
+# Assertion
+###########
-# should throw warning
+# assertion: should throw warning
FLUSH LOGS;
-RESET MASTER;
+##############
+# Clean up
+##############
+
+# 1. Stop the server
+-- write_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+wait
+EOF
+-- shutdown_server 10
+-- source include/wait_until_disconnected.inc
+
+# 2. Undo changes to index and log files
+-- remove_file $MYSQLD_DATADIR/master-bin.index
+-- copy_file $MYSQLD_DATADIR/master-bin.index.orig $MYSQLD_DATADIR/master-bin.index
+-- remove_file $MYSQLD_DATADIR/master-bin.index.orig
+
+-- remove_file $MYSQLD_DATADIR/master-bin.2147483646
+-- remove_file $MYSQLD_DATADIR/master-bin.2147483647
+
+# 3. Restart the server
+-- append_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+restart
+EOF
+-- enable_reconnect
+-- source include/wait_until_connected_again.inc
=== modified file 'mysql-test/suite/binlog/t/disabled.def'
--- a/mysql-test/suite/binlog/t/disabled.def 2009-05-11 10:22:35 +0000
+++ b/mysql-test/suite/binlog/t/disabled.def 2009-06-26 14:28:57 +0000
@@ -13,4 +13,3 @@ binlog_truncate_innodb : BUG#42643 2009-
binlog_multi_engine : Bug#30544 istruewing 2007-11-26
binlog_row_ctype_cp932 : Bug#33376 2007-12-19 mats Write set for table not set correctly when inserting an empty set
-binlog_max_extension : BUG#44779 2009-05-11 lsoares binlog_max_extension may be causing failure on next test in PB in windows x86 max-nt
=== modified file 'mysql-test/suite/rpl/r/rpl_failed_optimize.result'
--- a/mysql-test/suite/rpl/r/rpl_failed_optimize.result 2009-02-27 15:06:23 +0000
+++ b/mysql-test/suite/rpl/r/rpl_failed_optimize.result 2009-06-26 14:26:53 +0000
@@ -7,13 +7,6 @@ start slave;
CREATE TABLE t1 ( a int ) ENGINE=InnoDB;
BEGIN;
INSERT INTO t1 VALUES (1);
-OPTIMIZE TABLE t1;
-Table Op Msg_type Msg_text
-test.t1 optimize note Table does not support optimize, doing recreate + analyze instead
-test.t1 optimize error Lock wait timeout exceeded; try restarting transaction
-test.t1 optimize status Operation failed
-Warnings:
-Error 1205 Lock wait timeout exceeded; try restarting transaction
OPTIMIZE TABLE non_existing;
Table Op Msg_type Msg_text
test.non_existing optimize Error Table 'test.non_existing' doesn't exist
=== modified file 'mysql-test/suite/rpl/r/rpl_read_only.result'
--- a/mysql-test/suite/rpl/r/rpl_read_only.result 2007-06-27 12:28:02 +0000
+++ b/mysql-test/suite/rpl/r/rpl_read_only.result 2009-06-26 14:22:34 +0000
@@ -30,15 +30,26 @@ a
2001
set global read_only=0;
BEGIN;
+BEGIN;
+select @@read_only;
+@@read_only
+0
+set global read_only=1;
+*** On SUPER USER connection ***
insert into t1 values(1002);
insert into t2 values(2002);
-BEGIN;
+*** On regular USER connection ***
insert into t1 values(1003);
+ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
insert into t2 values(2003);
-set global read_only=1;
+ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
+*** SUPER USER COMMIT (must succeed) ***
COMMIT;
+*** regular USER COMMIT (must succeed - nothing to commit) ***
COMMIT;
-ERROR HY000: The MySQL server is running with the --read-only option so it cannot execute this statement
+select @@read_only;
+@@read_only
+1
set global read_only=0;
insert into t1 values(1004);
insert into t2 values(2004);
@@ -51,7 +62,6 @@ select * from t2;
a
2001
2002
-2003
2004
select * from t1;
a
@@ -62,7 +72,6 @@ select * from t2;
a
2001
2002
-2003
2004
set global read_only=1;
select @@read_only;
@@ -90,7 +99,6 @@ select * from t2;
a
2001
2002
-2003
2004
2005
select * from t1;
@@ -103,7 +111,6 @@ select * from t2;
a
2001
2002
-2003
2004
2005
insert into t1 values(1006);
=== modified file 'mysql-test/suite/rpl/t/disabled.def'
--- a/mysql-test/suite/rpl/t/disabled.def 2009-06-24 19:39:33 +0000
+++ b/mysql-test/suite/rpl/t/disabled.def 2009-06-26 14:26:53 +0000
@@ -15,6 +15,4 @@ rpl_extraColmaster_myisam : BUG#40796 2
rpl_cross_version : BUG#42311 2009-03-27 joro rpl_cross_version fails on macosx
rpl_heartbeat_basic : Bug#43828 Sporadic failures (Serge.Kozlov@stripped)
rpl_heartbeat_2slaves : Bug#43828 Sporadic failures (Serge.Kozlov@stripped)
-rpl_failed_optimize : Bug#44938 Replication fails when optimizing a table used by pending transaction.
-rpl_read_only : Bug#44958 Setting read_only won't succeed if tx is already started in different connection
rpl_init_slave : Bug#44920 2009-05-18 pcrews MTR2 is not processing master.opt input properly on Windows
=== removed file 'mysql-test/suite/rpl/t/rpl_failed_optimize-master.opt'
--- a/mysql-test/suite/rpl/t/rpl_failed_optimize-master.opt 2007-06-27 12:28:02 +0000
+++ b/mysql-test/suite/rpl/t/rpl_failed_optimize-master.opt 1970-01-01 00:00:00 +0000
@@ -1 +0,0 @@
---loose-innodb-lock-wait-timeout=1
=== modified file 'mysql-test/suite/rpl/t/rpl_read_only.test'
--- a/mysql-test/suite/rpl/t/rpl_read_only.test 2007-06-27 12:28:02 +0000
+++ b/mysql-test/suite/rpl/t/rpl_read_only.test 2009-06-26 14:22:34 +0000
@@ -39,26 +39,37 @@ set global read_only=0;
connection master1;
BEGIN;
-insert into t1 values(1002);
-insert into t2 values(2002);
connection master2;
BEGIN;
-insert into t1 values(1003);
-insert into t2 values(2003);
connection master;
+select @@read_only;
set global read_only=1;
connection master1;
+-- echo *** On SUPER USER connection ***
+insert into t1 values(1002);
+insert into t2 values(2002);
+
+connection master2;
+-- echo *** On regular USER connection ***
+--error ER_OPTION_PREVENTS_STATEMENT
+insert into t1 values(1003);
+--error ER_OPTION_PREVENTS_STATEMENT
+insert into t2 values(2003);
+
+connection master1;
## works even with read_only=1, because master1 is root
+-- echo *** SUPER USER COMMIT (must succeed) ***
COMMIT;
connection master2;
---error ER_OPTION_PREVENTS_STATEMENT
+-- echo *** regular USER COMMIT (must succeed - nothing to commit) ***
COMMIT;
connection master;
+select @@read_only;
set global read_only=0;
connection master1;
Attachment: [text/bzr-bundle] bzr/luis.soares@sun.com-20090629083542-87rjmhmf34xzmvp3.bundle
| Thread |
|---|
| • bzr commit into mysql-5.4 branch (luis.soares:2812) | Luis Soares | 29 Jun |