~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysql-test/t/mysqlcheck.test

Renamed more stuff to drizzle.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
4
 
 
5
#
 
6
# Clean up after previous tests
 
7
#
 
8
 
 
9
--disable_warnings
 
10
DROP TABLE IF EXISTS t1, `t``1`, `t 1`;
 
11
drop view if exists v1;
 
12
drop database if exists client_test_db;
 
13
--enable_warnings
 
14
 
 
15
#
 
16
# Bug #13783  mysqlcheck tries to optimize and analyze information_schema
 
17
#
 
18
--replace_result 'Table is already up to date' OK
 
19
--exec $MYSQL_CHECK --all-databases --analyze --optimize
 
20
--replace_result 'Table is already up to date' OK
 
21
--exec $MYSQL_CHECK --analyze --optimize  --databases test information_schema mysql
 
22
--exec $MYSQL_CHECK --analyze --optimize information_schema schemata
 
23
 
 
24
#
 
25
# Bug #16502: mysqlcheck tries to check views
 
26
#
 
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 $MYSQL_CHECK --analyze --optimize --databases test
 
31
--replace_result 'Table is already up to date' OK
 
32
--exec $MYSQL_CHECK --all-in-1 --analyze --optimize --databases test
 
33
drop view v1;
 
34
drop table t1;
 
35
 
 
36
#
 
37
# Bug #30654: mysqlcheck fails during upgrade of tables whose names include backticks
 
38
#
 
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 $MYSQL_CHECK --databases test
 
43
drop table `t``1`, `t 1`;
 
44
 
 
45
#
 
46
# Bug#25347: mysqlcheck -A -r doesn't repair table marked as crashed
 
47
#
 
48
create database d_bug25347;
 
49
use 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);
 
53
flush tables;
 
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
 
57
EOF
 
58
--exec $MYSQL_CHECK --repair --databases d_bug25347
 
59
--error 130
 
60
insert into t_bug25347 values (4),(5),(6);
 
61
--exec $MYSQL_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;
 
65
drop view v_bug25347;
 
66
drop table t_bug25347;
 
67
drop database d_bug25347;
 
68
use test;
 
69
 
 
70
--echo End of 5.0 tests
 
71
 
 
72
#
 
73
# Bug #30679: 5.1 name encoding not performed for views during upgrade
 
74
#
 
75
create table t1(a int);
 
76
create view v1 as select * from t1;
 
77
show tables;
 
78
--copy_file $MYSQLTEST_VARDIR/master-data/test/v1.frm $MYSQLTEST_VARDIR/master-data/test/v-1.frm
 
79
show tables;
 
80
--exec $MYSQL_CHECK --check-upgrade --fix-table-names --databases test
 
81
show tables;
 
82
drop view v1, `v-1`;
 
83
drop table t1;