diff options
author | unknown <pem@mysql.com> | 2005-09-13 17:16:12 +0200 |
---|---|---|
committer | unknown <pem@mysql.com> | 2005-09-13 17:16:12 +0200 |
commit | 065a93773ede926d80a8f2dc772e43878304bce3 (patch) | |
tree | 0ea49f9919a82483665f1c90efb02d4d4c083545 /sql/set_var.h | |
parent | b5e15568aafb4f8491b6ae5e825cc4f7ca252adc (diff) | |
download | mariadb-git-065a93773ede926d80a8f2dc772e43878304bce3.tar.gz |
Fixed BUG#12712: SET AUTOCOMMIT should fail within SP/functions/triggers
Second version after review. Allow 'set autocommit' in procedures, but not
functions or triggers. Can return error in run-time (when a function calls
a procedure).
mysql-test/r/sp-error.result:
New test case for BUG#12712.
mysql-test/t/sp-error.test:
New test case for BUG#12712.
sql/set_var.cc:
Made sys_autocommit external, to allow testing in sql_yacc.yy.
sql/set_var.h:
Made sys_autocommit external, to allow testing in sql_yacc.yy.
sql/share/errmsg.txt:
New error message for disallowing the setting of autocommit in stored functions and triggers.
sql/sp_head.h:
New flag: has 'set autocommit', and testing for this in is_not_allowed_in_function().
sql/sql_yacc.yy:
Disallow setting AUTOCOMMIT in stored function and triggers.
Diffstat (limited to 'sql/set_var.h')
-rw-r--r-- | sql/set_var.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/set_var.h b/sql/set_var.h index 40ff4c8583f..854409c159e 100644 --- a/sql/set_var.h +++ b/sql/set_var.h @@ -905,6 +905,7 @@ extern sys_var_const_str sys_charset_system; extern sys_var_str sys_init_connect; extern sys_var_str sys_init_slave; extern sys_var_thd_time_zone sys_time_zone; +extern sys_var_thd_bit sys_autocommit; CHARSET_INFO *get_old_charset_by_name(const char *old_name); gptr find_named(I_List<NAMED_LIST> *list, const char *name, uint length, NAMED_LIST **found); |