diff options
author | andrey@example.com <> | 2006-08-25 15:51:29 +0200 |
---|---|---|
committer | andrey@example.com <> | 2006-08-25 15:51:29 +0200 |
commit | f115ecf89faddbc4fc8dd149facac214082a2657 (patch) | |
tree | 4270ee7b2686fb9d852d358f355f58fb399d5840 /sql/sp_head.cc | |
parent | 85e6c3bfc1874946a9170753a9ddcc45e1725541 (diff) | |
download | mariadb-git-f115ecf89faddbc4fc8dd149facac214082a2657.tar.gz |
Fix for bug#21795: SP: sp_head::is_not_allowed_in_function() contains
erroneous check
Problem: Actually there were two problems in the server code. The check
for SQLCOM_FLUSH in SF/Triggers were not according to the existing
architecture which uses sp_get_flags_for_command() from sp_head.cc .
This function was also missing a check for SQLCOM_FLUSH which has a
problem combined with prelocking. This changeset fixes both of these
deficiencies as well as the erroneous check in
sp_head::is_not_allowed_in_function() which was a copy&paste error.
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r-- | sql/sp_head.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc index eec6e0fc3cd..9761de625be 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -230,6 +230,12 @@ sp_get_flags_for_command(LEX *lex) else flags= sp_head::HAS_COMMIT_OR_ROLLBACK; break; + case SQLCOM_FLUSH: + flags= sp_head::HAS_SQLCOM_FLUSH; + break; + case SQLCOM_RESET: + flags= sp_head::HAS_SQLCOM_RESET; + break; case SQLCOM_CREATE_INDEX: case SQLCOM_CREATE_DB: case SQLCOM_CREATE_VIEW: |