summaryrefslogtreecommitdiff
path: root/sql/ha_innodb.cc
diff options
context:
space:
mode:
authorunknown <heikki@hundin.mysql.fi>2005-04-27 13:36:58 +0300
committerunknown <heikki@hundin.mysql.fi>2005-04-27 13:36:58 +0300
commit3296a12151454e7671bf4288248f551b2082a4ed (patch)
tree1c4cccd62713546b2e597b74ddb98d65bf6e0316 /sql/ha_innodb.cc
parent2ea24da8497cf433ba2c7685e4e39dc4c713c682 (diff)
downloadmariadb-git-3296a12151454e7671bf4288248f551b2082a4ed.tar.gz
ha_innodb.cc, mysqld.cc:
Fix compilation error if HAVE_REPLICATION is not defined sql/mysqld.cc: Fix compilation error if HAVE_REPLICATION is not defined sql/ha_innodb.cc: Fix compilation error if HAVE_REPLICATION is not defined
Diffstat (limited to 'sql/ha_innodb.cc')
-rw-r--r--sql/ha_innodb.cc22
1 files changed, 10 insertions, 12 deletions
diff --git a/sql/ha_innodb.cc b/sql/ha_innodb.cc
index 3aed42f9c38..7d77ae809b1 100644
--- a/sql/ha_innodb.cc
+++ b/sql/ha_innodb.cc
@@ -1611,6 +1611,7 @@ innobase_report_binlog_offset_and_commit(
trx->mysql_log_file_name = log_file_name;
trx->mysql_log_offset = (ib_longlong)end_offset;
+#ifdef HAVE_REPLICATION
if (thd->variables.sync_replication) {
/* Let us store the binlog file name and the position, so that
we know how long to wait for the binlog to the replicated to
@@ -1628,7 +1629,7 @@ innobase_report_binlog_offset_and_commit(
trx->repl_wait_binlog_pos = (ib_longlong)end_offset;
}
-
+#endif /* HAVE_REPLICATION */
trx->flush_log_later = TRUE;
innobase_commit(thd, trx_handle);
@@ -1681,10 +1682,7 @@ innobase_commit_complete(
/* out: 0 */
THD* thd) /* in: user thread */
{
- struct timespec abstime;
trx_t* trx;
- int cmp;
- int ret;
trx = (trx_t*) thd->ha_data[innobase_hton.slot];
@@ -1700,21 +1698,19 @@ innobase_commit_complete(
trx_commit_complete_for_mysql(trx);
}
- printf("Wait binlog name %s, repl state %lu\n",
- trx->repl_wait_binlog_name,
- (uint)innobase_repl_state);
-
+#ifdef HAVE_REPLICATION
if (thd->variables.sync_replication
&& trx->repl_wait_binlog_name
&& innobase_repl_state != 0) {
+ struct timespec abstime;
+ int cmp;
+ int ret;
+
/* In synchronous replication, let us wait until the MySQL
replication has sent the relevant binlog segment to the
replication slave. */
-/* TODO: Make sure MySQL uses some way (TCP_NODELAY?) to ensure that the data
-has been received in the slave! */
-
pthread_mutex_lock(&innobase_repl_cond_mutex);
try_again:
if (innobase_repl_state == 0) {
@@ -1809,10 +1805,11 @@ try_again:
goto try_again;
}
-
+#endif HAVE_REPLICATION
return(0);
}
+#ifdef HAVE_REPLICATION
/*********************************************************************
In synchronous replication, reports to InnoDB up to which binlog position
we have sent the binlog to the slave. Note that replication is synchronous
@@ -1908,6 +1905,7 @@ innobase_repl_report_sent_binlog(
pthread_cond_broadcast(&innobase_repl_cond);
}
}
+#endif /* HAVE_REPLICATION */
/*********************************************************************
Rolls back a transaction or the latest SQL statement. */