summaryrefslogtreecommitdiff
path: root/sql/sql_class.h
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_class.h')
-rw-r--r--sql/sql_class.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/sql/sql_class.h b/sql/sql_class.h
index 9f091ac2c2b..083cf0b8c04 100644
--- a/sql/sql_class.h
+++ b/sql/sql_class.h
@@ -1627,14 +1627,14 @@ struct wait_for_commit
bool wakeup_subsequent_commits_running;
void register_wait_for_prior_commit(wait_for_commit *waitee);
- int wait_for_prior_commit()
+ int wait_for_prior_commit(THD *thd)
{
/*
Quick inline check, to avoid function call and locking in the common case
where no wakeup is registered, or a registered wait was already signalled.
*/
if (waiting_for_commit)
- return wait_for_prior_commit2();
+ return wait_for_prior_commit2(thd);
else
return wakeup_error;
}
@@ -1663,7 +1663,7 @@ struct wait_for_commit
void wakeup(int wakeup_error);
- int wait_for_prior_commit2();
+ int wait_for_prior_commit2(THD *thd);
void wakeup_subsequent_commits2(int wakeup_error);
void unregister_wait_for_prior_commit2();
@@ -3334,12 +3334,7 @@ public:
int wait_for_prior_commit()
{
if (wait_for_commit_ptr)
- {
- int err= wait_for_commit_ptr->wait_for_prior_commit();
- if (err)
- my_error(ER_PRIOR_COMMIT_FAILED, MYF(0));
- return err;
- }
+ return wait_for_commit_ptr->wait_for_prior_commit(this);
return 0;
}
void wakeup_subsequent_commits(int wakeup_error)