[MDEV-14648] Restore fix for MySQL BUG#39053 - UNISTALL PLUGIN does not allow the storage engine to cleanup open connections Created: 2017-12-14  Updated: 2018-03-13  Resolved: 2018-02-15

Status: Closed
Project: MariaDB Server
Component/s: Plugins, Storage Engine - InnoDB
Affects Version/s: 10.2.3, 10.3.0
Fix Version/s: 10.0.35, 10.1.32, 10.2.14, 10.3.5

Type: Bug Priority: Major
Reporter: Sergey Vojtovich Assignee: Marko Mäkelä
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-8188 Server hangs on shutdown in logs_empt... Closed

 Description   

InnoDB part of fix for b89feb5b28176daa27c4a3bdc32f2c70f6a996e2 was lost in "MDEV-11487 Revert InnoDB internal temporary tables from WL#7682" (see c868acdf656213cdc081c4c965a1bcf3d22558bb).

To protect against concurrent UNINSTALL PLUGIN InnoDB must call thd_set_ha_data() whenever it wants to modify it's ha_data pointer.

Background threads most probably need special handling: we don't want to increment plugin reference counter for reference from plugin itself. That is we shouldn't use thd_set_ha_data() for background threads.



 Comments   
Comment by Marko Mäkelä [ 2018-03-09 ]

As noted in MDEV-8188, the test innodb.uninstall_plugin would take 126 seconds instead of 9 seconds to complete in 10.0 and 10.1 because of a bug in ha_close_connection(). I backported ported that fix from 10.2 to 10.0 and merged to 10.1.

Generated at Thu Feb 08 08:15:13 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.