1
# check that CSV engine was compiled in, as the result of the test
2
# depends on the presence of the log tables (which are CSV-based).
3
--source include/have_csv.inc
6
# Clean up after previous tests
10
DROP TABLE IF EXISTS t1, `t``1`, `t 1`;
11
drop view if exists v1;
12
drop database if exists client_test_db;
16
# Bug #13783 mysqlcheck tries to optimize and analyze information_schema
18
--replace_result 'Table is already up to date' OK
19
--exec $DRIZZLE_CHECK --all-databases --analyze --optimize
20
--replace_result 'Table is already up to date' OK
21
--exec $DRIZZLE_CHECK --analyze --optimize --databases test information_schema mysql
22
--exec $DRIZZLE_CHECK --analyze --optimize information_schema schemata
25
# Bug #16502: mysqlcheck tries to check views
27
create table t1 (a int);
28
create view v1 as select * from t1;
29
--replace_result 'Table is already up to date' OK
30
--exec $DRIZZLE_CHECK --analyze --optimize --databases test
31
--replace_result 'Table is already up to date' OK
32
--exec $DRIZZLE_CHECK --all-in-1 --analyze --optimize --databases test
37
# Bug #30654: mysqlcheck fails during upgrade of tables whose names include backticks
39
create table `t``1`(a int);
40
create table `t 1`(a int);
41
--replace_result 'Table is already up to date' OK
42
--exec $DRIZZLE_CHECK --databases test
43
drop table `t``1`, `t 1`;
46
# Bug#25347: mysqlcheck -A -r doesn't repair table marked as crashed
48
create database d_bug25347;
50
create table t_bug25347 (a int);
51
create view v_bug25347 as select * from t_bug25347;
52
insert into t_bug25347 values (1),(2),(3);
54
--echo removing and creating
55
--remove_file $MYSQLTEST_VARDIR/master-data/d_bug25347/t_bug25347.MYI
56
--write_file $MYSQLTEST_VARDIR/master-data/d_bug25347/t_bug25347.MYI
58
--exec $DRIZZLE_CHECK --repair --databases d_bug25347
60
insert into t_bug25347 values (4),(5),(6);
61
--exec $DRIZZLE_CHECK --repair --use-frm --databases d_bug25347
62
insert into t_bug25347 values (7),(8),(9);
63
select * from t_bug25347;
64
select * from v_bug25347;
66
drop table t_bug25347;
67
drop database d_bug25347;
70
--echo End of 5.0 tests
73
# Bug #30679: 5.1 name encoding not performed for views during upgrade
75
create table t1(a int);
76
create view v1 as select * from t1;
78
--copy_file $MYSQLTEST_VARDIR/master-data/test/v1.frm $MYSQLTEST_VARDIR/master-data/test/v-1.frm
80
--exec $DRIZZLE_CHECK --check-upgrade --fix-table-names --databases test