mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Bug #38693: leaked memory with blobs!
If delayed insert fails to upgrade the lock it was not freeing the temporary memory storage used to keep newly constructed blob values in memory. Fixed by iterating over the remaining rows in the delayed insert rowset and freeing the blob storage for each row. No test suite because it involves concurrent delayed inserts on a table and cannot easily be made deterministic. Added a correct valgrind suppression for Fedora 9.
This commit is contained in:
@@ -319,6 +319,14 @@
|
|||||||
fun:_dl_map_object
|
fun:_dl_map_object
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
libc pthread_exit 8
|
||||||
|
Memcheck:Leak
|
||||||
|
fun:malloc
|
||||||
|
fun:local_strdup
|
||||||
|
fun:_dl_map_object
|
||||||
|
fun:dl_open_worker
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@@ -2585,6 +2585,11 @@ bool Delayed_insert::handle_inserts(void)
|
|||||||
/* Remove all not used rows */
|
/* Remove all not used rows */
|
||||||
while ((row=rows.get()))
|
while ((row=rows.get()))
|
||||||
{
|
{
|
||||||
|
if (table->s->blob_fields)
|
||||||
|
{
|
||||||
|
memcpy(table->record[0],row->record,table->s->reclength);
|
||||||
|
free_delayed_insert_blobs(table);
|
||||||
|
}
|
||||||
delete row;
|
delete row;
|
||||||
thread_safe_increment(delayed_insert_errors,&LOCK_delayed_status);
|
thread_safe_increment(delayed_insert_errors,&LOCK_delayed_status);
|
||||||
stacked_inserts--;
|
stacked_inserts--;
|
||||||
|
Reference in New Issue
Block a user