diff options
Diffstat (limited to 'sql/sp_head.h')
-rw-r--r-- | sql/sp_head.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/sp_head.h b/sql/sp_head.h index 271119ff2fb..7c9cf364b17 100644 --- a/sql/sp_head.h +++ b/sql/sp_head.h @@ -114,7 +114,8 @@ public: IN_HANDLER= 4, // Is set if the parser is in a handler body MULTI_RESULTS= 8, // Is set if a procedure with SELECT(s) CONTAINS_DYNAMIC_SQL= 16, // Is set if a procedure with PREPARE/EXECUTE - IS_INVOKED= 32 // Is set if this sp_head is being used. + IS_INVOKED= 32, // Is set if this sp_head is being used + HAS_SET_AUTOCOMMIT_STMT = 64 // Is set if a procedure with 'set autocommit' }; int m_type; // TYPE_ENUM_FUNCTION or TYPE_ENUM_PROCEDURE @@ -282,6 +283,8 @@ public: my_error(ER_STMT_NOT_ALLOWED_IN_SF_OR_TRG, MYF(0), "Dynamic SQL"); else if (m_flags & MULTI_RESULTS) 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)); } private: |