-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-35510 ASAN build crashes during bootstrap
Decouple a DML result's cleanup from the destructor semantics, allowing cleanup to occur without simultaneously deallocating memory. The MYSQL_DML_DONE function would access the select_result_interceptor implementation (in either the cases of UPDATE or DELETE) after that interceptor instance's destructor had been called. Most of the time this works because the instance was allocated on the statement memroot which continues to live on and no other allocations are made at this point. The interceptor instance's destructor would be called during either Sql_cmd_update::execute_inner or Sql_cmd_delete::execute_inner by an explicit call to delete. Since the result instance lives on the memroot associated with the current command, we can avoid calling the destructor via delete and instead invoke a cleanup method, deferring the memory deallocation to free_root when the command's processing has completed.
- Loading branch information
1 parent
e021770
commit c284c93
Showing
3 changed files
with
21 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters