Skip to content

Commit

Permalink
Fixed embedded server.
Browse files Browse the repository at this point in the history
  • Loading branch information
sanja-byelkin committed Sep 8, 2016
1 parent effb65b commit 1f2ff25
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
9 changes: 5 additions & 4 deletions sql/transaction.cc
Expand Up @@ -38,6 +38,9 @@ static void trans_track_end_trx(THD *thd)
thd->session_tracker.get_tracker(TRANSACTION_INFO_TRACKER))->end_trx(thd);
}
}
#else
#define trans_track_end_trx(A) do{}while(0)
#endif //EMBEDDED_LIBRARY


/**
Expand All @@ -46,6 +49,7 @@ static void trans_track_end_trx(THD *thd)
*/
void trans_reset_one_shot_chistics(THD *thd)
{
#ifndef EMBEDDED_LIBRARY
if (thd->variables.session_track_transaction_info > TX_TRACK_NONE)
{
Transaction_state_tracker *tst= (Transaction_state_tracker *)
Expand All @@ -54,13 +58,10 @@ void trans_reset_one_shot_chistics(THD *thd)
tst->set_read_flags(thd, TX_READ_INHERIT);
tst->set_isol_level(thd, TX_ISOL_INHERIT);
}

#endif //EMBEDDED_LIBRARY
thd->tx_isolation= (enum_tx_isolation) thd->variables.tx_isolation;
thd->tx_read_only= thd->variables.tx_read_only;
}
#else
#define trans_track_end_trx(A) do{}while(0)
#endif //EMBEDDED_LIBRARY

/* Conditions under which the transaction state must not change. */
static bool trans_check(THD *thd)
Expand Down
4 changes: 0 additions & 4 deletions sql/transaction.h
Expand Up @@ -44,10 +44,6 @@ bool trans_xa_prepare(THD *thd);
bool trans_xa_commit(THD *thd);
bool trans_xa_rollback(THD *thd);

#ifndef EMBEDDED_LIBRARY
void trans_reset_one_shot_chistics(THD *thd);
#else
#define trans_reset_one_shot_chistics(A) do{}while(0)
#endif //EMBEDDED_LIBRARY

#endif /* TRANSACTION_H */

0 comments on commit 1f2ff25

Please sign in to comment.