summaryrefslogtreecommitdiff
path: root/sql/ha_ndbcluster.cc
diff options
context:
space:
mode:
authorunknown <mskold@mysql.com>2006-06-21 09:50:41 +0200
committerunknown <mskold@mysql.com>2006-06-21 09:50:41 +0200
commit2b43555b5576dd844dfdad47122dec6ba7717cb8 (patch)
tree4319c88767784c4a770773ef111fb6b96e7d8e00 /sql/ha_ndbcluster.cc
parent783866ffe105c3e83a9bbc101ddd31c0d8a81d1e (diff)
parentaedbb330c8243867cbb95c6cf31096811ba5d8f3 (diff)
downloadmariadb-git-2b43555b5576dd844dfdad47122dec6ba7717cb8.tar.gz
Merge mysql.com:/home/marty/MySQL/mysql-5.0-backed
into mysql.com:/home/marty/MySQL/mysql-5.0 sql/ha_ndbcluster.cc: Auto merged
Diffstat (limited to 'sql/ha_ndbcluster.cc')
-rw-r--r--sql/ha_ndbcluster.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc
index 98dd9d5a122..46ab5b88624 100644
--- a/sql/ha_ndbcluster.cc
+++ b/sql/ha_ndbcluster.cc
@@ -771,10 +771,11 @@ int g_get_ndb_blobs_value(NdbBlob *ndb_blob, void *arg)
if (ndb_blob->blobsNextBlob() != NULL)
DBUG_RETURN(0);
ha_ndbcluster *ha= (ha_ndbcluster *)arg;
- DBUG_RETURN(ha->get_ndb_blobs_value(ndb_blob));
+ DBUG_RETURN(ha->get_ndb_blobs_value(ndb_blob, ha->m_blobs_offset));
}
-int ha_ndbcluster::get_ndb_blobs_value(NdbBlob *last_ndb_blob)
+int ha_ndbcluster::get_ndb_blobs_value(NdbBlob *last_ndb_blob,
+ my_ptrdiff_t ptrdiff)
{
DBUG_ENTER("get_ndb_blobs_value");
@@ -807,7 +808,10 @@ int ha_ndbcluster::get_ndb_blobs_value(NdbBlob *last_ndb_blob)
if (ndb_blob->readData(buf, len) != 0)
DBUG_RETURN(-1);
DBUG_ASSERT(len == blob_len);
+ // Ugly hack assumes only ptr needs to be changed
+ field_blob->ptr+= ptrdiff;
field_blob->set_ptr(len, buf);
+ field_blob->ptr-= ptrdiff;
}
offset+= blob_size;
}
@@ -870,6 +874,7 @@ int ha_ndbcluster::get_ndb_value(NdbOperation *ndb_op, Field *field,
if (ndb_blob != NULL)
{
// Set callback
+ m_blobs_offset= buf - (byte*) table->record[0];
void *arg= (void *)this;
DBUG_RETURN(ndb_blob->setActiveHook(g_get_ndb_blobs_value, arg) != 0);
}
@@ -4584,6 +4589,7 @@ ha_ndbcluster::ha_ndbcluster(TABLE *table_arg):
m_ops_pending(0),
m_skip_auto_increment(TRUE),
m_blobs_pending(0),
+ m_blobs_offset(0),
m_blobs_buffer(0),
m_blobs_buffer_size(0),
m_dupkey((uint) -1),