1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Fixed memory loss detected on P8. This can happen when we call after_flush but never call after_rollback() or after_commit().

The old code used pthread_setspecific() to store temporary data used by the thread.
This is not safe when used with thread pool, as the thread may change for the transaction.

The fix is to save the data in THD, which is guaranteed to be properly freed.
I also fixed the code so that we don't do a malloc() for every transaction.
This commit is contained in:
Monty
2015-07-25 15:14:40 +03:00
parent 7115341473
commit e40bc65933
3 changed files with 28 additions and 33 deletions

View File

@@ -47,7 +47,6 @@
class Reprepare_observer;
class Relay_log_info;
class Query_log_event;
class Load_log_event;
class Slave_log_event;
@@ -59,6 +58,7 @@ class Rows_log_event;
class Sroutine_hash_entry;
class User_level_lock;
class user_var_entry;
class Trans_binlog_info;
enum enum_enable_or_disable { LEAVE_AS_IS, ENABLE, DISABLE };
enum enum_ha_read_modes { RFIRST, RNEXT, RPREV, RLAST, RKEY, RNEXT_SAME };
@@ -1670,6 +1670,9 @@ public:
*/
const char *where;
/* Needed by MariaDB semi sync replication */
Trans_binlog_info *semisync_info;
ulong client_capabilities; /* What the client supports */
ulong max_client_packet_length;