summaryrefslogtreecommitdiff
path: root/sql/sql_lex.h
diff options
context:
space:
mode:
authorunknown <davi@endora.local>2007-10-30 20:51:04 -0200
committerunknown <davi@endora.local>2007-10-30 20:51:04 -0200
commitb541504b539a20dde41e93a61b60b1f5f56ca70c (patch)
tree473be656c420dac24421d5f9c73cfc7f6bbf5ca0 /sql/sql_lex.h
parent98a07054bf466b9de21ba2c18e885b00d88fa5f2 (diff)
downloadmariadb-git-b541504b539a20dde41e93a61b60b1f5f56ca70c.tar.gz
Bug#30904 SET PASSWORD statement is non-transactional
The SET PASSWORD statement is non-transactional (no explicit transaction boundaries) in nature and hence is forbidden inside stored functions and triggers, but it weren't being effectively forbidden. The implemented fix is to issue a implicit commit with every SET PASSWORD statement, effectively prohibiting these statements in stored functions and triggers. mysql-test/r/sp-error.result: Add test case result for Bug#30904 mysql-test/t/sp-error.test: Add test case for Bug#30904 sql/sql_lex.h: Add variable to set that a statement with SET PASSWORD causes a implicit commit. sql/sql_parse.cc: End active transaction in SET PASSWORD. sql/sql_yacc.yy: Set the correct flag on SET PASSWORD if inside a SP, thus effectively prohibiting SET PASSWORD statements in stored functions and triggers.
Diffstat (limited to 'sql/sql_lex.h')
-rw-r--r--sql/sql_lex.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_lex.h b/sql/sql_lex.h
index a26c4fd1ca0..507d64daf89 100644
--- a/sql/sql_lex.h
+++ b/sql/sql_lex.h
@@ -1616,7 +1616,7 @@ typedef struct st_lex : public Query_tables_list
uint8 create_view_algorithm;
uint8 create_view_check;
bool drop_if_exists, drop_temporary, local_file, one_shot_set;
-
+ bool autocommit;
bool verbose, no_write_to_binlog;
bool tx_chain, tx_release;