diff options
author | unknown <tomas@poseidon.ndb.mysql.com> | 2006-06-14 20:25:51 +0200 |
---|---|---|
committer | unknown <tomas@poseidon.ndb.mysql.com> | 2006-06-14 20:25:51 +0200 |
commit | 39246e2fa75c9ebb0001907e650d960b71e68220 (patch) | |
tree | 968e245c5cf5ff870b4e7bdef696327bfa7da197 /sql/ha_ndbcluster.cc | |
parent | ec3a7c41b73eb3de85fe59bad3d098f54c6a41a9 (diff) | |
parent | f3a286cc5466f04c4c72a81f15f80c2f03a175a3 (diff) | |
download | mariadb-git-39246e2fa75c9ebb0001907e650d960b71e68220.tar.gz |
Merge poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-5.0
sql/ha_ndbcluster.cc:
manual merge
Diffstat (limited to 'sql/ha_ndbcluster.cc')
-rw-r--r-- | sql/ha_ndbcluster.cc | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index bb91edf7b73..73c6bfd6f03 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -2087,6 +2087,11 @@ int ha_ndbcluster::write_row(byte *record) */ if (!m_use_write && m_ignore_dup_key) { + /* + compare if expression with that in start_bulk_insert() + start_bulk_insert will set parameters to ensure that each + write_row is committed individually + */ int peek_res= peek_indexed_rows(record); if (!peek_res) @@ -3206,6 +3211,19 @@ void ha_ndbcluster::start_bulk_insert(ha_rows rows) DBUG_PRINT("enter", ("rows: %d", (int)rows)); m_rows_inserted= (ha_rows) 0; + if (!m_use_write && m_ignore_dup_key) + { + /* + compare if expression with that in write_row + we have a situation where peek_indexed_rows() will be called + so we cannot batch + */ + DBUG_PRINT("info", ("Batching turned off as duplicate key is " + "ignored by using peek_row")); + m_rows_to_insert= 1; + m_bulk_insert_rows= 1; + DBUG_VOID_RETURN; + } if (rows == (ha_rows) 0) { /* We don't know how many will be inserted, guess */ |