Below is the list of changes that have just been committed into a local
5.1 repository of marty. When marty does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2210 06/06/20 16:22:30 mskold@stripped +3 -0
Merge mysql.com:/home/marty/MySQL/mysql-5.0
into mysql.com:/home/marty/MySQL/mysql-5.1
sql/ha_ndbcluster.h
1.140 06/06/20 16:22:24 mskold@stripped +0 -1
Merge
sql/ha_ndbcluster.cc
1.327 06/06/20 16:22:24 mskold@stripped +1 -7
Merge
mysql-test/r/ndb_replace.result
1.7 06/06/20 16:22:23 mskold@stripped +1 -1
Merge
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: mskold
# Host: linux.site
# Root: /home/marty/MySQL/mysql-5.1/RESYNC
--- 1.6/mysql-test/r/ndb_replace.result 2006-06-04 17:52:04 +02:00
+++ 1.7/mysql-test/r/ndb_replace.result 2006-06-20 16:22:23 +02:00
@@ -1,4 +1,4 @@
-drop table if exists t1;
+drop table if exists t1,t2;
CREATE TABLE t1 (
gesuchnr int(11) DEFAULT '0' NOT NULL,
benutzer_id int(11) DEFAULT '0' NOT NULL,
@@ -31,3 +31,24 @@ SELECT * from t1 ORDER BY i;
i j k
3 1 42
17 2 NULL
+CREATE TABLE t2 (a INT(11) NOT NULL,
+b INT(11) NOT NULL,
+c INT(11) NOT NULL,
+x TEXT,
+y TEXT,
+z TEXT,
+id INT(10) unsigned NOT NULL AUTO_INCREMENT,
+i INT(11) DEFAULT NULL,
+PRIMARY KEY (id),
+UNIQUE KEY a (a,b,c)
+) ENGINE=ndbcluster;
+REPLACE INTO t2 (a,b,c,x,y,z,i) VALUES (1,1,1,'a','a','a',1),(1,1,1,'b','b','b',2), (1,1,1,'c','c','c',3);
+SELECT * FROM t2 ORDER BY id;
+a b c x y z id i
+1 1 1 c c c 3 3
+REPLACE INTO t2(a,b,c,x,y,z,i) values (1,1,1,'a','a','a',1);
+REPLACE INTO t2(a,b,c,x,y,z,i) values (1,1,1,'b','b','b',2);
+SELECT * FROM t2 ORDER BY id;
+a b c x y z id i
+1 1 1 b b b 5 2
+DROP TABLE t2;
--- 1.326/sql/ha_ndbcluster.cc 2006-06-16 08:46:45 +02:00
+++ 1.327/sql/ha_ndbcluster.cc 2006-06-20 16:22:24 +02:00
@@ -732,10 +732,11 @@ int g_get_ndb_blobs_value(NdbBlob *ndb_b
DBUG_ENTER("g_get_ndb_blobs_value");
if (ndb_blob->blobsNextBlob() != NULL)
DBUG_RETURN(0);
- ha_ndbcluster *ha= (ha_ndbcluster *)arg;
+ ndb_blobs_hook_args *my_blobs_hook_args= (ndb_blobs_hook_args *) arg;
+ ha_ndbcluster *ha= (ha_ndbcluster *) my_blobs_hook_args->ha;
int ret= get_ndb_blobs_value(ha->table, ha->m_value,
ha->m_blobs_buffer, ha->m_blobs_buffer_size,
- 0);
+ my_blobs_hook_args->offset);
DBUG_RETURN(ret);
}
@@ -864,7 +865,9 @@ int ha_ndbcluster::get_ndb_value(NdbOper
if (ndb_blob != NULL)
{
// Set callback
- void *arg= (void *)this;
+ m_blobs_hook_args.ha= (void *) this;
+ m_blobs_hook_args.offset= buf - (byte*) table->record[0];
+ void *arg= (void *)&m_blobs_hook_args;
DBUG_RETURN(ndb_blob->setActiveHook(g_get_ndb_blobs_value, arg) != 0);
}
DBUG_RETURN(1);
--- 1.139/sql/ha_ndbcluster.h 2006-06-12 11:21:11 +02:00
+++ 1.140/sql/ha_ndbcluster.h 2006-06-20 16:22:24 +02:00
@@ -81,6 +81,11 @@ typedef struct ndb_index_data {
uint index_stat_query_count;
} NDB_INDEX_DATA;
+typedef struct ndb_blobs_hook_args
+{
+ void *ha;
+ my_ptrdiff_t offset;
+} NDB_BLOB_HOOK_ARGS;
typedef union { const NdbRecAttr *rec; NdbBlob *blob; void *ptr; } NdbValue;
int get_ndb_blobs_value(TABLE* table, NdbValue* value_array,
@@ -798,7 +803,7 @@ private:
int get_ndb_value(NdbOperation*, Field *field, uint fieldnr, byte*);
int get_ndb_partition_id(NdbOperation *);
friend int g_get_ndb_blobs_value(NdbBlob *ndb_blob, void *arg);
- int get_ndb_blobs_value(NdbBlob *last_ndb_blob);
+ int get_ndb_blobs_value(NdbBlob *last_ndb_blob, my_ptrdiff_t ptrdiff);
int set_primary_key(NdbOperation *op, const byte *key);
int set_primary_key_from_record(NdbOperation *op, const byte *record);
int set_index_key_from_record(NdbOperation *op, const byte *record,
@@ -883,6 +888,7 @@ private:
ha_rows m_ops_pending;
bool m_skip_auto_increment;
bool m_blobs_pending;
+ ndb_blobs_hook_args m_blobs_hook_args;
// memory for blobs in one tuple
char *m_blobs_buffer;
uint32 m_blobs_buffer_size;
| Thread |
|---|
| • bk commit into 5.1 tree (mskold:1.2210) | Martin Skold | 20 Jun |