summaryrefslogtreecommitdiff
path: root/mysql-test/t/mysqlcheck.test
diff options
context:
space:
mode:
authorcmiller@zippy.cornsilk.net <>2007-04-03 18:12:31 -0400
committercmiller@zippy.cornsilk.net <>2007-04-03 18:12:31 -0400
commit2e698f8c4e2cf51a82eb6a76d2e8d66f82862b5e (patch)
tree277a34e01d31a440fe065df2535c9f5ed815d67e /mysql-test/t/mysqlcheck.test
parent9816842b581d3f81030b97f83a46d19e1b08cdd5 (diff)
downloadmariadb-git-2e698f8c4e2cf51a82eb6a76d2e8d66f82862b5e.tar.gz
Backport:
Patch contributed by Jocelyn Fournier. CLA received 2007-02-27. B-g#25347: mysqlcheck -A -r doesn't repair table marked as crashed mysqlcheck tests nullness of the engine type to know whether the "table" is a view or not. That also falsely catches tables that are severly damaged. Instead, use SHOW FULL TABLES to test whether a "table" is a view or not. (Don't add new function. Instead, get original data a smarter way.) Make it safe for use against databases before when views appeared.
Diffstat (limited to 'mysql-test/t/mysqlcheck.test')
-rw-r--r--mysql-test/t/mysqlcheck.test16
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/t/mysqlcheck.test b/mysql-test/t/mysqlcheck.test
index f4e18d4004f..eb732a05909 100644
--- a/mysql-test/t/mysqlcheck.test
+++ b/mysql-test/t/mysqlcheck.test
@@ -31,4 +31,20 @@ create view v1 as select * from t1;
drop view v1;
drop table t1;
+#
+# Bug#25347: mysqlcheck -A -r doesn't repair table marked as crashed
+#
+create database d_bug25347;
+use d_bug25347;
+create table t_bug25347 (a int);
+create view v_bug25347 as select * from t_bug25347;
+--echo removing and creating
+--exec rm $MYSQLTEST_VARDIR/master-data/d_bug25347/t_bug25347.MYI;
+--exec touch $MYSQLTEST_VARDIR/master-data/d_bug25347/t_bug25347.MYI;
+--exec $MYSQL_CHECK --repair --databases d_bug25347
+drop view v_bug25347;
+drop table t_bug25347;
+drop database d_bug25347;
+use test;
+
--echo End of 5.0 tests