Debian Codegraph @

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

raw
1 --source include/have_innodb.inc
2 --source include/have_perfschema.inc
3 --source include/have_debug.inc
4 --source include/have_debug_sync.inc
5 --source include/not_embedded.inc
6
7 --disable_cursor_protocol
8 select count_star into @init_count from performance_schema.events_waits_summary_global_by_event_name WHERE event_name LIKE '%wait%io%file%innodb%innodb_temp_file%';
9 --enable_cursor_protocol
10 connect (ddl, localhost, root,,);
11 update performance_schema.setup_instruments set enabled='yes';
12 update performance_schema.setup_consumers set enabled='yes';
13 CREATE TABLE t1 (a serial, b varchar(255)) ENGINE=InnoDB;
14
15 BEGIN;
16 let $n=247;
17 --disable_query_log
18 while ($n) {
19 dec $n;
20 INSERT INTO t1 SELECT NULL, REPEAT('b',255);
21 }
22 --enable_query_log
23 COMMIT;
24
25 SET DEBUG_SYNC = 'row_log_apply_before SIGNAL go WAIT_FOR gone';
26 send ALTER TABLE t1 ADD INDEX(b), ALGORITHM=INPLACE;
27
28 connection default;
29 SET DEBUG_SYNC = 'now WAIT_FOR go';
30
31 --disable_cursor_protocol
32 select count_star into @final_count from performance_schema.events_waits_summary_global_by_event_name WHERE event_name LIKE '%wait%io%file%innodb%innodb_temp_file%';
33 --enable_cursor_protocol
34
35 SELECT @final_count - @init_count;
36
37 #--exec lsof -p `pidof mysqld`
38 SET DEBUG_SYNC = 'now SIGNAL gone';
39
40 connection ddl;
41 reap;
42 disconnect ddl;
43
44 connection default;
45 SET DEBUG_SYNC = 'RESET';
46 DROP TABLE t1;