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.test20
1 files changed, 20 insertions, 0 deletions
diff --git a/mysql-test/t/repair.test b/mysql-test/t/repair.test
index 6536c052019..5b78a352863 100644
--- a/mysql-test/t/repair.test
+++ b/mysql-test/t/repair.test
@@ -190,3 +190,23 @@ set @@autocommit= 0;
repair table t1, t2;
set @@autocommit= default;
drop tables t1, t2;
+
+--echo #
+--echo # Check that we have decent error messages when using crashed
+--echo # .frm file from MySQL 3.23
+--echo #
+
+--echo # Test with a saved table from 3.23
+let $MYSQLD_DATADIR= `select @@datadir`;
+--copy_file std_data/host_old.frm $MYSQLD_DATADIR/test/t1.frm
+--copy_file std_data/host_old.MYD $MYSQLD_DATADIR/test/t1.MYD
+--copy_file std_data/host_old.MYI $MYSQLD_DATADIR/test/t1.MYI
+
+--error ER_GET_ERRNO
+select count(*) from t1;
+check table t1;
+repair table t1;
+repair table t1 use_frm;
+select count(*) from t1;
+check table t1;
+drop table t1;