Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MDEV-5816: Stored programs: validation of stored program statements
This patch fixes the issue with missing warnings generated on re-parsing a failing SP instruction's statement. That is, any warning generated on re-parsing a statement was discarded after a SP instruction's statement has been successfully re-parsed. The reason for discarding warnings after re-parsing is that the method THD::set_query_id() called every time when a failing SP instruction re-parsed. In result, Warning_info::m_warn_id != thd->query_id and when the method Diagnostics_area::opt_clear_warning_info(thd->query_id) is invoked from sp_head::execute all warnings accumulated during execution of the current SP instruction is cleared. So, to fix the issue invokes the method THD::set_query_id() once per SP instruction, on its first execution. Re-parsing of failing SP instruction and following run of it don't invoke the method THD::set_query_id().
- Loading branch information
1 parent
1ee1979
commit 6abc16c
Showing
2 changed files
with
25 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