~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/mysql-test/innodb-analyze.test

  • Committer: Lee
  • Date: 2009-01-01 17:36:53 UTC
  • mto: (758.1.3 devel)
  • mto: This revision was merged to the branch mainline in revision 759.
  • Revision ID: lbieber@lbieber-desktop-20090101173653-qo5945pnje5j3vuu
more header file cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Test that mysqld does not crash when running ANALYZE TABLE with
 
3
# different values of the parameter innodb_stats_sample_pages.
 
4
#
 
5
 
 
6
-- source include/have_innodb.inc
 
7
 
 
8
# we care only that the following SQL commands do not produce errors
 
9
# and do not crash the server
 
10
-- disable_query_log
 
11
-- disable_result_log
 
12
-- enable_warnings
 
13
 
 
14
SET GLOBAL innodb_stats_sample_pages=0;
 
15
 
 
16
# check that the value has been adjusted to 1
 
17
-- enable_result_log
 
18
SHOW VARIABLES LIKE 'innodb_stats_sample_pages';
 
19
-- disable_result_log
 
20
 
 
21
CREATE TABLE innodb_analyze (
 
22
        a INT,
 
23
        b INT,
 
24
        KEY(a),
 
25
        KEY(b,a)
 
26
) ENGINE=InnoDB;
 
27
 
 
28
# test with empty table
 
29
 
 
30
ANALYZE TABLE innodb_analyze;
 
31
 
 
32
SET GLOBAL innodb_stats_sample_pages=2;
 
33
ANALYZE TABLE innodb_analyze;
 
34
 
 
35
SET GLOBAL innodb_stats_sample_pages=4;
 
36
ANALYZE TABLE innodb_analyze;
 
37
 
 
38
SET GLOBAL innodb_stats_sample_pages=8;
 
39
ANALYZE TABLE innodb_analyze;
 
40
 
 
41
SET GLOBAL innodb_stats_sample_pages=16;
 
42
ANALYZE TABLE innodb_analyze;
 
43
 
 
44
INSERT INTO innodb_analyze VALUES
 
45
(1,1), (1,1), (1,2), (1,3), (1,4), (1,5),
 
46
(8,1), (8,8), (8,2), (7,1), (1,4), (3,5);
 
47
 
 
48
SET GLOBAL innodb_stats_sample_pages=1;
 
49
ANALYZE TABLE innodb_analyze;
 
50
 
 
51
SET GLOBAL innodb_stats_sample_pages=2;
 
52
ANALYZE TABLE innodb_analyze;
 
53
 
 
54
SET GLOBAL innodb_stats_sample_pages=4;
 
55
ANALYZE TABLE innodb_analyze;
 
56
 
 
57
SET GLOBAL innodb_stats_sample_pages=8;
 
58
ANALYZE TABLE innodb_analyze;
 
59
 
 
60
SET GLOBAL innodb_stats_sample_pages=16;
 
61
ANALYZE TABLE innodb_analyze;
 
62
 
 
63
DROP TABLE innodb_analyze;