Debian Codegraph @

mysql-test/suite/perfschema_stress/t/setup.test

raw
1 # The include statement below is a temp one for tests that are yet to
2 #be ported to run with InnoDB,
3 #but needs to be kept for tests that would need MyISAM in future.
4 --source include/force_myisam_default.inc
5
6 if (`SELECT VERSION() LIKE '%embedded%'`)
7 {
8 --skip This test cannot run with the embedded server.
9 }
10
11 --source suite/perfschema_stress/include/settings.inc
12
13 --disable_query_log
14 --disable_result_log
15
16 if (!$engine_type) {
17 let $engine_type= $default_engine_type;
18 }
19 if ($engine_type == Falcon) {
20 --source include/have_falcon.inc
21 }
22
23 --replace_result $engine_type <engine_type>
24 eval CREATE TABLE t1 (id INT PRIMARY KEY, b CHAR(100) DEFAULT 'initial value')
25 ENGINE=$engine_type;
26
27 # Need something to start with
28 INSERT INTO t1(id) VALUES (1), (2), (3), (4), (5), (6), (7), (8);
29
30 # Bulk load the correct number of rows
31 while (`SELECT MAX(id) < $num_stress_rows FROM t1`)
32 {
33 SELECT MAX(id) FROM t1 INTO @max;
34 --replace_result $num_stress_rows <num_stress_rows>
35 eval INSERT INTO t1(id) SELECT id + @max FROM t1
36 WHERE id + @max <= $num_stress_rows;
37 }
38
39 # Turn on some instruments
40
41 UPDATE performance_schema.setup_instruments SET TIMED = 'YES';
42
43 UPDATE performance_schema.setup_instruments SET ENABLED = 'NO';
44 UPDATE performance_schema.setup_instruments SET ENABLED = 'YES'
45 WHERE NAME IN ('wait/io/file/sql/FRM',
46 'thread/sql/Connection',
47 'wait/synch/cond/sql/COND_mdl',
48 'wait/synch/rwlock/sql/LOCK_sys_init_connect',
49 'wait/synch/mutex/sql/LOCK_mdl');
50
51 UPDATE performance_schema.setup_consumers SET ENABLED = 'YES';
52
53 --enable_result_log
54 --enable_query_log