mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-16093 Memory leak with triggers
Problem was that blob memory allocated in Table_trigger_list was not properly freed
This commit is contained in:
@ -614,6 +614,7 @@ end:
|
||||
#endif /* WITH_WSREP */
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Build stmt_query to write it in the bin-log
|
||||
and get the trigger definer.
|
||||
@ -1061,6 +1062,11 @@ Table_triggers_list::~Table_triggers_list()
|
||||
for (int j= 0; j < (int)TRG_ACTION_MAX; j++)
|
||||
delete bodies[i][j];
|
||||
|
||||
/* Free blobs used in insert */
|
||||
if (record0_field)
|
||||
for (Field **fld_ptr= record0_field; *fld_ptr; fld_ptr++)
|
||||
(*fld_ptr)->free();
|
||||
|
||||
if (record1_field)
|
||||
for (Field **fld_ptr= record1_field; *fld_ptr; fld_ptr++)
|
||||
delete *fld_ptr;
|
||||
|
Reference in New Issue
Block a user