diff options
author | tomas@poseidon.ndb.mysql.com <> | 2004-10-01 21:35:50 +0000 |
---|---|---|
committer | tomas@poseidon.ndb.mysql.com <> | 2004-10-01 21:35:50 +0000 |
commit | 5745223a90c5e6a3a7b322f1073ca866606dfea2 (patch) | |
tree | 3020c1fb1bfb34282bdcad76fc2dcb5690b7d392 /sql/ha_ndbcluster.cc | |
parent | c4c398bce3c1dfe85eadc74b306cf068b72a6934 (diff) | |
parent | 929e98b45b6aac47a6e35e27be4850ee97a97837 (diff) | |
download | mariadb-git-5745223a90c5e6a3a7b322f1073ca866606dfea2.tar.gz |
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1
Diffstat (limited to 'sql/ha_ndbcluster.cc')
-rw-r--r-- | sql/ha_ndbcluster.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index d4ab6f5d4c1..e48ac8cc75e 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -399,7 +399,7 @@ int ha_ndbcluster::set_ndb_key(NdbOperation *ndb_op, Field *field, */ int ha_ndbcluster::set_ndb_value(NdbOperation *ndb_op, Field *field, - uint fieldnr) + uint fieldnr, bool *set_blob_value) { const byte* field_ptr= field->ptr; uint32 pack_len= field->pack_length(); @@ -444,6 +444,8 @@ int ha_ndbcluster::set_ndb_value(NdbOperation *ndb_op, Field *field, (unsigned)blob_ptr, blob_len)); DBUG_DUMP("value", (char*)blob_ptr, min(blob_len, 26)); + if (set_blob_value) + *set_blob_value= true; // No callback needed to write value DBUG_RETURN(ndb_blob->setValue(blob_ptr, blob_len) != 0); } @@ -1593,11 +1595,12 @@ int ha_ndbcluster::write_row(byte *record) } // Set non-key attribute(s) + bool set_blob_value= false; for (i= 0; i < table->fields; i++) { Field *field= table->field[i]; if (!(field->flags & PRI_KEY_FLAG) && - set_ndb_value(op, field, i)) + set_ndb_value(op, field, i, &set_blob_value)) { skip_auto_increment= true; ERR_RETURN(op->getNdbError()); @@ -1616,7 +1619,7 @@ int ha_ndbcluster::write_row(byte *record) bulk_insert_not_flushed= true; if ((rows_to_insert == 1) || ((rows_inserted % bulk_insert_rows) == 0) || - uses_blob_value(false) != 0) + set_blob_value) { THD *thd= current_thd; // Send rows to NDB |