-
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-31661: Assertion `thd->lex == sp_instr_lex' failed in LEX* sp_le…
…x_instr::parse_expr(THD*, sp_head*, LEX*) This is the follow-up patch for the task MDEV-5816 that fixes assert failure that happened after recompilation of a stored routine containing a cursor on its second execution. The reason of assertion hit is that a state of the SP instruction sp_instr_cpush wasn't reset after its SQL statement re-compiled. To fix the issue the virtual method sp_lex_instr::on_after_expr_parsing is overridden in the derived class sp_instr_cpush. Implementation of this method does resetting of the data member sp_instr_cpush::m_metadata_changed Additionally, implementation of the method sp_instr_set_trigger_field::on_after_expr_parsing has been slightly modified to set the data member sp_instr_set_trigger_field::value just before successful return. This data member is used to check whether this SP instruction is still valid or should be re-compiled. Resetting this data member before an instance of the class Item_trigger_field be successfully allocated theoretically could lead to clearing of instruction's state despite the fact that memory allocation was failed.
- Loading branch information
1 parent
856196e
commit 2992d53
Showing
4 changed files
with
63 additions
and
3 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