List:Commits« Previous MessageNext Message »
From:Satya B Date:January 21 2009 12:54pm
Subject:bzr commit into mysql-5.1-bugteam branch (satya.bn:2749) Bug#41574
View as plain text  
#At file:///home/satya/WORK/mysql-5.1-bugteam-41574/

 2749 Satya B	2009-01-21
      TestCase for BUG#41574 - REPAIR TABLE: crashes for compressed tables
      
      Adding two testcases as the bug is already fixed
      
      TestCase-1 Test repair table after compression without 'OPTIMIZE TABLE'
      TestCase-2 Test repair table after compression with 'OPTIMIZE TABLE'
modified:
  mysql-test/r/myisampack.result
  mysql-test/t/myisampack.test

per-file messages:
  mysql-test/r/myisampack.result
    result file for the modified mysiampack.test
  mysql-test/t/myisampack.test
    testcases added to test REPAIR TABLE for compressed tables
=== modified file 'mysql-test/r/myisampack.result'
--- a/mysql-test/r/myisampack.result	2008-12-17 13:23:21 +0000
+++ b/mysql-test/r/myisampack.result	2009-01-21 12:54:34 +0000
@@ -49,3 +49,30 @@ test.t1	optimize	error	Table 'test.t1' i
 Warnings:
 Error	1036	Table 't1' is read only
 drop table t1;
+# ====== REPAIR COMPRESSED TABLE WTHOUT 'OPTIMIZE TABLE' ==========
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(f1 INT, f2 CHAR(255));
+INSERT INTO t1 VALUES(1, 'foo'), (2, 'bar');
+FLUSH TABLES;
+REPAIR TABLE t1;
+Table	Op	Msg_type	Msg_text
+test.t1	repair	error	Table 'test.t1' is read only
+Warnings:
+Error	1036	Table 't1' is read only
+DROP TABLE t1;
+# ====== REPAIR COMPRESSED TABLE WITH 'OPTIMIZE TABLE' ==========
+DROP TABLE IF EXISTS t1;
+CREATE TABLE t1(f1 INT, f2 CHAR(255));
+INSERT INTO t1 VALUES(1, 'foo'), (2, 'bar');
+FLUSH TABLES;
+OPTIMIZE TABLE t1;
+Table	Op	Msg_type	Msg_text
+test.t1	optimize	error	Table 'test.t1' is read only
+Warnings:
+Error	1036	Table 't1' is read only
+REPAIR TABLE t1;
+Table	Op	Msg_type	Msg_text
+test.t1	repair	error	Table 'test.t1' is read only
+Warnings:
+Error	1036	Table 't1' is read only
+DROP TABLE t1;

=== modified file 'mysql-test/t/myisampack.test'
--- a/mysql-test/t/myisampack.test	2008-12-17 13:23:21 +0000
+++ b/mysql-test/t/myisampack.test	2009-01-21 12:54:34 +0000
@@ -56,3 +56,53 @@ flush tables;
 --exec $MYISAMPACK $MYSQLTEST_VARDIR/master-data/test/t1
 optimize table t1;
 drop table t1;
+
+#
+# Bug#41574 REPAIR TABLE: crashes for compressed tables
+#
+##########################################################################
+# Testcase REPAIR TABLE.1: testcase for REPAIR TABLE to test compressed
+# tables without 'OPTIMIZE TABLE' 
+##########################################################################
+--echo # ====== REPAIR COMPRESSED TABLE WTHOUT 'OPTIMIZE TABLE' ==========
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+CREATE TABLE t1(f1 INT, f2 CHAR(255));
+INSERT INTO t1 VALUES(1, 'foo'), (2, 'bar');
+let $i=12;
+--disable_query_log
+while ($i)
+{
+ INSERT INTO t1 SELECT * FROM t1; 
+ dec $i; 
+}
+--enable_query_log
+FLUSH TABLES;
+--exec $MYISAMPACK $MYSQLTEST_VARDIR/master-data/test/t1
+REPAIR TABLE t1;
+DROP TABLE t1;
+##########################################################################
+# Testcase REPAIR TABLE.2: testcase for REPAIR TABLE to test compressed
+# tables with 'OPTIMIZE TABLE' 
+##########################################################################
+--echo # ====== REPAIR COMPRESSED TABLE WITH 'OPTIMIZE TABLE' ==========
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+CREATE TABLE t1(f1 INT, f2 CHAR(255));
+INSERT INTO t1 VALUES(1, 'foo'), (2, 'bar');
+let $i=12;
+--disable_query_log
+while ($i)
+{
+ INSERT INTO t1 SELECT * FROM t1; 
+ dec $i; 
+}
+--enable_query_log
+FLUSH TABLES;
+--exec $MYISAMPACK $MYSQLTEST_VARDIR/master-data/test/t1
+OPTIMIZE TABLE t1;
+REPAIR TABLE t1;
+DROP TABLE t1;
+

Thread
bzr commit into mysql-5.1-bugteam branch (satya.bn:2749) Bug#41574Satya B21 Jan