~linuxjedi/drizzle/trunk-bug-667053

« back to all changes in this revision

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

  • Committer: brian
  • Date: 2008-06-25 05:29:13 UTC
  • Revision ID: brian@localhost.localdomain-20080625052913-6upwo0jsrl4lnapl
clean slate

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
# Embedded server doesn't support external clients
 
3
--source include/not_embedded.inc
 
4
 
 
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
 
8
 
 
9
#
 
10
# Clean up after previous tests
 
11
#
 
12
 
 
13
--disable_warnings
 
14
DROP TABLE IF EXISTS t1, `t``1`, `t 1`;
 
15
drop view if exists v1;
 
16
drop database if exists client_test_db;
 
17
--enable_warnings
 
18
 
 
19
#
 
20
# Bug #13783  mysqlcheck tries to optimize and analyze information_schema
 
21
#
 
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
 
27
 
 
28
#
 
29
# Bug #16502: mysqlcheck tries to check views
 
30
#
 
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
 
37
drop view v1;
 
38
drop table t1;
 
39
 
 
40
#
 
41
# Bug #30654: mysqlcheck fails during upgrade of tables whose names include backticks
 
42
#
 
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`;
 
48
 
 
49
#
 
50
# Bug#25347: mysqlcheck -A -r doesn't repair table marked as crashed
 
51
#
 
52
create database d_bug25347;
 
53
use 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);
 
57
flush tables;
 
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
 
61
EOF
 
62
--exec $MYSQL_CHECK --repair --databases d_bug25347
 
63
--error 130
 
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;
 
69
drop view v_bug25347;
 
70
drop table t_bug25347;
 
71
drop database d_bug25347;
 
72
use test;
 
73
 
 
74
--echo End of 5.0 tests
 
75
 
 
76
#
 
77
# Bug #30679: 5.1 name encoding not performed for views during upgrade
 
78
#
 
79
create table t1(a int);
 
80
create view v1 as select * from t1;
 
81
show tables;
 
82
--copy_file $MYSQLTEST_VARDIR/master-data/test/v1.frm $MYSQLTEST_VARDIR/master-data/test/v-1.frm
 
83
show tables;
 
84
--exec $MYSQL_CHECK --check-upgrade --fix-table-names --databases test
 
85
show tables;
 
86
drop view v1, `v-1`;
 
87
drop table t1;