mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Backport of:
------------------------------------------------------------ revno: 2630.13.2 committer: Davi Arnaut <davi@sun.com> branch nick: WL4284-6.0 timestamp: Thu 2008-07-03 18:26:51 -0300 message: Remove unused USING_TRANSACTIONS macro which unnecessarily cumbers the code. This macro is a historical leftover and has no practical use since its unconditionally defined. sql/handler.cc: Remove an always defined #ifdef (USING_TRNASACTIONS). sql/handler.h: Remove an always defined #ifdef (USING_TRNASACTIONS). sql/log.cc: Remove an always defined #ifdef (USING_TRNASACTIONS). sql/log_event.cc: Remove an always defined #ifdef (USING_TRNASACTIONS). sql/set_var.cc: Remove an always defined #ifdef (USING_TRNASACTIONS). sql/sql_class.cc: Remove an always defined #ifdef (USING_TRNASACTIONS). sql/sql_class.h: Remove an always defined #ifdef (USING_TRNASACTIONS). sql/sql_parse.cc: Remove an always defined #ifdef (USING_TRNASACTIONS).
This commit is contained in:
@ -992,7 +992,7 @@ int ha_prepare(THD *thd)
|
||||
THD_TRANS *trans=all ? &thd->transaction.all : &thd->transaction.stmt;
|
||||
Ha_trx_info *ha_info= trans->ha_list;
|
||||
DBUG_ENTER("ha_prepare");
|
||||
#ifdef USING_TRANSACTIONS
|
||||
|
||||
if (ha_info)
|
||||
{
|
||||
for (; ha_info; ha_info= ha_info->next())
|
||||
@ -1018,7 +1018,7 @@ int ha_prepare(THD *thd)
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif /* USING_TRANSACTIONS */
|
||||
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
@ -1146,7 +1146,7 @@ int ha_commit_trans(THD *thd, bool all)
|
||||
my_error(ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG, MYF(0));
|
||||
DBUG_RETURN(2);
|
||||
}
|
||||
#ifdef USING_TRANSACTIONS
|
||||
|
||||
if (ha_info)
|
||||
{
|
||||
uint rw_ha_count;
|
||||
@ -1227,7 +1227,6 @@ end:
|
||||
/* Free resources and perform other cleanup even for 'empty' transactions. */
|
||||
else if (is_real_trans)
|
||||
thd->transaction.cleanup();
|
||||
#endif /* USING_TRANSACTIONS */
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
@ -1249,7 +1248,7 @@ int ha_commit_one_phase(THD *thd, bool all)
|
||||
bool is_real_trans=all || thd->transaction.all.ha_list == 0;
|
||||
Ha_trx_info *ha_info= trans->ha_list, *ha_info_next;
|
||||
DBUG_ENTER("ha_commit_one_phase");
|
||||
#ifdef USING_TRANSACTIONS
|
||||
|
||||
if (ha_info)
|
||||
{
|
||||
for (; ha_info; ha_info= ha_info_next)
|
||||
@ -1279,7 +1278,7 @@ int ha_commit_one_phase(THD *thd, bool all)
|
||||
/* Free resources and perform other cleanup even for 'empty' transactions. */
|
||||
if (is_real_trans)
|
||||
thd->transaction.cleanup();
|
||||
#endif /* USING_TRANSACTIONS */
|
||||
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
@ -1319,7 +1318,7 @@ int ha_rollback_trans(THD *thd, bool all)
|
||||
my_error(ER_COMMIT_NOT_ALLOWED_IN_SF_OR_TRG, MYF(0));
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
#ifdef USING_TRANSACTIONS
|
||||
|
||||
if (ha_info)
|
||||
{
|
||||
/* Close all cursors that can not survive ROLLBACK */
|
||||
@ -1350,7 +1349,6 @@ int ha_rollback_trans(THD *thd, bool all)
|
||||
/* Always cleanup. Even if there nht==0. There may be savepoints. */
|
||||
if (is_real_trans)
|
||||
thd->transaction.cleanup();
|
||||
#endif /* USING_TRANSACTIONS */
|
||||
if (all)
|
||||
thd->transaction_rollback_request= FALSE;
|
||||
|
||||
@ -1386,7 +1384,7 @@ int ha_rollback_trans(THD *thd, bool all)
|
||||
int ha_autocommit_or_rollback(THD *thd, int error)
|
||||
{
|
||||
DBUG_ENTER("ha_autocommit_or_rollback");
|
||||
#ifdef USING_TRANSACTIONS
|
||||
|
||||
if (thd->transaction.stmt.ha_list)
|
||||
{
|
||||
if (!error)
|
||||
@ -1404,7 +1402,6 @@ int ha_autocommit_or_rollback(THD *thd, int error)
|
||||
thd->variables.tx_isolation=thd->session_tx_isolation;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
if (!error)
|
||||
RUN_HOOK(transaction, after_commit, (thd, FALSE));
|
||||
@ -1812,7 +1809,7 @@ int ha_savepoint(THD *thd, SAVEPOINT *sv)
|
||||
&thd->transaction.all);
|
||||
Ha_trx_info *ha_info= trans->ha_list;
|
||||
DBUG_ENTER("ha_savepoint");
|
||||
#ifdef USING_TRANSACTIONS
|
||||
|
||||
for (; ha_info; ha_info= ha_info->next())
|
||||
{
|
||||
int err;
|
||||
@ -1836,7 +1833,7 @@ int ha_savepoint(THD *thd, SAVEPOINT *sv)
|
||||
engines are prepended to the beginning of the list.
|
||||
*/
|
||||
sv->ha_list= trans->ha_list;
|
||||
#endif /* USING_TRANSACTIONS */
|
||||
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user