~ubuntu-branches/ubuntu/saucy/drizzle/saucy-proposed

« back to all changes in this revision

Viewing changes to plugin/haildb/tests/t/analyze.test

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-06-19 10:46:49 UTC
  • mfrom: (1.1.6)
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20120619104649-e2l0ggd4oz3um0f4
Tags: upstream-7.1.36-stable
ImportĀ upstreamĀ versionĀ 7.1.36-stable

Show diffs side-by-side

added added

removed removed

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