List:Commits« Previous MessageNext Message »
From:Andrei Elkin Date:February 16 2012 3:12pm
Subject:bzr push into mysql-trunk-wl3584 branch (andrei.elkin:3632 to 3633) WL#3584
View as plain text  
 3633 Andrei Elkin	2012-02-16
      wl#3584 
      
      Couple of asserts seem to have survived cleanup done at empty group patch time;
      a new test is added in order to exprore circumstances of rpl.rpl_gtid_lost_fail_to_connect
      failure.
     @ mysql-test/suite/rpl/r/rpl_fail_to_connect.result
        a new result file is added.
     @ mysql-test/suite/rpl/t/rpl_fail_to_connect.test
        a new test is added, maybe temprorarily, see Purpose.
     @ sql/handler.cc
        asserts have been unnecessary since the empty group and removing early binlog hton registration patch.

    added:
      mysql-test/suite/rpl/r/rpl_fail_to_connect.result
      mysql-test/suite/rpl/t/rpl_fail_to_connect.test
    modified:
      sql/handler.cc
 3632 Sven Sandberg	2012-02-16
      WL#3584 cleanup
      Put Gtid_log_event on the dump thread's stack
      to avoid allocation

    modified:
      sql/rpl_master.cc
=== added file 'mysql-test/suite/rpl/r/rpl_fail_to_connect.result'
--- a/mysql-test/suite/rpl/r/rpl_fail_to_connect.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/r/rpl_fail_to_connect.result	2012-02-16 15:11:03 +0000
@@ -0,0 +1,22 @@
+include/master-slave.inc
+Warnings:
+Note	1756	Sending passwords in plain text without SSL/TLS is extremely insecure.
+Note	1757	Storing MySQL user name or password information in the master.info repository is not secure and is therefore not recommended. Please see the MySQL Manual for more about this issue and possible alternatives.
+[connection master]
+call mtr.add_suppression("Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file'");
+######## Initialize ########
+CREATE TABLE t1 (a INT) ENGINE = InnoDB;
+include/stop_slave.inc
+INSERT INTO t1 VALUES (1);
+FLUSH LOGS;
+INSERT INTO t1 VALUES (2);
+PURGE BINARY LOGS TO 'master-bin.000002';
+START SLAVE;
+include/wait_for_slave_io_error.inc [errno=1236 # ER_MASTER_FATAL_ERROR_READING_BINLOG]
+include/stop_slave_sql.inc
+RESET MASTER;
+RESET SLAVE;
+include/start_slave.inc
+######## Clean up ########
+DROP TABLE t1;
+include/rpl_end.inc

=== added file 'mysql-test/suite/rpl/t/rpl_fail_to_connect.test'
--- a/mysql-test/suite/rpl/t/rpl_fail_to_connect.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/rpl/t/rpl_fail_to_connect.test	2012-02-16 15:11:03 +0000
@@ -0,0 +1,46 @@
+# ==== Purpose ====
+#
+# Test that the slave fails to resume replication from a position
+# in the master binlog if the binlog was removed (e.g purged).
+# The test is similar to a first part of rpl_gtid_lost_fail_to_connect and its intention
+# is to explore circumstances under which the latter fails on PB.
+
+--source include/master-slave.inc
+call mtr.add_suppression("Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file'");
+
+--echo ######## Initialize ########
+
+CREATE TABLE t1 (a INT) ENGINE = InnoDB;
+--sync_slave_with_master
+--source include/stop_slave.inc
+
+--connection master
+INSERT INTO t1 VALUES (1);
+FLUSH LOGS;
+--let $master_file= query_get_value(SHOW MASTER STATUS, File, 1)
+--let $master_pos= query_get_value(SHOW MASTER STATUS, Position, 1)
+INSERT INTO t1 VALUES (2);
+--save_master_pos
+eval PURGE BINARY LOGS TO '$master_file';
+
+--connection slave
+
+START SLAVE;
+
+--let $slave_io_errno= 1236 # ER_MASTER_FATAL_ERROR_READING_BINLOG
+--source include/wait_for_slave_io_error.inc
+--source include/stop_slave_sql.inc
+
+--connection master
+RESET MASTER;
+
+--connection slave
+RESET SLAVE;
+--source include/start_slave.inc
+
+--echo ######## Clean up ########
+--connection master
+DROP TABLE t1;
+
+--connection slave
+--source include/rpl_end.inc

=== modified file 'sql/handler.cc'
--- a/sql/handler.cc	2012-02-08 15:49:24 +0000
+++ b/sql/handler.cc	2012-02-16 15:11:03 +0000
@@ -1180,9 +1180,7 @@ int ha_commit_trans(THD *thd, bool all)
     counterpart.
   */
   DBUG_ASSERT(thd->transaction.stmt.ha_list == NULL ||
-              trans == &thd->transaction.stmt ||
-              thd->get_gtid_next_list() != NULL ||
-              thd->variables.gtid_next.type == GTID_GROUP); // @todo: are the two extra clauses for gtids correct? /sven
+              trans == &thd->transaction.stmt);
 
   if (thd->in_sub_stmt)
   {
@@ -1408,9 +1406,7 @@ int ha_rollback_trans(THD *thd, bool all
     transaction is pending.
   */
   DBUG_ASSERT(thd->transaction.stmt.ha_list == NULL ||
-              trans == &thd->transaction.stmt ||
-              thd->get_gtid_next_list() != NULL ||
-              thd->variables.gtid_next.type == GTID_GROUP); // @todo: are the two extra clauses for gtids correct? /sven
+              trans == &thd->transaction.stmt);
 
   if (thd->in_sub_stmt)
   {

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-trunk-wl3584 branch (andrei.elkin:3632 to 3633) WL#3584Andrei Elkin16 Feb