diff options
author | unknown <cmiller@zippy.cornsilk.net> | 2008-01-23 11:37:46 -0500 |
---|---|---|
committer | unknown <cmiller@zippy.cornsilk.net> | 2008-01-23 11:37:46 -0500 |
commit | 616fd5575363669bd4037dda852ec8732fc71705 (patch) | |
tree | 29dbbb37112d2a2fdc21d47f0bae8070cc78a21b /mysql-test/t/mysqlcheck.test | |
parent | 349c2acc212ca09a8fa52e520debfb43d455dca3 (diff) | |
download | mariadb-git-616fd5575363669bd4037dda852ec8732fc71705.tar.gz |
Patch contributed by Jocelyn Fournier. CLA received 2007-02-27.
Bug#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.
client/mysqlcheck.c:
Use SHOW FULL TABLES to test better whether a name in the table
list is one of a view. Checking that the engine is NULL is
insufficient.
Implemented suggestion from jimw that involved removing most of
original patch and getting data a better way
mysql-test/r/mysqlcheck.result:
Verify that tables that have NULL/unreadable engine types are
processed and not interpreted as views.
mysql-test/t/mysqlcheck.test:
Verify that tables that have NULL/unreadable engine types are
processed and not interpreted as views.
Diffstat (limited to 'mysql-test/t/mysqlcheck.test')
-rw-r--r-- | mysql-test/t/mysqlcheck.test | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/t/mysqlcheck.test b/mysql-test/t/mysqlcheck.test index 04e7b6b4bdb..532e34d1980 100644 --- a/mysql-test/t/mysqlcheck.test +++ b/mysql-test/t/mysqlcheck.test @@ -40,4 +40,20 @@ create table `t 1`(a int); --exec $MYSQL_CHECK --databases test drop table `t``1`, `t 1`; +# +# 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 |