[MDEV-33180] Table truncate fails for InnoDB table with FULLTEXT KEY when innodb_ft_user_stopword_table is set Created: 2024-01-04  Updated: 2024-01-04

Status: Open
Project: MariaDB Server
Component/s: Full-text Search, Storage Engine - InnoDB
Affects Version/s: 10.6.14, 10.11.5, 10.11.6
Fix Version/s: 10.6, 10.11

Type: Bug Priority: Minor
Reporter: Marco Kropivsek Assignee: Thirunarayanan Balathandayuthapani
Resolution: Unresolved Votes: 0
Labels: None
Environment:

MS Windows 10 Enterprise 10.0.19045

Server: Docker Desktop 4.25.2 (129061)
Engine:
Version: 24.0.6

The issue also occurs on Ubuntu 20.04.6 LTS / MariaDB 10.6.14.


Attachments: Zip Archive DockerCreate.zip     Text File MariaDBCrashReport.log     File SQLStatements.sql     Text File StepsToReproduce.txt    

 Description   

We have build a docker image based on mariadb:10.11.5-jammy / mariadb:10.11.6-jammy. This image has been slightly modified so that a FULLTEXT KEY uses non-default stopword data that is available in the table oms_stopword_db.oms_ft_default_stopword. A TRUNCATE TABLE command on a table that has a FULLTEXT KEY, crashes the database.

The following steps can be used to reproduce the error (the necessary files have been attached):

1) Build the MariaDB image (from the folder that contains the Dockerfile / other necessary files):
docker build -t liber/mariadb:10116-jammy .

2) Start the MariaDB image (please ignore the MARIADB_USER/MARIADB_PASSWORD; this user is not used):
docker run --detach --name acm-database -p 3306:3306 --env MARIADB_USER=dezegebruiker --env MARIADB_PASSWORD=ditwachtwoord --env MARIADB_ROOT_PASSWORD=root liber/mariadb:10116-jammy

3) Connect to the acm-database image:
docker exec -it acm-database bash

4) Conect to the MariaDB with the mysql client:
mysql -proot

5) Check that the stopword table setting:
SHOW VARIABLES like 'innodb_ft_user_stopword_table';

6) Create the database:
CREATE DATABASE test_db DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

7) Switch to the test_db:
USE test_db;

8) Create the test_table:
CREATE TABLE test_table (
id char(36) NOT NULL,
object_type_id char(36) NOT NULL,
functional_id varchar(255) NOT NULL,
search_content mediumtext NOT NULL,
PRIMARY KEY (id),
FULLTEXT KEY search_content (search_content)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

9) Truncate the table:
TRUNCATE TABLE test_db.test_table;

10) Server crash.


Generated at Thu Feb 08 10:36:58 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.