MDEV-36420 Assertion failure in SET GLOBAL innodb_ft_aux_table

innodb_ft_aux_table_validate(): If the table is found in InnoDB
but not valid for the parameter, only invoke dict_sys.unlock() once.

This fixes a regression due to MDEV-36122.
This commit is contained in:
Marko Mäkelä 2025-03-28 09:05:20 +02:00
parent 1b9d5cdb83
commit 31c06951c6
3 changed files with 20 additions and 1 deletions

View File

@ -118,4 +118,13 @@ KEY VALUE
SELECT @@GLOBAL.innodb_ft_aux_table;
@@GLOBAL.innodb_ft_aux_table
test/t1
CREATE TABLE t(a INT) ENGINE=InnoDB;
SET GLOBAL innodb_ft_aux_table='test/t';
ERROR 42000: Variable 'innodb_ft_aux_table' can't be set to the value of 'test/t'
DROP TABLE t;
SET GLOBAL innodb_ft_aux_table='test/t';
ERROR 42000: Variable 'innodb_ft_aux_table' can't be set to the value of 'test/t'
SELECT @@GLOBAL.innodb_ft_aux_table;
@@GLOBAL.innodb_ft_aux_table
test/t1
SET GLOBAL innodb_ft_aux_table = @save_ft_aux_table;

View File

@ -41,4 +41,13 @@ SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE;
SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_TABLE;
SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_CONFIG;
SELECT @@GLOBAL.innodb_ft_aux_table;
CREATE TABLE t(a INT) ENGINE=InnoDB;
--error ER_WRONG_VALUE_FOR_VAR
SET GLOBAL innodb_ft_aux_table='test/t';
DROP TABLE t;
--error ER_WRONG_VALUE_FOR_VAR
SET GLOBAL innodb_ft_aux_table='test/t';
SELECT @@GLOBAL.innodb_ft_aux_table;
SET GLOBAL innodb_ft_aux_table = @save_ft_aux_table;

View File

@ -17541,8 +17541,9 @@ static int innodb_ft_aux_table_validate(THD *thd, st_mysql_sys_var*,
*static_cast<const char**>(save) = table_name;
return 0;
}
} else {
dict_sys.unlock();
}
dict_sys.unlock();
return 1;
} else {
*static_cast<char**>(save) = NULL;