Skip to content

Commit b8b55de

Browse files
author
Rahul Malik
committed
Merge branch 'mysql-5.6' into mysql-5.7
2 parents 4ec2158 + d00eb78 commit b8b55de

File tree

3 files changed

+19
-26
lines changed

3 files changed

+19
-26
lines changed
Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
update performance_schema.setup_instruments set enabled='yes';
2-
update performance_schema.setup_consumers set enabled='yes';
1+
update performance_schema.setup_instruments set enabled='YES' where name like '%innodb_temp%';
2+
update performance_schema.setup_consumers set enabled='YES';
33
use test;
4-
drop table if exists t1;
5-
Warnings:
6-
Note 1051 Unknown table 'test.t1'
7-
CREATE TABLE `t1`(`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `name1` varchar(250) NOT NULL, `name2` varchar(250) DEFAULT NULL, `name3` varchar(250) DEFAULT NULL, `name4` varchar(250) DEFAULT NULL, PRIMARY KEY (`id`,`name1`(10)) ) engine=InnoDB;
4+
CREATE TABLE `t1`(`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `name1` varchar(180) NOT NULL, `name2` varchar(180) DEFAULT NULL, `name3` varchar(180) DEFAULT NULL, `name4` varchar(180) DEFAULT NULL, PRIMARY KEY (`id`,`name1`(10)) ) engine=InnoDB;
85
set @id:=0;
96
insert into t1 values
107
(@id:=@id+1,md5(rand()*1000000),md5(rand()*1000000),md5(rand()*1000000),md5(rand()*1000000))
@@ -13,9 +10,10 @@ insert into t1 values
1310
, (@id:=@id+1,md5(rand()*1000000),md5(rand()*1000000),md5(rand()*1000000),md5(rand()*1000000));
1411
insert into `t1`(`id`,`name1`,`name2`,`name3`,`name4`)
1512
select @id:=@id+1,md5(rand()*1000000),md5(rand()*1000000),md5(rand()*1000000),md5(rand()*1000000) from
16-
`t1` k1, `t1` k2, `t1` k3, `t1` k4,`t1` k5,`t1` k6,`t1` k7,`t1` k8,`t1` k9;
17-
create index i_dtyp_big on `t1`(name1) algorithm=inplace;;
18-
select distinct object_name from performance_schema.events_waits_history_long where event_name like '%wait%io%file%innodb%innodb_temp_file%';
13+
`t1` k1, `t1` k2, `t1` k3, `t1` k4,`t1` k5,`t1` k6;
14+
create index i_dtyp_big on `t1`(name1) algorithm=inplace;
15+
select distinct object_name from performance_schema.events_waits_history_long where event_name like '%wait%io%file%innodb%innodb_temp_file%'
16+
and object_name like '%Innodb Merge Temp File%';
1917
object_name
2018
MYSQL_TEST_DIR#Innodb Merge Temp File
2119
drop table t1;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--innodb_sort_buffer_size=64k --innodb-buffer-pool-size=8M --tmpdir=$MYSQLTEST_VARDIR_ABS
1+
--performance_schema_events_waits_history_long_size=100000 --innodb_sort_buffer_size=64k --innodb-buffer-pool-size=8M --tmpdir=$MYSQLTEST_VARDIR_ABS
Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
### test to check if performance_schema.events_waits_history_long
22
### reflects correct data
3-
--connect (con1, localhost, root,,)
4-
--connect (con2, localhost, root,,)
5-
--connection con1
6-
update performance_schema.setup_instruments set enabled='yes';
7-
update performance_schema.setup_consumers set enabled='yes';
3+
4+
### disable for embedded server
5+
--source include/not_embedded.inc
6+
update performance_schema.setup_instruments set enabled='YES' where name like '%innodb_temp%';
7+
update performance_schema.setup_consumers set enabled='YES';
88
use test;
9-
drop table if exists t1;
10-
CREATE TABLE `t1`(`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `name1` varchar(250) NOT NULL, `name2` varchar(250) DEFAULT NULL, `name3` varchar(250) DEFAULT NULL, `name4` varchar(250) DEFAULT NULL, PRIMARY KEY (`id`,`name1`(10)) ) engine=InnoDB;
9+
CREATE TABLE `t1`(`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `name1` varchar(180) NOT NULL, `name2` varchar(180) DEFAULT NULL, `name3` varchar(180) DEFAULT NULL, `name4` varchar(180) DEFAULT NULL, PRIMARY KEY (`id`,`name1`(10)) ) engine=InnoDB;
1110
set @id:=0;
1211

1312
### populate random data
@@ -18,19 +17,15 @@ CREATE TABLE `t1`(`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `name1` varc
1817
, (@id:=@id+1,md5(rand()*1000000),md5(rand()*1000000),md5(rand()*1000000),md5(rand()*1000000));
1918
insert into `t1`(`id`,`name1`,`name2`,`name3`,`name4`)
2019
select @id:=@id+1,md5(rand()*1000000),md5(rand()*1000000),md5(rand()*1000000),md5(rand()*1000000) from
21-
`t1` k1, `t1` k2, `t1` k3, `t1` k4,`t1` k5,`t1` k6,`t1` k7,`t1` k8,`t1` k9;
20+
`t1` k1, `t1` k2, `t1` k3, `t1` k4,`t1` k5,`t1` k6;
2221

2322
#create inplace index and check if data is mention in events_waits_h
24-
--send create index i_dtyp_big on `t1`(name1) algorithm=inplace;
23+
create index i_dtyp_big on `t1`(name1) algorithm=inplace;
2524

26-
--connection con2
27-
--real_sleep 2
2825
--replace_regex /[\\\/]Innodb Merge Temp File/#Innodb Merge Temp File/
2926
--replace_result $MYSQLTEST_VARDIR_ABS MYSQL_TEST_DIR
30-
select distinct object_name from performance_schema.events_waits_history_long where event_name like '%wait%io%file%innodb%innodb_temp_file%';
27+
28+
select distinct object_name from performance_schema.events_waits_history_long where event_name like '%wait%io%file%innodb%innodb_temp_file%'
29+
and object_name like '%Innodb Merge Temp File%';
3130
drop table t1;
32-
--connection con1
33-
--reap
34-
--disconnect con1
35-
--disconnect con2
3631

0 commit comments

Comments
 (0)