Debian Codegraph @

mysql-test/suite/innodb/t/innodb_stats.test

raw
1 #
2 # Test the persistent stats feature
3 #
4
5
6 -- disable_warnings
7 -- disable_query_log
8
9 DROP TABLE IF EXISTS test_innodb_stats;
10
11 CREATE TABLE test_innodb_stats (
12 a INT,
13 KEY a_key (a)
14 ) ENGINE=INNODB STATS_PERSISTENT=1;
15
16 -- enable_warnings
17 -- enable_query_log
18
19 # test empty table
20 -- let $insert = SELECT 'dummy INSERT, the table should be empty'
21 -- source suite/innodb/include/innodb_stats.inc
22
23 # test table with 1 row
24 -- let $insert = INSERT INTO test_innodb_stats (a) VALUES (1)
25 -- source suite/innodb/include/innodb_stats.inc
26
27 # test table with 2 eq rows
28 -- let $insert = INSERT INTO test_innodb_stats (a) VALUES (1), (1)
29 -- source suite/innodb/include/innodb_stats.inc
30
31 # test table with 3 eq rows
32 -- let $insert = INSERT INTO test_innodb_stats (a) VALUES (1), (1), (1)
33 -- source suite/innodb/include/innodb_stats.inc
34
35 # test table with 10 eq rows
36 -- let $insert = INSERT INTO test_innodb_stats (a) VALUES (1), (1), (1), (1), (1), (1), (1), (1), (1), (1)
37 -- source suite/innodb/include/innodb_stats.inc
38
39 # test table with 2 diff rows
40 -- let $insert = INSERT INTO test_innodb_stats (a) VALUES (1), (2)
41 -- source suite/innodb/include/innodb_stats.inc
42
43 # test table with 2 diff rows, 3 rows in total
44 -- let $insert = INSERT INTO test_innodb_stats (a) VALUES (1), (1), (2)
45 -- source suite/innodb/include/innodb_stats.inc
46
47 # test table with 3 diff rows
48 -- let $insert = INSERT INTO test_innodb_stats (a) VALUES (1), (2), (3)
49 -- source suite/innodb/include/innodb_stats.inc
50
51 # test table with 3 diff rows, 5 rows in total
52 -- let $insert = INSERT INTO test_innodb_stats (a) VALUES (1), (1), (2), (3), (3)
53 -- source suite/innodb/include/innodb_stats.inc
54
55 # test table with 5 diff rows, 10 rows in total
56 -- let $insert = INSERT INTO test_innodb_stats (a) VALUES (1), (2), (3), (4), (5), (1), (2), (3), (4), (5)
57 -- source suite/innodb/include/innodb_stats.inc
58
59 -- disable_query_log
60 DROP TABLE test_innodb_stats;