Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug #29008298 MYSQLD CRASHES ITSELF WHEN CREATING INDEX
Problem ------- A long running ALTER TABLE ADD INDEX with concurrent inserts causes sempahore waits and eventually crashes the server. Solution --------- The indexes on the intermediate tables are built using bulk load insert. A concurrent DML at this stage does not acquire the index lock. An index lock acquired on the intermediate table, which is not visible to anyone else, does not block concurrent DMLs. RB# 22482 Reviewed by: Annamalai Gurusami (annamalai.gurusami@oracle.com)
- Loading branch information
Rahul Agarkar
committed
Aug 16, 2019
1 parent
883c729
commit f9fb96c
Showing
9 changed files
with
128 additions
and
8 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
36 changes: 36 additions & 0 deletions
36
mysql-test/suite/sys_vars/r/innodb_semaphore_wait_timeout_debug_basic.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,36 @@ | ||
# | ||
# Basic test for innodb_semaphore_wait_timeout_debug | ||
# | ||
SELECT @@global.innodb_semaphore_wait_timeout_debug; | ||
@@global.innodb_semaphore_wait_timeout_debug | ||
600 | ||
SET GLOBAL innodb_semaphore_wait_timeout_debug = 10; | ||
Warnings: | ||
Warning 1292 Truncated incorrect innodb_semaphore_wait_timeout_de value: '10' | ||
SELECT @@global.innodb_semaphore_wait_timeout_debug; | ||
@@global.innodb_semaphore_wait_timeout_debug | ||
100 | ||
SET GLOBAL innodb_semaphore_wait_timeout_debug = 200; | ||
SELECT @@global.innodb_semaphore_wait_timeout_debug; | ||
@@global.innodb_semaphore_wait_timeout_debug | ||
200 | ||
SET GLOBAL innodb_semaphore_wait_timeout_debug = dummy; | ||
ERROR 42000: Incorrect argument type to variable 'innodb_semaphore_wait_timeout_debug' | ||
SET innodb_semaphore_wait_timeout_debug = 100; | ||
ERROR HY000: Variable 'innodb_semaphore_wait_timeout_debug' is a GLOBAL variable and should be set with SET GLOBAL | ||
SET GLOBAL innodb_semaphore_wait_timeout_debug = 6000; | ||
Warnings: | ||
Warning 1292 Truncated incorrect innodb_semaphore_wait_timeout_de value: '6000' | ||
SELECT @@global.innodb_semaphore_wait_timeout_debug; | ||
@@global.innodb_semaphore_wait_timeout_debug | ||
600 | ||
SET GLOBAL innodb_semaphore_wait_timeout_debug = -1; | ||
Warnings: | ||
Warning 1292 Truncated incorrect innodb_semaphore_wait_timeout_de value: '-1' | ||
SELECT @@global.innodb_semaphore_wait_timeout_debug; | ||
@@global.innodb_semaphore_wait_timeout_debug | ||
100 | ||
SET GLOBAL innodb_semaphore_wait_timeout_debug = default; | ||
SELECT @@global.innodb_semaphore_wait_timeout_debug; | ||
@@global.innodb_semaphore_wait_timeout_debug | ||
600 |
29 changes: 29 additions & 0 deletions
29
mysql-test/suite/sys_vars/t/innodb_semaphore_wait_timeout_debug_basic.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,29 @@ | ||
--echo # | ||
--echo # Basic test for innodb_semaphore_wait_timeout_debug | ||
--echo # | ||
|
||
# The config variable is a debug variable | ||
--source include/have_debug.inc | ||
|
||
SELECT @@global.innodb_semaphore_wait_timeout_debug; | ||
|
||
SET GLOBAL innodb_semaphore_wait_timeout_debug = 10; | ||
SELECT @@global.innodb_semaphore_wait_timeout_debug; | ||
|
||
SET GLOBAL innodb_semaphore_wait_timeout_debug = 200; | ||
SELECT @@global.innodb_semaphore_wait_timeout_debug; | ||
|
||
--error ER_WRONG_TYPE_FOR_VAR | ||
SET GLOBAL innodb_semaphore_wait_timeout_debug = dummy; | ||
|
||
--error ER_GLOBAL_VARIABLE | ||
SET innodb_semaphore_wait_timeout_debug = 100; | ||
|
||
SET GLOBAL innodb_semaphore_wait_timeout_debug = 6000; | ||
SELECT @@global.innodb_semaphore_wait_timeout_debug; | ||
|
||
SET GLOBAL innodb_semaphore_wait_timeout_debug = -1; | ||
SELECT @@global.innodb_semaphore_wait_timeout_debug; | ||
|
||
SET GLOBAL innodb_semaphore_wait_timeout_debug = default; | ||
SELECT @@global.innodb_semaphore_wait_timeout_debug; |
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
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