diff options
author | unknown <andrey@lmy004.> | 2006-02-15 17:12:27 +0100 |
---|---|---|
committer | unknown <andrey@lmy004.> | 2006-02-15 17:12:27 +0100 |
commit | 2557f80fd1091c55873e1223638671b92d4274fb (patch) | |
tree | 9ed6fc16ec4ffe63119d291e56559b89f9210473 /sql/sp_head.cc | |
parent | 098ae02afa1d42024475e05442e8e530c0fbcf58 (diff) | |
download | mariadb-git-2557f80fd1091c55873e1223638671b92d4274fb.tar.gz |
fix for bug#16410 (Events: CREATE EVENT is legal in a CREATE TRIGGER statement)
WL#1034 (Internal CRON)
(post-post-review updates)
mysql-test/r/events.result:
update results file
mysql-test/t/events.test:
add test for Bug #16410 Events: CREATE EVENT is legal in a CREATE TRIGGER statement
sql/sp_head.cc:
CREATE/ALTER/DROP event mean explicit commit, so they are not allowed in
a FUNCTION/TRIGGER. Fixes bug#16410
sql/sql_parse.cc:
- end active transaction for CREATE/ALTER/DROP EVENT because
they are DDL statements.
Diffstat (limited to 'sql/sp_head.cc')
-rw-r--r-- | sql/sp_head.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sp_head.cc b/sql/sp_head.cc index cf1097a28c6..301d88c8775 100644 --- a/sql/sp_head.cc +++ b/sql/sp_head.cc @@ -255,6 +255,9 @@ sp_get_flags_for_command(LEX *lex) case SQLCOM_ALTER_FUNCTION: case SQLCOM_DROP_PROCEDURE: case SQLCOM_DROP_FUNCTION: + case SQLCOM_CREATE_EVENT: + case SQLCOM_ALTER_EVENT: + case SQLCOM_DROP_EVENT: flags= sp_head::HAS_COMMIT_OR_ROLLBACK; break; default: |