mirror of
https://github.com/MariaDB/server.git
synced 2025-01-27 17:33:44 +01:00
7a9670218b
Analysis: At check_trx_exists function InnoDB allocates a new trx if no trx is found from thd but this newly allocated trx is not registered to thd. This is unsafe, because nothing prevents InnoDB plugin from being uninstalled while there's active transaction. This can cause crashes, hang and any other odd behavior. It may also corrupt stack, as functions pointers are not available after dlclose. Fix: The fix is to use thd_set_ha_data() when manipulating per-connection handler data. It does appropriate plugin locking.
22 lines
559 B
Text
22 lines
559 B
Text
install plugin innodb soname 'ha_innodb';
|
|
create table t1(a int not null primary key) engine=innodb;
|
|
begin;
|
|
insert into t1 values(1);
|
|
flush tables;
|
|
uninstall plugin innodb;
|
|
select sleep(1);
|
|
sleep(1)
|
|
0
|
|
Warnings:
|
|
Warning 1620 Plugin is busy and will be uninstalled on shutdown
|
|
drop table t1;
|
|
install plugin innodb soname 'ha_innodb';
|
|
create table t2(a int not null primary key) engine=innodb;
|
|
insert into t2 values(1);
|
|
drop table t2;
|
|
uninstall plugin innodb;
|
|
select sleep(1);
|
|
sleep(1)
|
|
0
|
|
Warnings:
|
|
Warning 1620 Plugin is busy and will be uninstalled on shutdown
|