diff options
author | unknown <pem@mysql.com> | 2005-09-14 10:54:02 +0200 |
---|---|---|
committer | unknown <pem@mysql.com> | 2005-09-14 10:54:02 +0200 |
commit | 8c86f8e4bfb7627051f8f231daf8bfa87c4e468a (patch) | |
tree | db9b07109e3ba0edcb810cc5c7115a60015f74a8 /sql/sql_yacc.yy | |
parent | 38c43ecdd3c0c57fbf8bc4e969d79d346a7b6b99 (diff) | |
download | mariadb-git-8c86f8e4bfb7627051f8f231daf8bfa87c4e468a.tar.gz |
Post-review fix for BUG#12712: SET AUTOCOMMIT should fail within SP/functions/triggers
mysql-test/r/sp.result:
Added missing drop table.
mysql-test/t/sp.test:
Added missing drop table.
sql/sp_head.h:
Post-review fix for autocommit check in SPs and triggers.
sql/sql_yacc.yy:
Post-review fix for autocommit check in SPs and triggers.
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r-- | sql/sql_yacc.yy | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index c163db3c393..3253e1065ff 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -8005,15 +8005,14 @@ internal_variable_name: if (tmp == &sys_time_zone && lex->add_time_zone_tables_to_query_tables(YYTHD)) YYABORT; - else - if (spc && tmp == &sys_autocommit) - { - /* - We don't allow setting AUTOCOMMIT from a stored function - or trigger. - */ - lex->sphead->m_flags|= sp_head::HAS_SET_AUTOCOMMIT_STMT; - } + else if (spc && tmp == &sys_autocommit) + { + /* + We don't allow setting AUTOCOMMIT from a stored function + or trigger. + */ + lex->sphead->m_flags|= sp_head::HAS_SET_AUTOCOMMIT_STMT; + } } else { |