1
0
mirror of https://github.com/MariaDB/server.git synced 2025-11-08 00:28:29 +03:00
Files
mariadb/mysql-test/suite/innodb_fts/t/misc_debug2.test
Thirunarayanan Balathandayuthapani f22b40aae1 MDEV-37423 Enforce innodb_ft_min_token_size > 0 to prevent unnecessary token indexing
Problem:
=======
 By keeping innodb_ft_min_token_size = 0, InnoDB FTS does tokenization
on empty string and tries to add the nullptr as token word. This
leads to crash when we try to convert the token into lower case
characters.

Solution:
=========
 The minimum value of innodb_ft_min_token_size should be 1.
It should be consistent with MYISAM and ARIA engine.
2025-10-21 11:19:29 +05:30

33 lines
1.3 KiB
Plaintext

--source include/have_innodb.inc
--source include/have_debug.inc
--source include/not_embedded.inc
call mtr.add_suppression("InnoDB: Table '.*' tablespace is set as discarded.");
call mtr.add_suppression("InnoDB: Tablespace for table .* is set as discarded.");
call mtr.add_suppression("\\[Warning\\] option 'innodb-ft-min-token-size': unsigned value 0 adjusted to 1");
CREATE TABLE mdev21563(f1 VARCHAR(100), FULLTEXT idx(f1))ENGINE=InnoDB;
set debug_dbug="+d,fts_instrument_sync_request";
INSERT INTO mdev21563 VALUES('This is a test');
ALTER TABLE mdev21563 DISCARD TABLESPACE;
--let $restart_parameters=--innodb_ft_min_token_size=0
--source include/restart_mysqld.inc
SELECT @@global.innodb_ft_min_token_size;
DROP TABLE mdev21563;
--echo #
--echo # MDEV-29342 Assertion failure in file que0que.cc line 728
--echo #
CREATE TABLE t1(f1 CHAR(100), FULLTEXT idx(f1))ENGINE=InnoDB;
INSERT INTO t1 VALUES('mysql'), ('innodb');
SET @save_dbug=@@debug_dbug;
set debug_dbug="+d,fts_instrument_sync_request";
INSERT INTO t1 VALUES('test');
set debug_dbug=@save_dbug;
INSERT INTO t1 VALUES('This is a fts issue');
let $restart_parameters=;
--source include/restart_mysqld.inc
set debug_dbug="+d,fts_instrument_sync_request";
UPDATE t1 SET f1="mariadb";
set debug_dbug=@save_dbug;
DROP TABLE t1;