mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
WL#1967
Support for COMMIT/ROLLBACK optional arguments innobase/include/trx0roll.h: WL#1967 trx_release_savepoint_for_mysql() innobase/trx/trx0roll.c: WL#1967 trx_release_savepoint_for_mysql() mysql-test/r/innodb.result: WL#1967 Test for savepoint release mysql-test/t/innodb.test: WL#1967 Test for savepoint release sql/ha_innodb.cc: WL#1967 innobase_release_savepoint_name() sql/ha_innodb.h: WL#1967 innobase_release_savepoint_name() sql/handler.cc: WL#1967 ha_release_savepoint_name() sql/handler.h: WL#1967 ha_release_savepoint_name() sql/lex.h: WL#1967 New tokens: CHAIN, RELEASE sql/mysqld.cc: WL#1967 new option: completion-type sql/set_var.cc: WL#1967 new option: completion-type sql/sql_class.h: WL#1967 new option: completion-type sql/sql_lex.h: WL#1967 Support RELEASE SAVEPOINT additional flags to support COMMIT/ROLLBACK options sql/sql_parse.cc: WL#1967 Transaction operations in mysql_endtrans(), begin_trans() sql/sql_yacc.yy: WL#1967 Support COMMIT/ROLLBACK optional args
This commit is contained in:
@ -869,6 +869,35 @@ int ha_rollback_to_savepoint(THD *thd, char *savepoint_name)
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
int ha_release_savepoint_name(THD *thd, char *savepoint_name)
|
||||
{
|
||||
my_off_t binlog_cache_pos=0;
|
||||
bool operation_done=0;
|
||||
int error=0;
|
||||
DBUG_ENTER("ha_release_savepoint_name");
|
||||
#ifdef USING_TRANSACTIONS
|
||||
if (opt_using_transactions)
|
||||
{
|
||||
#ifdef HAVE_INNOBASE_DB
|
||||
if ((error=innobase_release_savepoint_name(thd, savepoint_name)))
|
||||
{
|
||||
my_error(ER_ERROR_DURING_ROLLBACK, MYF(0), error);
|
||||
error=1;
|
||||
}
|
||||
else if (mysql_bin_log.is_open())
|
||||
{
|
||||
Query_log_event qinfo(thd, thd->query, thd->query_length, TRUE, FALSE);
|
||||
if (mysql_bin_log.write(&qinfo))
|
||||
error= 1;
|
||||
}
|
||||
operation_done=1;
|
||||
#endif
|
||||
}
|
||||
#endif /* USING_TRANSACTIONS */
|
||||
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Sets a transaction savepoint.
|
||||
|
Reference in New Issue
Block a user