summaryrefslogtreecommitdiff
path: root/mysql-test/t/repair.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/repair.test')
-rw-r--r--mysql-test/t/repair.test31
1 files changed, 31 insertions, 0 deletions
diff --git a/mysql-test/t/repair.test b/mysql-test/t/repair.test
index 84614798832..eb2ca7992a6 100644
--- a/mysql-test/t/repair.test
+++ b/mysql-test/t/repair.test
@@ -114,6 +114,37 @@ SET myisam_sort_buffer_size=@@global.myisam_sort_buffer_size;
DROP TABLE t1;
--echo End of 4.1 tests
+
+#
+# BUG#36055 - mysql_upgrade doesn't really 'upgrade' tables
+#
+
+--echo # Test with a saved table from 4.1
+let $MYSQLD_DATADIR= `select @@datadir`;
+--copy_file std_data/bug36055.frm $MYSQLD_DATADIR/test/t1.frm
+--copy_file std_data/bug36055.MYD $MYSQLD_DATADIR/test/t1.MYD
+--copy_file std_data/bug36055.MYI $MYSQLD_DATADIR/test/t1.MYI
+
+--replace_column 12 # 13 #
+SHOW TABLE STATUS LIKE 't1';
+SELECT * FROM t1;
+
+--echo # Run CHECK TABLE, it should indicate table need a REPAIR TABLE
+CHECK TABLE t1 FOR UPGRADE;
+
+--echo # REPAIR old table USE_FRM should fail
+REPAIR TABLE t1 USE_FRM;
+
+--echo # Run REPAIR TABLE to upgrade .frm file
+REPAIR TABLE t1;
+--replace_column 12 # 13 #
+SHOW TABLE STATUS LIKE 't1';
+SELECT * FROM t1;
+
+REPAIR TABLE t1 USE_FRM;
+SELECT * FROM t1;
+
+DROP TABLE t1;
# End of 5.0 tests
#