summaryrefslogtreecommitdiff
path: root/sql/ha_ndbcluster.cc
diff options
context:
space:
mode:
authorunknown <tomas@whalegate.ndb.mysql.com>2007-08-23 16:23:55 +0200
committerunknown <tomas@whalegate.ndb.mysql.com>2007-08-23 16:23:55 +0200
commitf8d1951f81b642c2d5366446325c17d5af5f3277 (patch)
treeacfe3b7e8d5bdb3842c8837c8199d14f710d459a /sql/ha_ndbcluster.cc
parent58256917106dff23525fc66b6ec509aecf1efe01 (diff)
parent9e72aacf10de9831b16a3361f5c15146a32171e9 (diff)
downloadmariadb-git-f8d1951f81b642c2d5366446325c17d5af5f3277.tar.gz
Merge whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-target-5.1.22
into whalegate.ndb.mysql.com:/home/tomas/mysql-5.1-new-ndb-merge sql/ha_ndbcluster_binlog.cc: Auto merged sql/ha_ndbcluster.cc: manual merge
Diffstat (limited to 'sql/ha_ndbcluster.cc')
-rw-r--r--sql/ha_ndbcluster.cc49
1 files changed, 32 insertions, 17 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index f6c41af5312..a6dddc536ce 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -2812,12 +2812,16 @@ int ha_ndbcluster::write_row(uchar *record)
if (unlikely(m_slow_path))
{
+ /*
+ ignore TNTO_NO_LOGGING for slave thd. It is used to indicate
+ log-slave-updates option. This is instead handled in the
+ injector thread, by looking explicitly at the
+ opt_log_slave_updates flag.
+ */
Thd_ndb *thd_ndb= get_thd_ndb(thd);
- if (thd_ndb->trans_options & TNTO_NO_LOGGING)
- op->setAnyValue(NDB_ANYVALUE_FOR_NOLOGGING);
- else if (thd->slave_thread)
+ if (thd->slave_thread)
op->setAnyValue(thd->server_id);
- else if (!(thd->options & OPTION_BIN_LOG))
+ else if (thd_ndb->trans_options & TNTO_NO_LOGGING)
op->setAnyValue(NDB_ANYVALUE_FOR_NOLOGGING);
}
m_rows_changed++;
@@ -3104,12 +3108,16 @@ int ha_ndbcluster::update_row(const uchar *old_data, uchar *new_data)
if (unlikely(m_slow_path))
{
+ /*
+ ignore TNTO_NO_LOGGING for slave thd. It is used to indicate
+ log-slave-updates option. This is instead handled in the
+ injector thread, by looking explicitly at the
+ opt_log_slave_updates flag.
+ */
Thd_ndb *thd_ndb= get_thd_ndb(thd);
- if (thd_ndb->trans_options & TNTO_NO_LOGGING)
- op->setAnyValue(NDB_ANYVALUE_FOR_NOLOGGING);
- else if (thd->slave_thread)
+ if (thd->slave_thread)
op->setAnyValue(thd->server_id);
- else if (!(thd->options & OPTION_BIN_LOG))
+ else if (thd_ndb->trans_options & TNTO_NO_LOGGING)
op->setAnyValue(NDB_ANYVALUE_FOR_NOLOGGING);
}
/*
@@ -3174,14 +3182,17 @@ int ha_ndbcluster::delete_row(const uchar *record)
if (unlikely(m_slow_path))
{
+ /*
+ ignore TNTO_NO_LOGGING for slave thd. It is used to indicate
+ log-slave-updates option. This is instead handled in the
+ injector thread, by looking explicitly at the
+ opt_log_slave_updates flag.
+ */
Thd_ndb *thd_ndb= get_thd_ndb(thd);
- if (thd_ndb->trans_options & TNTO_NO_LOGGING)
- ((NdbOperation *)trans->getLastDefinedOperation())->
- setAnyValue(NDB_ANYVALUE_FOR_NOLOGGING);
- else if (thd->slave_thread)
+ if (thd->slave_thread)
((NdbOperation *)trans->getLastDefinedOperation())->
setAnyValue(thd->server_id);
- else if (!(thd->options & OPTION_BIN_LOG))
+ else if (thd_ndb->trans_options & TNTO_NO_LOGGING)
((NdbOperation *)trans->getLastDefinedOperation())->
setAnyValue(NDB_ANYVALUE_FOR_NOLOGGING);
}
@@ -3217,12 +3228,16 @@ int ha_ndbcluster::delete_row(const uchar *record)
if (unlikely(m_slow_path))
{
+ /*
+ ignore TNTO_NO_LOGGING for slave thd. It is used to indicate
+ log-slave-updates option. This is instead handled in the
+ injector thread, by looking explicitly at the
+ opt_log_slave_updates flag.
+ */
Thd_ndb *thd_ndb= get_thd_ndb(thd);
- if (thd_ndb->trans_options & TNTO_NO_LOGGING)
- op->setAnyValue(NDB_ANYVALUE_FOR_NOLOGGING);
- else if (thd->slave_thread)
+ if (thd->slave_thread)
op->setAnyValue(thd->server_id);
- else if (!(thd->options & OPTION_BIN_LOG))
+ else if (thd_ndb->trans_options & TNTO_NO_LOGGING)
op->setAnyValue(NDB_ANYVALUE_FOR_NOLOGGING);
}
}