mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 02:05:57 +01:00
MDEV-25536 InnoDB: Failing assertion: sym_node->table != NULL in pars_retrieve_table_def
InnoDB tries to fetch the deleted doc ids for discarded tablespace. In i_s_fts_deleted_generic_fill(), InnoDB needs to check whether the table is discarded or not before fetching deleted doc ids.
This commit is contained in:
parent
65d2fbaf77
commit
0024524d54
3 changed files with 22 additions and 1 deletions
|
@ -962,3 +962,13 @@ UPDATE t1 SET f6='cascade';
|
|||
ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t1`, CONSTRAINT `t1_ibfk_3` FOREIGN KEY (`f5`) REFERENCES `t1` (`f6`) ON UPDATE SET NULL)
|
||||
DROP TABLE t1;
|
||||
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
|
||||
#
|
||||
# MDEV-25536 sym_node->table != NULL in pars_retrieve_table_def
|
||||
#
|
||||
CREATE TABLE t1 (f1 TEXT,FULLTEXT (f1)) ENGINE=InnoDB;
|
||||
ALTER TABLE t1 DISCARD TABLESPACE;
|
||||
SET GLOBAL innodb_ft_aux_table='test/t1';
|
||||
SELECT * FROM information_schema.innodb_ft_deleted;
|
||||
DOC_ID
|
||||
DROP TABLE t1;
|
||||
SET GLOBAL innodb_ft_aux_table=DEFAULT;
|
||||
|
|
|
@ -932,3 +932,13 @@ UPDATE t1 SET f6='cascade';
|
|||
DROP TABLE t1;
|
||||
|
||||
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-25536 sym_node->table != NULL in pars_retrieve_table_def
|
||||
--echo #
|
||||
CREATE TABLE t1 (f1 TEXT,FULLTEXT (f1)) ENGINE=InnoDB;
|
||||
ALTER TABLE t1 DISCARD TABLESPACE;
|
||||
SET GLOBAL innodb_ft_aux_table='test/t1';
|
||||
SELECT * FROM information_schema.innodb_ft_deleted;
|
||||
DROP TABLE t1;
|
||||
SET GLOBAL innodb_ft_aux_table=DEFAULT;
|
||||
|
|
|
@ -2901,7 +2901,8 @@ i_s_fts_deleted_generic_fill(
|
|||
if (!user_table) {
|
||||
rw_lock_s_unlock(&dict_operation_lock);
|
||||
DBUG_RETURN(0);
|
||||
} else if (!dict_table_has_fts_index(user_table)) {
|
||||
} else if (!dict_table_has_fts_index(user_table)
|
||||
|| !user_table->is_readable()) {
|
||||
dict_table_close(user_table, FALSE, FALSE);
|
||||
rw_lock_s_unlock(&dict_operation_lock);
|
||||
DBUG_RETURN(0);
|
||||
|
|
Loading…
Add table
Reference in a new issue