mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
BUG#12558519: RPL_TYPECONV PRODUCES VALGRIND STACK
In RBR and in case of converting blob fields, the space allocated while unpacking into the conversion field was not freed after copying from it into the real field. We fix this by freeing the conversion field when the conversion table is not needed anymore (on close_tables_to_lock).
This commit is contained in:
10
sql/table.cc
10
sql/table.cc
@ -2188,7 +2188,15 @@ void free_blobs(register TABLE *table)
|
||||
for (ptr= table->s->blob_field, end=ptr + table->s->blob_fields ;
|
||||
ptr != end ;
|
||||
ptr++)
|
||||
((Field_blob*) table->field[*ptr])->free();
|
||||
{
|
||||
/*
|
||||
Reduced TABLE objects which are used by row-based replication for
|
||||
type conversion might have some fields missing. Skip freeing BLOB
|
||||
buffers for such missing fields.
|
||||
*/
|
||||
if (table->field[*ptr])
|
||||
((Field_blob*) table->field[*ptr])->free();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user