Commit 8c86f8e4 authored by unknown's avatar unknown
Browse files

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.
parent 38c43ecd
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3323,6 +3323,7 @@ drop function bug12379|
drop procedure bug12379_1|
drop procedure bug12379_2|
drop procedure bug12379_3|
drop table t3|
drop procedure if exists bug13124|
create procedure bug13124()
begin
+1 −0
Original line number Diff line number Diff line
@@ -4161,6 +4161,7 @@ drop function bug12379|
drop procedure bug12379_1|
drop procedure bug12379_2|
drop procedure bug12379_3|
drop table t3|

#
# Bug #13124    Stored Procedure using SELECT INTO crashes server
+2 −1
Original line number Diff line number Diff line
@@ -285,7 +285,8 @@ class sp_head :private Query_arena
      my_error(ER_SP_NO_RETSET, MYF(0), where);
    else if (m_flags & HAS_SET_AUTOCOMMIT_STMT)
      my_error(ER_SP_CANT_SET_AUTOCOMMIT, MYF(0));
    return test(m_flags & (CONTAINS_DYNAMIC_SQL|MULTI_RESULTS));
    return test(m_flags &
		(CONTAINS_DYNAMIC_SQL|MULTI_RESULTS|HAS_SET_AUTOCOMMIT_STMT));
  }
private:

+8 −9
Original line number Diff line number Diff line
@@ -8005,8 +8005,7 @@ internal_variable_name:
            if (tmp == &sys_time_zone &&
                lex->add_time_zone_tables_to_query_tables(YYTHD))
              YYABORT;
            else
              if (spc && tmp == &sys_autocommit)
            else if (spc && tmp == &sys_autocommit)
            {
              /*
                We don't allow setting AUTOCOMMIT from a stored function