Commit 63f922da authored by Marko Mäkelä's avatar Marko Mäkelä

MDEV-22090 Change buffer is not freed after dropping or rebuilding table

When MDEV-19514 removed the change buffer merges in the background,
it introduced a minor regression: After a DDL operation that drops
or rebuilds a table or partition, any entries in the change buffer
could survive until a slow shutdown (innodb_fast_shutdown=0) is executed.

fil_delete_tablespace(). Before returning, invoke
ibuf_delete_for_discarded_space(). With this, the only way to have
change buffer ‘leaks’ is to kill and restart the server at an
appropriate moment and never initiate a slow shutdown.
parent 14c72bd3
......@@ -2272,7 +2272,7 @@ dberr_t fil_delete_tablespace(ulint id, bool if_exists)
" in the tablespace memory cache.";
}
return(err);
goto func_exit;
}
ut_a(space);
......@@ -2367,8 +2367,9 @@ dberr_t fil_delete_tablespace(ulint id, bool if_exists)
err = DB_TABLESPACE_NOT_FOUND;
}
func_exit:
ut_free(path);
ibuf_delete_for_discarded_space(id);
return(err);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment