• unknown's avatar
    Fixed BUG#12712: SET AUTOCOMMIT should fail within SP/functions/triggers · 065a9377
    unknown authored
      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.
    065a9377
set_var.cc 109 KB