Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
MDEV-27282 InnoDB: Failing assertion: !query->intersection
- query->intersection fails to get freed if the query exceeds innodb_ft_result_cache_limit - errors from init_ftfuncs were not propogated by delete command This is taken from percona/percona-server@ef2c0bc
- Loading branch information
1 parent
c2300d0
commit f9ec9b6
Showing
5 changed files
with
116 additions
and
1 deletion.
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,39 @@ | ||
| # | ||
| # Bug 1634932: Assertion failure in thread x in | ||
| # file fts0que.cc | ||
| # | ||
| SET @saved_innodb_ft_result_cache_limit= @@global.innodb_ft_result_cache_limit; | ||
| CREATE TABLE `t1` ( | ||
| `FTS_DOC_ID` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, | ||
| `text_content` MEDIUMTEXT, PRIMARY KEY (`FTS_DOC_ID`) | ||
| ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
| CREATE UNIQUE INDEX FTS_DOC_ID_INDEX ON t1(FTS_DOC_ID); | ||
| SET autocommit=0; | ||
| CREATE PROCEDURE populate_t1() | ||
| BEGIN | ||
| DECLARE i INT DEFAULT 1; | ||
| WHILE (i <= 250) DO | ||
| INSERT INTO t1 (text_content) VALUES ("some_text_1234 aaa"); | ||
| SET i = i + 1; | ||
| END WHILE; | ||
| END// | ||
| CALL populate_t1; | ||
| SET autocommit=1; | ||
| SET SESSION debug="+d,fts_instrument_result_cache_limit"; | ||
| Warnings: | ||
| Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead | ||
| ALTER TABLE t1 ADD FULLTEXT INDEX `text_content_idx` (`text_content`); | ||
| SELECT FTS_DOC_ID, text_content | ||
| FROM t1 | ||
| WHERE MATCH text_content AGAINST ('+some_text_1234' IN BOOLEAN MODE); | ||
| ERROR HY000: Table handler out of memory | ||
| UPDATE t1 | ||
| SET text_content='some_text_12345' | ||
| where MATCH text_content AGAINST ('+some_text_1234' IN BOOLEAN MODE); | ||
| ERROR HY000: Table handler out of memory | ||
| DELETE FROM t1 | ||
| WHERE MATCH text_content AGAINST ('+some_text_1234' IN BOOLEAN MODE); | ||
| ERROR HY000: Table handler out of memory | ||
| SET GLOBAL innodb_ft_result_cache_limit = @saved_innodb_ft_result_cache_limit; | ||
| DROP TABLE t1; | ||
| DROP PROCEDURE populate_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,57 @@ | ||
| --echo # | ||
| --echo # Bug 1634932: Assertion failure in thread x in | ||
| --echo # file fts0que.cc | ||
| --echo # | ||
|
|
||
| --source include/have_innodb.inc | ||
| --source include/have_debug.inc | ||
|
|
||
| SET @saved_innodb_ft_result_cache_limit= @@global.innodb_ft_result_cache_limit; | ||
|
|
||
| CREATE TABLE `t1` ( | ||
| `FTS_DOC_ID` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, | ||
| `text_content` MEDIUMTEXT, PRIMARY KEY (`FTS_DOC_ID`) | ||
| ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
|
|
||
| CREATE UNIQUE INDEX FTS_DOC_ID_INDEX ON t1(FTS_DOC_ID); | ||
|
|
||
| SET autocommit=0; | ||
|
|
||
| DELIMITER //; | ||
| CREATE PROCEDURE populate_t1() | ||
| BEGIN | ||
| DECLARE i INT DEFAULT 1; | ||
| WHILE (i <= 250) DO | ||
| INSERT INTO t1 (text_content) VALUES ("some_text_1234 aaa"); | ||
| SET i = i + 1; | ||
| END WHILE; | ||
| END// | ||
|
|
||
| DELIMITER ;// | ||
|
|
||
| CALL populate_t1; | ||
| SET autocommit=1; | ||
|
|
||
| SET SESSION debug="+d,fts_instrument_result_cache_limit"; | ||
|
|
||
| ALTER TABLE t1 ADD FULLTEXT INDEX `text_content_idx` (`text_content`); | ||
|
|
||
| # HA_ERR_FTS_EXCEED_RESULT_CACHE_LIMIT = 188 | ||
| --error 128 | ||
| SELECT FTS_DOC_ID, text_content | ||
| FROM t1 | ||
| WHERE MATCH text_content AGAINST ('+some_text_1234' IN BOOLEAN MODE); | ||
|
|
||
| --error 128 | ||
| UPDATE t1 | ||
| SET text_content='some_text_12345' | ||
| where MATCH text_content AGAINST ('+some_text_1234' IN BOOLEAN MODE); | ||
|
|
||
| --error 128 | ||
| DELETE FROM t1 | ||
| WHERE MATCH text_content AGAINST ('+some_text_1234' IN BOOLEAN MODE); | ||
|
|
||
| SET GLOBAL innodb_ft_result_cache_limit = @saved_innodb_ft_result_cache_limit; | ||
|
|
||
| DROP TABLE t1; | ||
| DROP PROCEDURE populate_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