-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-14958 Merge new release of InnoDB MySQL 5.7.21 to 10.2
Two follow-up tasks were filed for MySQL 5.7.21 changes that were not applied here: MDEV-15179 performance_schema.file_instances does not reflect RENAME TABLE MDEV-14222 Unnecessary 'cascade' memory allocation for every updated row when there is no FOREIGN KEY
- Loading branch information
Showing
15 changed files
with
294 additions
and
93 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
mysql-test/suite/innodb/r/innodb_buffer_pool_resize.result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
set global innodb_adaptive_hash_index=ON; | ||
select @@innodb_buffer_pool_size; | ||
@@innodb_buffer_pool_size | ||
8388608 | ||
set global innodb_buffer_pool_size = 10485760; | ||
Warnings: | ||
Warning 1292 Truncated incorrect innodb_buffer_pool_size value: '10485760' | ||
select @@innodb_buffer_pool_size; | ||
@@innodb_buffer_pool_size | ||
16777216 | ||
create table t1 (id int not null, val int not null default '0', primary key (id)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED; | ||
create or replace view view0 as select 1 union all select 1; | ||
set @`v_id` := 0; | ||
set @`v_val` := 0; | ||
replace into t1 select (@`v_id` := (@`v_id` + 4) mod 4294967296) as id, (@`v_val` := (@`v_val` + 4) mod 4294967296) as val from view0 v0, view0 v1, view0 v2, view0 v3, view0 v4, view0 v5, view0 v6, view0 v7, view0 v8, view0 v9, view0 v10, view0 v11, view0 v12, view0 v13, view0 v14, view0 v15, view0 v16, view0 v17; | ||
set global innodb_buffer_pool_size = 7340032; | ||
Warnings: | ||
Warning 1292 Truncated incorrect innodb_buffer_pool_size value: '7340032' | ||
select @@innodb_buffer_pool_size; | ||
@@innodb_buffer_pool_size | ||
8388608 | ||
select count(val) from t1; | ||
count(val) | ||
262144 | ||
set global innodb_adaptive_hash_index=OFF; | ||
set global innodb_buffer_pool_size = 25165824; | ||
select @@innodb_buffer_pool_size; | ||
@@innodb_buffer_pool_size | ||
25165824 | ||
select count(val) from t1; | ||
count(val) | ||
262144 | ||
drop table t1; | ||
drop view view0; |
26 changes: 26 additions & 0 deletions
26
mysql-test/suite/innodb/r/innodb_buffer_pool_resize_with_chunks.result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
select @@innodb_buffer_pool_chunk_size; | ||
@@innodb_buffer_pool_chunk_size | ||
2097152 | ||
create table t1 (id int not null, val int not null default '0', primary key (id)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED; | ||
create or replace view view0 as select 1 union all select 1; | ||
set @`v_id` := 0; | ||
set @`v_val` := 0; | ||
replace into t1 select (@`v_id` := (@`v_id` + 4) mod 4294967296) as id, (@`v_val` := (@`v_val` + 4) mod 4294967296) as val from view0 v0, view0 v1, view0 v2, view0 v3, view0 v4, view0 v5, view0 v6, view0 v7, view0 v8, view0 v9, view0 v10, view0 v11, view0 v12, view0 v13, view0 v14, view0 v15, view0 v16, view0 v17; | ||
set global innodb_buffer_pool_size = 7340032; | ||
Warnings: | ||
Warning 1292 Truncated incorrect innodb_buffer_pool_size value: '7340032' | ||
select count(val) from t1; | ||
count(val) | ||
262144 | ||
set global innodb_buffer_pool_size = 16777216; | ||
select count(val) from t1; | ||
count(val) | ||
262144 | ||
drop table t1; | ||
drop view view0; | ||
set global innodb_buffer_pool_size = 1048576; | ||
Warnings: | ||
Warning 1292 Truncated incorrect innodb_buffer_pool_size value: '1048576' | ||
select @@innodb_buffer_pool_size; | ||
@@innodb_buffer_pool_size | ||
6291456 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--innodb-buffer-pool-size=8M | ||
--innodb-page-size=4k |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# | ||
# WL6117 : Resize the InnoDB Buffer Pool Online | ||
# | ||
|
||
--source include/have_innodb.inc | ||
--source include/big_test.inc | ||
|
||
let $wait_timeout = 180; | ||
let $wait_condition = | ||
SELECT SUBSTR(variable_value, 1, 34) = 'Completed resizing buffer pool at ' | ||
FROM information_schema.global_status | ||
WHERE LOWER(variable_name) = 'innodb_buffer_pool_resize_status'; | ||
|
||
--disable_query_log | ||
set @old_innodb_buffer_pool_size = @@innodb_buffer_pool_size; | ||
set @old_innodb_adaptive_hash_index = @@innodb_adaptive_hash_index; | ||
if (`select (version() like '%debug%') > 0`) | ||
{ | ||
set @old_innodb_disable_resize = @@innodb_disable_resize_buffer_pool_debug; | ||
set global innodb_disable_resize_buffer_pool_debug = OFF; | ||
} | ||
--enable_query_log | ||
|
||
set global innodb_adaptive_hash_index=ON; | ||
|
||
select @@innodb_buffer_pool_size; | ||
|
||
# Expand buffer pool | ||
set global innodb_buffer_pool_size = 10485760; | ||
|
||
--source include/wait_condition.inc | ||
|
||
select @@innodb_buffer_pool_size; | ||
|
||
# fill buffer pool | ||
create table t1 (id int not null, val int not null default '0', primary key (id)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED; | ||
create or replace view view0 as select 1 union all select 1; | ||
|
||
set @`v_id` := 0; | ||
set @`v_val` := 0; | ||
|
||
# 2^18 == 262144 records | ||
replace into t1 select (@`v_id` := (@`v_id` + 4) mod 4294967296) as id, (@`v_val` := (@`v_val` + 4) mod 4294967296) as val from view0 v0, view0 v1, view0 v2, view0 v3, view0 v4, view0 v5, view0 v6, view0 v7, view0 v8, view0 v9, view0 v10, view0 v11, view0 v12, view0 v13, view0 v14, view0 v15, view0 v16, view0 v17; | ||
|
||
# Shrink buffer pool | ||
set global innodb_buffer_pool_size = 7340032; | ||
--source include/wait_condition.inc | ||
|
||
select @@innodb_buffer_pool_size; | ||
|
||
select count(val) from t1; | ||
|
||
set global innodb_adaptive_hash_index=OFF; | ||
|
||
# Expand buffer pool to 24MB | ||
set global innodb_buffer_pool_size = 25165824; | ||
--source include/wait_condition.inc | ||
|
||
select @@innodb_buffer_pool_size; | ||
|
||
select count(val) from t1; | ||
|
||
drop table t1; | ||
drop view view0; | ||
|
||
--disable_query_log | ||
set global innodb_adaptive_hash_index = @old_innodb_adaptive_hash_index; | ||
set global innodb_buffer_pool_size = @old_innodb_buffer_pool_size; | ||
if (`select (version() like '%debug%') > 0`) | ||
{ | ||
set global innodb_disable_resize_buffer_pool_debug = @old_innodb_disable_resize; | ||
} | ||
--enable_query_log | ||
--source include/wait_condition.inc |
3 changes: 3 additions & 0 deletions
3
mysql-test/suite/innodb/t/innodb_buffer_pool_resize_with_chunks.opt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--innodb-buffer-pool-size=16M | ||
--innodb-buffer-pool-chunk-size=2M | ||
--innodb-page-size=4k |
63 changes: 63 additions & 0 deletions
63
mysql-test/suite/innodb/t/innodb_buffer_pool_resize_with_chunks.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# | ||
# WL6117 : Resize the InnoDB Buffer Pool Online | ||
# (innodb_buffer_pool_chunk_size used case) | ||
# | ||
|
||
--source include/have_innodb.inc | ||
--source include/big_test.inc | ||
|
||
let $wait_timeout = 180; | ||
let $wait_condition = | ||
SELECT SUBSTR(variable_value, 1, 34) = 'Completed resizing buffer pool at ' | ||
FROM information_schema.global_status | ||
WHERE LOWER(variable_name) = 'innodb_buffer_pool_resize_status'; | ||
|
||
--disable_query_log | ||
set @old_innodb_buffer_pool_size = @@innodb_buffer_pool_size; | ||
if (`select (version() like '%debug%') > 0`) | ||
{ | ||
set @old_innodb_disable_resize = @@innodb_disable_resize_buffer_pool_debug; | ||
set global innodb_disable_resize_buffer_pool_debug = OFF; | ||
} | ||
--enable_query_log | ||
|
||
select @@innodb_buffer_pool_chunk_size; | ||
|
||
# fill buffer pool | ||
create table t1 (id int not null, val int not null default '0', primary key (id)) ENGINE=InnoDB ROW_FORMAT=COMPRESSED; | ||
create or replace view view0 as select 1 union all select 1; | ||
|
||
set @`v_id` := 0; | ||
set @`v_val` := 0; | ||
|
||
# 2^18 == 262144 records | ||
replace into t1 select (@`v_id` := (@`v_id` + 4) mod 4294967296) as id, (@`v_val` := (@`v_val` + 4) mod 4294967296) as val from view0 v0, view0 v1, view0 v2, view0 v3, view0 v4, view0 v5, view0 v6, view0 v7, view0 v8, view0 v9, view0 v10, view0 v11, view0 v12, view0 v13, view0 v14, view0 v15, view0 v16, view0 v17; | ||
|
||
# Shrink buffer pool to 7MB | ||
set global innodb_buffer_pool_size = 7340032; | ||
--source include/wait_condition.inc | ||
|
||
select count(val) from t1; | ||
|
||
# Expand buffer pool to 16MB | ||
set global innodb_buffer_pool_size = 16777216; | ||
--source include/wait_condition.inc | ||
|
||
select count(val) from t1; | ||
|
||
drop table t1; | ||
drop view view0; | ||
|
||
# Try to shrink buffer pool to smaller than chunk size | ||
set global innodb_buffer_pool_size = 1048576; | ||
--source include/wait_condition.inc | ||
select @@innodb_buffer_pool_size; | ||
|
||
--disable_query_log | ||
set global innodb_buffer_pool_size = @old_innodb_buffer_pool_size; | ||
if (`select (version() like '%debug%') > 0`) | ||
{ | ||
set global innodb_disable_resize_buffer_pool_debug = @old_innodb_disable_resize; | ||
} | ||
--enable_query_log | ||
--source include/wait_condition.inc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.