mirror of
https://github.com/MariaDB/server.git
synced 2025-01-31 11:01:52 +01:00
50a8beedfe
InnoDB was too eager to forget the open table (m_mysql_table=NULL) and that caused it to try to open a table which was opened by the user not FK-prelocked. The server didn't expect that. After fixing this, it crashed in gcol.innodb_virtual_fk test, trying to compute virtual columns for a table that didn't have them. Because row_upd_store_row() was deleting a row from node->table, while computing virtual columns in thr->prebuilt->m_mysql_table. Which wasn't necessarily the same table, and might've not even had virtual columns, even if node->table did.
12 lines
381 B
Text
12 lines
381 B
Text
set default_storage_engine=innodb;
|
|
create table t1 (id int primary key, id2 int as (id) virtual, key id2 (id2));
|
|
create table t2 (id int key, constraint fk_id foreign key (id) references t1 (id) on delete cascade);
|
|
insert into t1 (id) values (1), (2);
|
|
insert into t2 (id) values (1), (2);
|
|
delete from t1;
|
|
select * from t1;
|
|
id id2
|
|
select * from t2;
|
|
id
|
|
drop table t2;
|
|
drop table t1;
|