List:Commits« Previous MessageNext Message »
From:marko.makela Date:September 24 2012 1:14pm
Subject:bzr push into mysql-5.6-wl6494 branch (marko.makela:4309 to 4310) WL#6494
View as plain text  
 4310 Marko Mäkelä	2012-09-24
      WL#6494: Add a basic test, not crashing during the log switch.

    added:
      mysql-test/suite/innodb/r/innodb-log-file-size.result
      mysql-test/suite/innodb/t/innodb-log-file-size.test
 4309 Marko Mäkelä	2012-09-24
      WL#6494 crash injection for server startup (innodb_force_recovery_crash)
      
      RECOVERY_CRASH(x): A macro for crashing the server if
      innodb_force_recovery_crash is set to a particular value.
      
      create_log_files(), create_log_files_rename(),
      innobase_start_or_create_for_mysql(): Add RECOVERY_CRASH() injection.

    added:
      mysql-test/suite/sys_vars/r/innodb_force_recovery_crash_basic.result
      mysql-test/suite/sys_vars/t/innodb_force_recovery_crash_basic.test
    modified:
      storage/innobase/handler/ha_innodb.cc
      storage/innobase/include/srv0srv.h
      storage/innobase/srv/srv0srv.cc
      storage/innobase/srv/srv0start.cc
=== added file 'mysql-test/suite/innodb/r/innodb-log-file-size.result'
--- a/mysql-test/suite/innodb/r/innodb-log-file-size.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb/r/innodb-log-file-size.result	revid:marko.makela@stripped0924131307-m56s1p52z9s227yl
@@ -0,0 +1,17 @@
+call mtr.add_suppression("InnoDB: Resizing redo log");
+call mtr.add_suppression("InnoDB: Starting to delete and rewrite log files");
+call mtr.add_suppression("InnoDB: New log files created");
+CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
+SET DEBUG='+d,crash_commit_before';
+INSERT INTO t1 VALUES (42);
+ERROR HY000: Lost connection to MySQL server during query
+SELECT * FROM t1;
+a
+INSERT INTO t1 VALUES (42);
+SET DEBUG='+d,crash_commit_before';
+DELETE FROM t1;
+ERROR HY000: Lost connection to MySQL server during query
+SELECT * FROM t1;
+a
+42
+DROP TABLE t1;

=== added file 'mysql-test/suite/innodb/t/innodb-log-file-size.test'
--- a/mysql-test/suite/innodb/t/innodb-log-file-size.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb/t/innodb-log-file-size.test	revid:marko.makela@oracle.com-20120924131307-m56s1p52z9s227yl
@@ -0,0 +1,47 @@
+# Test resizing the InnoDB redo log.
+
+--source include/have_innodb.inc
+--source include/have_debug.inc
+
+# Valgrind would complain about memory leaks when we crash on purpose.
+--source include/not_valgrind.inc
+# Embedded server does not support crashing
+--source include/not_embedded.inc
+# Avoid CrashReporter popup on Mac
+--source include/not_crashrep.inc
+
+call mtr.add_suppression("InnoDB: Resizing redo log");
+call mtr.add_suppression("InnoDB: Starting to delete and rewrite log files");
+call mtr.add_suppression("InnoDB: New log files created");
+
+CREATE TABLE t1(a INT PRIMARY KEY) ENGINE=InnoDB;
+
+SET DEBUG='+d,crash_commit_before';
+# Write file to make mysql-test-run.pl restart the server
+--exec echo "restart: --innodb-log-file-size=6M" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--error 2013
+INSERT INTO t1 VALUES (42);
+
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+--disable_reconnect
+
+SELECT * FROM t1;
+
+INSERT INTO t1 VALUES (42);
+
+SET DEBUG='+d,crash_commit_before';
+# Write file to make mysql-test-run.pl restart the server
+--exec echo "restart: --innodb-log-files-in-group=3 --innodb-log-file-size=5M" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+--error 2013
+DELETE FROM t1;
+
+--enable_reconnect
+--source include/wait_until_connected_again.inc
+--disable_reconnect
+
+SELECT * FROM t1;
+
+# TODO: Test with --innodb-force-recovery-crash
+
+DROP TABLE t1;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.6-wl6494 branch (marko.makela:4309 to 4310) WL#6494marko.makela26 Sep