List:Commits« Previous MessageNext Message »
From:Satya Bodapati Date:November 19 2012 9:54am
Subject:bzr push into mysql-5.6 branch (satya.bodapati:4624 to 4625) Bug#14147491
View as plain text  
 4625 Satya Bodapati	2012-11-19 [merge]
      Merge fix for BUG#14147491 from mysql-5.5 to mysql-5.6

    added:
      mysql-test/suite/innodb/r/innodb_bug14147491.result
      mysql-test/suite/innodb/t/innodb_bug14147491-master.opt
      mysql-test/suite/innodb/t/innodb_bug14147491.test
 4624 Sneha Modi	2012-11-19
      Adding the big-test option to innodb/innodb-wl5522-debug.test as it takes a ling time to
      execute and removing the big-test option from innodb/innodb-wl5522.test as it does not
      take a very long time to execute.

    modified:
      mysql-test/suite/innodb/t/innodb-wl5522-debug.test
      mysql-test/suite/innodb/t/innodb-wl5522.test
=== added file 'mysql-test/suite/innodb/r/innodb_bug14147491.result'
--- a/mysql-test/suite/innodb/r/innodb_bug14147491.result	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb/r/innodb_bug14147491.result	revid:satya.bodapati@stripped
@@ -0,0 +1,17 @@
+CALL mtr.add_suppression("InnoDB: Error: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts");
+CALL mtr.add_suppression("InnoDB: Warning: database page corruption or a failed");
+# Create and populate the table to be corrupted
+CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB;
+INSERT INTO t1 (b) VALUES ('corrupt me');
+INSERT INTO t1 (b) VALUES ('corrupt me');
+# Restart server to flush buffers
+# Corrupt the table
+Munged a string.
+Munged a string.
+# Write file to make mysql-test-run.pl expect crash and restart
+SELECT * FROM t1;
+ERROR HY000: Lost connection to MySQL server during query
+# Turn on reconnect
+# Wait for server to fully start
+# Cleanup
+DROP TABLE t1;

=== added file 'mysql-test/suite/innodb/t/innodb_bug14147491-master.opt'
--- a/mysql-test/suite/innodb/t/innodb_bug14147491-master.opt	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb/t/innodb_bug14147491-master.opt	revid:satya.bodapati@stripped
@@ -0,0 +1 @@
+--innodb_file_per_table=1 --skip-stack-trace --skip-core-file

=== added file 'mysql-test/suite/innodb/t/innodb_bug14147491.test'
--- a/mysql-test/suite/innodb/t/innodb_bug14147491.test	1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/innodb/t/innodb_bug14147491.test	revid:satya.bodapati@stripped
@@ -0,0 +1,75 @@
+#
+# Test opening a corrupted table.
+#
+
+# Don't test under valgrind, memory leaks will occur
+source include/not_valgrind.inc;
+# Avoid CrashReporter popup on Mac
+source include/not_crashrep.inc;
+# Don't test under embedded
+source include/not_embedded.inc;
+# Require InnoDB
+source include/have_innodb.inc;
+
+CALL mtr.add_suppression("InnoDB: Error: Unable to read tablespace .* page no .* into the buffer pool after 100 attempts");
+CALL mtr.add_suppression("InnoDB: Warning: database page corruption or a failed");
+
+--echo # Create and populate the table to be corrupted
+CREATE TABLE t1 (a INT AUTO_INCREMENT PRIMARY KEY, b TEXT) ENGINE=InnoDB;
+INSERT INTO t1 (b) VALUES ('corrupt me');
+--disable_query_log
+--let $i = 10
+while ($i)
+{
+  INSERT INTO t1 (b) VALUES (REPEAT('abcdefghijklmnopqrstuvwxyz', 100));
+  dec $i;
+}
+--enable_query_log
+INSERT INTO t1 (b) VALUES ('corrupt me');
+
+--echo # Restart server to flush buffers
+source include/restart_mysqld.inc;
+
+--echo # Corrupt the table
+let $MYSQLD_DATADIR=`select @@datadir`;
+let t1_IBD = $MYSQLD_DATADIR/test/t1.ibd;
+
+perl;
+use strict;
+use warnings;
+use Fcntl qw(:DEFAULT :seek);
+
+my $ibd_file = $ENV{'t1_IBD'};
+
+my $chunk;
+my $len;
+
+sysopen IBD_FILE, $ibd_file, O_RDWR || die "Unable to open $ibd_file";
+
+while ($len = sysread IBD_FILE, $chunk, 1024)
+{
+  if ($chunk =~ s/corrupt me/korrupt me/)
+  {
+    print "Munged a string.\n";
+    sysseek IBD_FILE, -$len, SEEK_CUR;
+    syswrite IBD_FILE, $chunk, $len;
+  }
+}
+
+close IBD_FILE;
+EOF
+
+--echo # Write file to make mysql-test-run.pl expect crash and restart
+--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
+
+--error 2013
+SELECT * FROM t1;
+
+--echo # Turn on reconnect
+--enable_reconnect
+
+--echo # Wait for server to fully start
+--source include/wait_until_connected_again.inc
+
+--echo # Cleanup
+DROP TABLE t1;

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.6 branch (satya.bodapati:4624 to 4625) Bug#14147491Satya Bodapati19 Nov