1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
#
# Bug #10901 Analyze Table on new table destroys table
# This is minimal test case to get error
# The problem was that analyze table wrote the shared state to the
# file and this didn't include the inserts while locked. A check was
# needed to ensure that state information was not updated when
# executing analyze table for a locked table. The analyze table had
# to be within locks and check table had to be after unlocking since
# then it brings the wrong state from disk rather than from the
# currently correct internal state. The insert is needed since it
# changes the file state, number of records. The fix is to
# synchronise the state of the shared state and the current state
# before calling mi_state_info_write
#
create table t1 (a bigint);
insert into t1 values(0);
analyze table t1;
check table t1;
drop table t1;
create table t1 (a bigint);
insert into t1 values(0);
delete from t1;
analyze table t1;
check table t1;
drop table t1;
create table t1 (a bigint);
insert into t1 values(0);
analyze table t1;
check table t1;
drop table t1;
# Bug #14902 ANALYZE TABLE fails to recognize up-to-date tables
# minimal test case to get an error.
# The problem is happening when analysing table with FT index that
# contains stopwords only. The first execution of analyze table should
# mark index statistics as up to date so that next execution of this
# statement will end up with Table is up to date status.
create TEMPORARY table t1 (a varchar(10), key key1(a)) collate=utf8_general_ci engine=myisam;
insert into t1 values ('hello');
analyze table t1;
analyze table t1;
drop table t1;
#
# bug#15225 (ANALYZE temporary has no effect)
#
create temporary table t1(a int, index(a));
insert into t1 values('1'),('2'),('3'),('4'),('5');
analyze table t1;
show index from t1;
drop table t1;
--echo End of 4.1 tests
#
# Bug #30495: optimize table t1,t2,t3 extended errors
#
#create table t1(a int);
#--error ER_PARSE_ERROR
#analyze table t1 extended;
#--error ER_PARSE_ERROR
#optimize table t1 extended;
#drop table t1;
--echo End of 5.0 tests
|