|
|
|
@ -2812,11 +2812,17 @@ 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_ndb->trans_options & TNTO_NO_LOGGING) |
|
|
|
op->setAnyValue(NDB_ANYVALUE_FOR_NOLOGGING); |
|
|
|
} |
|
|
|
m_rows_changed++; |
|
|
|
|
|
|
|
@ -3102,11 +3108,17 @@ 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_ndb->trans_options & TNTO_NO_LOGGING) |
|
|
|
op->setAnyValue(NDB_ANYVALUE_FOR_NOLOGGING); |
|
|
|
} |
|
|
|
/*
|
|
|
|
Execute update operation if we are not doing a scan for update |
|
|
|
@ -3170,13 +3182,19 @@ 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_ndb->trans_options & TNTO_NO_LOGGING) |
|
|
|
((NdbOperation *)trans->getLastDefinedOperation())-> |
|
|
|
setAnyValue(NDB_ANYVALUE_FOR_NOLOGGING); |
|
|
|
} |
|
|
|
if (!(m_primary_key_update || m_delete_cannot_batch)) |
|
|
|
// If deleting from cursor, NoCommit will be handled in next_result
|
|
|
|
@ -3210,11 +3228,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) |
|
|
|
op->setAnyValue(NDB_ANYVALUE_FOR_NOLOGGING); |
|
|
|
else if (thd->slave_thread) |
|
|
|
if (thd->slave_thread) |
|
|
|
op->setAnyValue(thd->server_id); |
|
|
|
else if (thd_ndb->trans_options & TNTO_NO_LOGGING) |
|
|
|
op->setAnyValue(NDB_ANYVALUE_FOR_NOLOGGING); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|