summaryrefslogtreecommitdiff
path: root/sql/ha_innobase.cc
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2002-06-22 20:33:48 +0300
committerunknown <heikki@hundin.mysql.fi>2002-06-22 20:33:48 +0300
commitb7b988b3c36fa7a1f0a284d6478bbccbe706c09f (patch)
tree10f73ef6772efe238508a9c233f41af4853e636c /sql/ha_innobase.cc
parent562faa29e21b115c9b934926cb5e031c6841e0b8 (diff)
downloadmariadb-git-b7b988b3c36fa7a1f0a284d6478bbccbe706c09f.tar.gz
ha_innobase.cc:
Use current_thd to check if a transaction is done by a slave thread sql/ha_innobase.cc: Use current_thd to check if a transaction is done by a slave thread
Diffstat (limited to 'sql/ha_innobase.cc')
-rw-r--r--sql/ha_innobase.cc24
1 files changed, 10 insertions, 14 deletions
diff --git a/sql/ha_innobase.cc b/sql/ha_innobase.cc
index 0e712f42df7..761d74f49b0 100644
--- a/sql/ha_innobase.cc
+++ b/sql/ha_innobase.cc
@@ -587,6 +587,16 @@ innobase_commit_low(
/*================*/
trx_t* trx) /* in: transaction handle */
{
+ if (current_thd->slave_thread) {
+
+ /* Update the replication position info inside InnoDB */
+
+ trx->mysql_master_log_file_name = glob_mi.log_file_name;
+ trx->mysql_master_log_pos = (ib_longlong)
+ (glob_mi.pos + glob_mi.event_len
+ + glob_mi.pending);
+ }
+
trx_commit_for_mysql(trx);
}
@@ -612,20 +622,6 @@ innobase_commit(
trx = check_trx_exists(thd);
if (trx_handle != (void*)&innodb_dummy_stmt_trx_handle) {
- if (thd->slave_thread) {
-
- /* Update the replication position info inside
- InnoDB. Note that we cannot presently do this for
- CREATE TABLE etc. because MySQL does not tell us the
- thd associated with those operations! */
-
- trx->mysql_master_log_file_name =
- glob_mi.log_file_name;
- trx->mysql_master_log_pos = (ib_longlong)
- (glob_mi.pos + glob_mi.event_len
- + glob_mi.pending);
- }
-
innobase_commit_low(trx);
}