mariadb/mysql-test/r/innodb_load_xa.result
Jan Lindström 7a9670218b MDEV-8474: InnoDB sets per-connection data unsafely
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.
2015-07-21 12:12:58 +03:00

22 lines
870 B
Text

install plugin innodb soname 'ha_innodb';
Warnings:
Warning 1105 Cannot enable tc-log at run-time. XA features of InnoDB are disabled
select engine,support,transactions,xa from information_schema.engines where engine='innodb';
engine support transactions xa
InnoDB YES YES NO
create table t1 (a int) engine=innodb;
start transaction;
insert t1 values (1);
insert t1 values (2);
commit;
show binlog events from <binlog_start>;
Log_name Pos Event_type Server_id End_log_pos Info
mysqld-bin.000001 # Query # # use `test`; create table t1 (a int) engine=innodb
mysqld-bin.000001 # Query # # BEGIN
mysqld-bin.000001 # Query # # use `test`; insert t1 values (1)
mysqld-bin.000001 # Query # # use `test`; insert t1 values (2)
mysqld-bin.000001 # Query # # COMMIT
drop table t1;
uninstall plugin innodb;
Warnings:
Warning 1620 Plugin is busy and will be uninstalled on shutdown