summaryrefslogtreecommitdiff
path: root/sql/ha_ndbcluster.cc
diff options
context:
space:
mode:
authorunknown <tomas@whalegate.ndb.mysql.com>2007-08-21 14:41:50 +0200
committerunknown <tomas@whalegate.ndb.mysql.com>2007-08-21 14:41:50 +0200
commit7468714a4744b486581fbdbb58d303b42d9d707a (patch)
tree1276ab73b97bf69f0b61f7a8630b462547613588 /sql/ha_ndbcluster.cc
parent47058476a15136e5bcb026cc5ec3d4e3feb1feed (diff)
parentb0ac87dc443f4b7b704d49f906f7673562541352 (diff)
downloadmariadb-git-7468714a4744b486581fbdbb58d303b42d9d707a.tar.gz
manual merge
mysql-test/suite/binlog/t/binlog_row_mix_innodb_myisam.test: Auto merged mysql-test/suite/ndb/r/ndb_read_multi_range.result: Auto merged mysql-test/suite/ndb/t/ndb_read_multi_range.test: Auto merged mysql-test/suite/rpl/r/rpl_row_max_relay_size.result: Auto merged mysql-test/suite/rpl/t/rpl_row_create_table.test: Auto merged mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test: Auto merged mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result: Auto merged mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result: Auto merged mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result: Auto merged mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result: Auto merged sql/ha_ndbcluster_binlog.cc: Auto merged sql/rpl_rli.h: Auto merged BitKeeper/deleted/.del-rpl_extraMaster_Col.test: Delete: mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test
Diffstat (limited to 'sql/ha_ndbcluster.cc')
-rw-r--r--sql/ha_ndbcluster.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index 3b68b3828d2..f6c41af5312 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -2817,6 +2817,8 @@ int ha_ndbcluster::write_row(uchar *record)
op->setAnyValue(NDB_ANYVALUE_FOR_NOLOGGING);
else if (thd->slave_thread)
op->setAnyValue(thd->server_id);
+ else if (!(thd->options & OPTION_BIN_LOG))
+ op->setAnyValue(NDB_ANYVALUE_FOR_NOLOGGING);
}
m_rows_changed++;
@@ -3107,6 +3109,8 @@ int ha_ndbcluster::update_row(const uchar *old_data, uchar *new_data)
op->setAnyValue(NDB_ANYVALUE_FOR_NOLOGGING);
else if (thd->slave_thread)
op->setAnyValue(thd->server_id);
+ else if (!(thd->options & OPTION_BIN_LOG))
+ op->setAnyValue(NDB_ANYVALUE_FOR_NOLOGGING);
}
/*
Execute update operation if we are not doing a scan for update
@@ -3177,6 +3181,9 @@ int ha_ndbcluster::delete_row(const uchar *record)
else if (thd->slave_thread)
((NdbOperation *)trans->getLastDefinedOperation())->
setAnyValue(thd->server_id);
+ else if (!(thd->options & OPTION_BIN_LOG))
+ ((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
@@ -3215,6 +3222,8 @@ int ha_ndbcluster::delete_row(const uchar *record)
op->setAnyValue(NDB_ANYVALUE_FOR_NOLOGGING);
else if (thd->slave_thread)
op->setAnyValue(thd->server_id);
+ else if (!(thd->options & OPTION_BIN_LOG))
+ op->setAnyValue(NDB_ANYVALUE_FOR_NOLOGGING);
}
}
@@ -3960,6 +3969,8 @@ int ha_ndbcluster::info(uint flag)
DBUG_PRINT("info", ("HA_STATUS_AUTO"));
if (m_table && table->found_next_number_field)
{
+ if ((my_errno= check_ndb_connection()))
+ DBUG_RETURN(my_errno);
Ndb *ndb= get_ndb();
Ndb_tuple_id_range_guard g(m_share);
@@ -8536,7 +8547,8 @@ ha_ndbcluster::read_multi_range_first(KEY_MULTI_RANGE **found_range_p,
if (uses_blob_value() ||
(cur_index_type == UNIQUE_INDEX &&
has_null_in_unique_index(active_index) &&
- null_value_index_search(ranges, ranges+range_count, buffer)))
+ null_value_index_search(ranges, ranges+range_count, buffer))
+ || m_delete_cannot_batch || m_update_cannot_batch)
{
m_disable_multi_read= TRUE;
DBUG_RETURN(handler::read_multi_range_first(found_range_p,