1
0
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:
dlenev@mysql.com
2005-11-19 15:09:23 +03:00
parent f6995841b3
commit 574e711209
7 changed files with 411 additions and 14 deletions

View File

@@ -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
{