forked from percona/percona-server
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request percona#3562 from kamil-holubicki/PS-6113-5.7-v2
PS-6113: If ANALYZE TABLE runs more than 600 seconds diagnostic query may crash server
- Loading branch information
Showing
12 changed files
with
167 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
CREATE TABLE t1(a int, index inda(a)) ENGINE=INNODB; | ||
INSERT INTO t1 VALUES(1); | ||
SET DEBUG_SYNC='innodb_dict_stats_update_persistent SIGNAL analyze.running WAIT_FOR analyze.finish'; | ||
ANALYZE TABLE t1; | ||
SET DEBUG_SYNC='now WAIT_FOR analyze.running'; | ||
SELECT ENGINE,SUM(DATA_LENGTH+INDEX_LENGTH),COUNT(ENGINE),SUM(DATA_LENGTH),SUM(INDEX_LENGTH) FROM information_schema.TABLES WHERE TABLE_SCHEMA NOT IN ('information_schema', 'performance_schema', 'mysql') AND ENGINE='InnoDB'; | ||
ENGINE SUM(DATA_LENGTH+INDEX_LENGTH) COUNT(ENGINE) SUM(DATA_LENGTH) SUM(INDEX_LENGTH) | ||
InnoDB 49152 2 32768 16384 | ||
SET DEBUG_SYNC='now SIGNAL analyze.finish'; | ||
Table Op Msg_type Msg_text | ||
test.t1 analyze status OK | ||
SET DEBUG_SYNC= 'RESET'; | ||
DROP TABLE t1; |
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,31 @@ | ||
# | ||
# Bug #97828 | ||
# PS-6113: If ANALYZE TABLE runs more than 600 seconds diagnostic query may crash server | ||
# | ||
|
||
--source include/have_innodb.inc | ||
--source include/have_debug_sync.inc | ||
--source include/count_sessions.inc | ||
|
||
CREATE TABLE t1(a int, index inda(a)) ENGINE=INNODB; | ||
INSERT INTO t1 VALUES(1); | ||
|
||
SET DEBUG_SYNC='innodb_dict_stats_update_persistent SIGNAL analyze.running WAIT_FOR analyze.finish'; | ||
--send ANALYZE TABLE t1 | ||
|
||
# ANALYZE TABLE is running. Query for stats. | ||
|
||
--connect(con1, localhost, root) | ||
SET DEBUG_SYNC='now WAIT_FOR analyze.running'; | ||
|
||
SELECT ENGINE,SUM(DATA_LENGTH+INDEX_LENGTH),COUNT(ENGINE),SUM(DATA_LENGTH),SUM(INDEX_LENGTH) FROM information_schema.TABLES WHERE TABLE_SCHEMA NOT IN ('information_schema', 'performance_schema', 'mysql') AND ENGINE='InnoDB'; | ||
|
||
# let the ANALYZE TABLE to finish | ||
SET DEBUG_SYNC='now SIGNAL analyze.finish'; | ||
--disconnect con1 | ||
|
||
--connection default | ||
--reap | ||
SET DEBUG_SYNC= 'RESET'; | ||
DROP TABLE t1; | ||
|
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
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