1
0
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:
Luis Soares
2011-05-23 23:46:51 +01:00
parent b1ad5f2e04
commit d0f6fde3de
3 changed files with 20 additions and 1 deletions

View File

@ -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();
}
}