mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 11:01:52 +01:00
a76731e1a1
- Make innodb_ft_cache_size & innodb_ft_total_cache_size are dynamic variable and increase the maximum value of innodb_ft_cache_size to 512MB for 32-bit system and 1 TB for 64-bit system and set innodb_ft_total_cache_size maximum value to 1 TB for 64-bit system. - Print warning if the fts cache exceeds the innodb_ft_cache_size and also unlock the cache if fts cache memory reduces less than innodb_ft_cache_size.
132 lines
6.9 KiB
Text
132 lines
6.9 KiB
Text
call mtr.add_suppression("InnoDB: Total InnoDB FTS size .* for the table .* exceeds the innodb_ft_cache_size .*");
|
|
#
|
|
# Bug#32831765 SERVER HITS OOM CONDITION WHEN LOADING TWO
|
|
# INNODB TABLES WITH FTS INDEXES
|
|
#
|
|
create table t1 ( `id` int unsigned NOT NULL AUTO_INCREMENT, `col01` text,
|
|
`col02` text, `col03` text, `col04` text, `col05` text, `col06` text, `col07`
|
|
text, `col08` text, `col09` text, `col10` text, `col11` text, `col12` text,
|
|
`col13` text, `col14` text, `col15` text, `col16` text, `col17` text, `col18`
|
|
text, `col19` text, `col20` text, `col21` text, `col22` text, `col23` text,
|
|
`col24` text, `col25` text, `col26` text, `col27` text, `col28` text, `col29`
|
|
text, `col30` text, PRIMARY KEY (`id`), FULLTEXT KEY (`col01`), FULLTEXT KEY
|
|
(`col02`), FULLTEXT KEY (`col03`), FULLTEXT KEY (`col04`), FULLTEXT KEY
|
|
(`col05`), FULLTEXT KEY (`col06`), FULLTEXT KEY (`col07`), FULLTEXT KEY
|
|
(`col08`), FULLTEXT KEY (`col09`), FULLTEXT KEY (`col10`), FULLTEXT KEY
|
|
(`col11`), FULLTEXT KEY (`col12`), FULLTEXT KEY (`col13`), FULLTEXT KEY
|
|
(`col14`), FULLTEXT KEY (`col15`), FULLTEXT KEY (`col16`), FULLTEXT KEY
|
|
(`col17`), FULLTEXT KEY (`col18`), FULLTEXT KEY (`col19`), FULLTEXT KEY
|
|
(`col20`), FULLTEXT KEY (`col21`), FULLTEXT KEY (`col22`), FULLTEXT KEY
|
|
(`col23`), FULLTEXT KEY (`col24`), FULLTEXT KEY (`col25`), FULLTEXT KEY
|
|
(`col26`), FULLTEXT KEY (`col27`), FULLTEXT KEY (`col28`), FULLTEXT KEY
|
|
(`col29`), FULLTEXT KEY (`col30`)) engine=innodb;
|
|
create table t2 ( `id` int unsigned NOT NULL AUTO_INCREMENT, `col01` text,
|
|
`col02` text, `col03` text, `col04` text, `col05` text, `col06` text, `col07`
|
|
text, `col08` text, `col09` text, `col10` text, `col11` text, `col12` text,
|
|
`col13` text, `col14` text, `col15` text, `col16` text, `col17` text, `col18`
|
|
text, `col19` text, `col20` text, `col21` text, `col22` text, `col23` text,
|
|
`col24` text, `col25` text, `col26` text, `col27` text, `col28` text, `col29`
|
|
text, `col30` text, PRIMARY KEY (`id`), FULLTEXT KEY (`col01`), FULLTEXT KEY
|
|
(`col02`), FULLTEXT KEY (`col03`), FULLTEXT KEY (`col04`), FULLTEXT KEY
|
|
(`col05`), FULLTEXT KEY (`col06`), FULLTEXT KEY (`col07`), FULLTEXT KEY
|
|
(`col08`), FULLTEXT KEY (`col09`), FULLTEXT KEY (`col10`), FULLTEXT KEY
|
|
(`col11`), FULLTEXT KEY (`col12`), FULLTEXT KEY (`col13`), FULLTEXT KEY
|
|
(`col14`), FULLTEXT KEY (`col15`), FULLTEXT KEY (`col16`), FULLTEXT KEY
|
|
(`col17`), FULLTEXT KEY (`col18`), FULLTEXT KEY (`col19`), FULLTEXT KEY
|
|
(`col20`), FULLTEXT KEY (`col21`), FULLTEXT KEY (`col22`), FULLTEXT KEY
|
|
(`col23`), FULLTEXT KEY (`col24`), FULLTEXT KEY (`col25`), FULLTEXT KEY
|
|
(`col26`), FULLTEXT KEY (`col27`), FULLTEXT KEY (`col28`), FULLTEXT KEY
|
|
(`col29`), FULLTEXT KEY (`col30`)) engine=innodb;
|
|
create table t3 ( `id` int unsigned NOT NULL AUTO_INCREMENT, `col01` text,
|
|
`col02` text, `col03` text, `col04` text, `col05` text, `col06` text, `col07`
|
|
text, `col08` text, `col09` text, `col10` text, `col11` text, `col12` text,
|
|
`col13` text, `col14` text, `col15` text, `col16` text, `col17` text, `col18`
|
|
text, `col19` text, `col20` text, `col21` text, `col22` text, `col23` text,
|
|
`col24` text, `col25` text, `col26` text, `col27` text, `col28` text, `col29`
|
|
text, `col30` text, PRIMARY KEY (`id`), FULLTEXT KEY (`col01`), FULLTEXT KEY
|
|
(`col02`), FULLTEXT KEY (`col03`), FULLTEXT KEY (`col04`), FULLTEXT KEY
|
|
(`col05`), FULLTEXT KEY (`col06`), FULLTEXT KEY (`col07`), FULLTEXT KEY
|
|
(`col08`), FULLTEXT KEY (`col09`), FULLTEXT KEY (`col10`), FULLTEXT KEY
|
|
(`col11`), FULLTEXT KEY (`col12`), FULLTEXT KEY (`col13`), FULLTEXT KEY
|
|
(`col14`), FULLTEXT KEY (`col15`), FULLTEXT KEY (`col16`), FULLTEXT KEY
|
|
(`col17`), FULLTEXT KEY (`col18`), FULLTEXT KEY (`col19`), FULLTEXT KEY
|
|
(`col20`), FULLTEXT KEY (`col21`), FULLTEXT KEY (`col22`), FULLTEXT KEY
|
|
(`col23`), FULLTEXT KEY (`col24`), FULLTEXT KEY (`col25`), FULLTEXT KEY
|
|
(`col26`), FULLTEXT KEY (`col27`), FULLTEXT KEY (`col28`), FULLTEXT KEY
|
|
(`col29`), FULLTEXT KEY (`col30`)) engine=innodb;
|
|
create table t4 ( `id` int unsigned NOT NULL AUTO_INCREMENT, `col01` text,
|
|
`col02` text, `col03` text, `col04` text, `col05` text, `col06` text, `col07`
|
|
text, `col08` text, `col09` text, `col10` text, `col11` text, `col12` text,
|
|
`col13` text, `col14` text, `col15` text, `col16` text, `col17` text, `col18`
|
|
text, `col19` text, `col20` text, `col21` text, `col22` text, `col23` text,
|
|
`col24` text, `col25` text, `col26` text, `col27` text, `col28` text, `col29`
|
|
text, `col30` text, PRIMARY KEY (`id`), FULLTEXT KEY (`col01`), FULLTEXT KEY
|
|
(`col02`), FULLTEXT KEY (`col03`), FULLTEXT KEY (`col04`), FULLTEXT KEY
|
|
(`col05`), FULLTEXT KEY (`col06`), FULLTEXT KEY (`col07`), FULLTEXT KEY
|
|
(`col08`), FULLTEXT KEY (`col09`), FULLTEXT KEY (`col10`), FULLTEXT KEY
|
|
(`col11`), FULLTEXT KEY (`col12`), FULLTEXT KEY (`col13`), FULLTEXT KEY
|
|
(`col14`), FULLTEXT KEY (`col15`), FULLTEXT KEY (`col16`), FULLTEXT KEY
|
|
(`col17`), FULLTEXT KEY (`col18`), FULLTEXT KEY (`col19`), FULLTEXT KEY
|
|
(`col20`), FULLTEXT KEY (`col21`), FULLTEXT KEY (`col22`), FULLTEXT KEY
|
|
(`col23`), FULLTEXT KEY (`col24`), FULLTEXT KEY (`col25`), FULLTEXT KEY
|
|
(`col26`), FULLTEXT KEY (`col27`), FULLTEXT KEY (`col28`), FULLTEXT KEY
|
|
(`col29`), FULLTEXT KEY (`col30`)) engine=innodb;
|
|
#create procedure to inset into the table.
|
|
CREATE PROCEDURE `proc_insert`(IN tab_name VARCHAR(40))
|
|
BEGIN
|
|
DECLARE i INT DEFAULT 1;
|
|
SET @insert_tbl =CONCAT('INSERT INTO ', tab_name, '( `col01`, `col02`,
|
|
`col03`, `col04`, `col05`, `col06`, `col07`, `col08`, `col09`, `col10`,
|
|
`col11`, `col12`, `col13`, `col14`, `col15`, `col16`, `col17`, `col18`,
|
|
`col19`, `col20`, `col21`, `col22`, `col23`, `col24`, `col25`, `col26`,
|
|
`col27`, `col28`, `col29`, `col30`)
|
|
VALUES ( MD5(RAND()), MD5(RAND()), MD5(RAND()), MD5(RAND()),
|
|
MD5(RAND()), MD5(RAND()), MD5(RAND()), MD5(RAND()), MD5(RAND()),
|
|
MD5(RAND()), MD5(RAND()), MD5(RAND()), MD5(RAND()), MD5(RAND()),
|
|
MD5(RAND()), MD5(RAND()), MD5(RAND()), MD5(RAND()), MD5(RAND()),
|
|
MD5(RAND()), MD5(RAND()), MD5(RAND()), MD5(RAND()), MD5(RAND()),
|
|
MD5(RAND()), MD5(RAND()), MD5(RAND()), MD5(RAND()), MD5(RAND()),
|
|
MD5(RAND()))');
|
|
PREPARE ins_stmt FROM @insert_tbl;
|
|
while (i <= 2000) DO
|
|
EXECUTE ins_stmt;
|
|
SET i = i + 1;
|
|
END WHILE;
|
|
DEALLOCATE PREPARE ins_stmt;
|
|
END |
|
|
SET @save_dbug= @@GLOBAL.debug_dbug;
|
|
SET GLOBAL debug_dbug="+d,fts_optimize_wq_count_check";
|
|
connect con1,localhost,root,,;
|
|
call proc_insert('t1');
|
|
connect con2,localhost,root,,;
|
|
call proc_insert('t1');
|
|
connect con3,localhost,root,,;
|
|
call proc_insert('t2');
|
|
connect con4,localhost,root,,;
|
|
call proc_insert('t2');
|
|
connect con5,localhost,root,,;
|
|
call proc_insert('t3');
|
|
connect con6,localhost,root,,;
|
|
call proc_insert('t3');
|
|
connect con7,localhost,root,,;
|
|
call proc_insert('t4');
|
|
connection default;
|
|
call proc_insert('t4');
|
|
SET GLOBAL debug_dbug= @save_dbug;
|
|
connection con1;
|
|
disconnect con1;
|
|
connection con2;
|
|
disconnect con2;
|
|
connection con3;
|
|
disconnect con3;
|
|
connection con4;
|
|
disconnect con4;
|
|
connection con5;
|
|
disconnect con5;
|
|
connection con6;
|
|
disconnect con6;
|
|
connection con7;
|
|
disconnect con7;
|
|
connection default;
|
|
DROP TABLE t1,t2,t3,t4;
|
|
DROP PROCEDURE proc_insert;
|