2
# Embedded server doesn't support external clients
3
--source include/not_embedded.inc
5
# check that CSV engine was compiled in, as the result of the test
6
# depends on the presence of the log tables (which are CSV-based).
7
--source include/have_csv.inc
10
# Clean up after previous tests
14
DROP TABLE IF EXISTS t1, `t``1`, `t 1`;
15
drop view if exists v1;
16
drop database if exists client_test_db;
20
# Bug #13783 mysqlcheck tries to optimize and analyze information_schema
22
--replace_result 'Table is already up to date' OK
23
--exec $MYSQL_CHECK --all-databases --analyze --optimize
24
--replace_result 'Table is already up to date' OK
25
--exec $MYSQL_CHECK --analyze --optimize --databases test information_schema mysql
26
--exec $MYSQL_CHECK --analyze --optimize information_schema schemata
29
# Bug #16502: mysqlcheck tries to check views
31
create table t1 (a int);
32
create view v1 as select * from t1;
33
--replace_result 'Table is already up to date' OK
34
--exec $MYSQL_CHECK --analyze --optimize --databases test
35
--replace_result 'Table is already up to date' OK
36
--exec $MYSQL_CHECK --all-in-1 --analyze --optimize --databases test
41
# Bug #30654: mysqlcheck fails during upgrade of tables whose names include backticks
43
create table `t``1`(a int);
44
create table `t 1`(a int);
45
--replace_result 'Table is already up to date' OK
46
--exec $MYSQL_CHECK --databases test
47
drop table `t``1`, `t 1`;
50
# Bug#25347: mysqlcheck -A -r doesn't repair table marked as crashed
52
create database d_bug25347;
54
create table t_bug25347 (a int);
55
create view v_bug25347 as select * from t_bug25347;
56
insert into t_bug25347 values (1),(2),(3);
58
--echo removing and creating
59
--remove_file $MYSQLTEST_VARDIR/master-data/d_bug25347/t_bug25347.MYI
60
--write_file $MYSQLTEST_VARDIR/master-data/d_bug25347/t_bug25347.MYI
62
--exec $MYSQL_CHECK --repair --databases d_bug25347
64
insert into t_bug25347 values (4),(5),(6);
65
--exec $MYSQL_CHECK --repair --use-frm --databases d_bug25347
66
insert into t_bug25347 values (7),(8),(9);
67
select * from t_bug25347;
68
select * from v_bug25347;
70
drop table t_bug25347;
71
drop database d_bug25347;
74
--echo End of 5.0 tests
77
# Bug #30679: 5.1 name encoding not performed for views during upgrade
79
create table t1(a int);
80
create view v1 as select * from t1;
82
--copy_file $MYSQLTEST_VARDIR/master-data/test/v1.frm $MYSQLTEST_VARDIR/master-data/test/v-1.frm
84
--exec $MYSQL_CHECK --check-upgrade --fix-table-names --databases test