summaryrefslogtreecommitdiff
path: root/sql/sql_trigger.h
diff options
context:
space:
mode:
authorkostja@bodhi.(none) <>2007-07-05 11:34:04 +0400
committerkostja@bodhi.(none) <>2007-07-05 11:34:04 +0400
commita7b05cb7864c20239d22dc558c22cc81d82c61b8 (patch)
tree8d7427787cd278a6b8772c821b5c2aa97df51b03 /sql/sql_trigger.h
parentc3f37e0b3df9b00ff386cc622e4d71ee3f852da2 (diff)
downloadmariadb-git-a7b05cb7864c20239d22dc558c22cc81d82c61b8.tar.gz
A fix and a test case for Bug#29050 Creation of a legal stored procedure
fails if a database is not selected prior. The problem manifested itself when a user tried to create a routine that had non-fully-qualified identifiers in its bodies and there was no current database selected. This is a regression introduced by the fix for Bug 19022: The patch for Bug 19022 changes the code to always produce a warning if we can't resolve the current database in the parser. In this case this was not necessary, since even though the produced parsed tree was incorrect, we never re-use sphead that was obtained at first parsing of CREATE PROCEDURE. The sphead that is anyhow used is always obtained through db_load_routine, and there we change the current database to sphead->m_db before calling yyparse. The idea of the fix is to resolve the current database directly using lex->sphead->m_db member when parsing a stored routine body, when such is present. This patch removes the need to reset the current database when loading a trigger or routine definition into SP cache. The redundant code will be removed in 5.1.
Diffstat (limited to 'sql/sql_trigger.h')
0 files changed, 0 insertions, 0 deletions