mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Fix for bug #13825 "Triggers: crash if release savepoint" and for general
handling of savepoints in stored routines. Fixed ha_rollback_to_savepoint()/ha_savepoint()/ha_release_savepoint() functions to properly handle savepoints inside of stored functions and triggers. Also now when we invoke stored function or trigger we create new savepoint level. We destroy it at the end of function/trigger execution and return back to old savepoint level.
This commit is contained in:
@@ -4016,8 +4016,8 @@ end_with_restore_list:
|
||||
break;
|
||||
}
|
||||
case SQLCOM_SAVEPOINT:
|
||||
if (!(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) ||
|
||||
!opt_using_transactions)
|
||||
if (!(thd->options & (OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN) ||
|
||||
thd->in_sub_stmt) || !opt_using_transactions)
|
||||
send_ok(thd);
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user