-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug#19704825 TEMPORARY SLAVE TYPE CONVERSION TABLES RELEASED TO EARLY
Problem: The memory used in preparing slave type conversion temporary table is getting released early and causing unexpected results Analysis: As part of bug#18770469 fix, We introduced an event m_event_mem_root (a special mem root), added to Log_event class. While server is creating the temporary table, the memory needed is allocated from this special mem root which will be freed in ~Log_event() i.e., the scope of this memroot is one event. But it could happen that in some cases, server might need to access this conversion temporary table for next following event. For eg: A nested row event (insert is causing insert in a trigger) In this situation, the memory is getting delayed too early and causing issues when the server is trying to access the temporary table inside the trigger. Fix: We cannot use a mem_root whose scope is limited to an event execution in this situation. With some further analysis, found out that clearing a thd->mem_root at the end of statement (upon applying an event which has STMT_END_F flag) will solve out of memory problem while running a long transactions (bug#18770469) and will also make this reported problem (memory is getting released early) to go away.
- Loading branch information
Venkatesh Duggirala
committed
Oct 30, 2014
1 parent
3b798d3
commit efc0025
Showing
10 changed files
with
122 additions
and
113 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
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
Oops, something went wrong.