List:Commits« Previous MessageNext Message »
From:tomas Date:February 28 2006 11:29am
Subject:bk commit into 5.1 tree (tomas:1.2188) BUG#16385
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas 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.2188 06/02/28 12:28:52 tomas@stripped +3 -0
  Bug#16385, Partitions: crash when updating a range partitioned NDB table
  - too little space was allocated for receiving events, partition uses extra column in table

  sql/ha_ndbcluster_binlog.cc
    1.26 06/02/28 12:28:46 tomas@stripped +4 -4
    Bug#16385, Partitions: crash when updating a range partitioned NDB table
    - too little space was allocated for receiving events, partition uses extra column in table

  mysql-test/t/ndb_partition_range.test
    1.5 06/02/28 12:28:46 tomas@stripped +26 -0
    Bug#16385, Partitions: crash when updating a range partitioned NDB table

  mysql-test/r/ndb_partition_range.result
    1.8 06/02/28 12:28:46 tomas@stripped +23 -0
    Bug#16385, Partitions: crash when updating a range partitioned NDB table

# 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:	tomas
# Host:	poseidon.ndb.mysql.com
# Root:	/home/tomas/mysql-5.1-new

--- 1.7/mysql-test/r/ndb_partition_range.result	2006-02-27 17:24:00 +01:00
+++ 1.8/mysql-test/r/ndb_partition_range.result	2006-02-28 12:28:46 +01:00
@@ -198,3 +198,26 @@
 ENGINE=NDB;
 DROP TABLESPACE ts1 ENGINE=NDB;
 DROP LOGFILE GROUP lg1 ENGINE=NDB;
+CREATE TABLE t1
+(id MEDIUMINT NOT NULL,
+b1 BIT(8),
+vc VARCHAR(255),
+bc CHAR(255),
+d DECIMAL(10,4) DEFAULT 0,
+f FLOAT DEFAULT 0,
+total BIGINT UNSIGNED,
+y YEAR,
+t DATE) ENGINE=NDB
+PARTITION BY LIST(id)
+(PARTITION p0 VALUES IN (2, 4),
+PARTITION p1 VALUES IN (42, 142));
+INSERT INTO t1 VALUES (2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+SELECT * FROM t1;
+id	b1	vc	bc	d	f	total	y	t
+2	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
+ALTER TABLE t1 ADD PARTITION
+(PARTITION p2 VALUES IN (412));
+SELECT * FROM t1;
+id	b1	vc	bc	d	f	total	y	t
+2	NULL	NULL	NULL	NULL	NULL	NULL	NULL	NULL
+DROP TABLE t1;

--- 1.4/mysql-test/t/ndb_partition_range.test	2006-02-27 17:04:41 +01:00
+++ 1.5/mysql-test/t/ndb_partition_range.test	2006-02-28 12:28:46 +01:00
@@ -197,3 +197,29 @@
   ENGINE=NDB;
 DROP TABLESPACE ts1 ENGINE=NDB;
 DROP LOGFILE GROUP lg1 ENGINE=NDB;
+
+
+#
+# Bug #17701 ALTER TABLE t1 ADD PARTITION for PARTITION BY LIST hangs test
+#
+
+CREATE TABLE t1
+    (id MEDIUMINT NOT NULL,
+     b1 BIT(8),
+     vc VARCHAR(255),
+     bc CHAR(255),
+     d DECIMAL(10,4) DEFAULT 0,
+     f FLOAT DEFAULT 0,
+     total BIGINT UNSIGNED,
+     y YEAR,
+     t DATE) ENGINE=NDB
+  PARTITION BY LIST(id)
+    (PARTITION p0 VALUES IN (2, 4),
+     PARTITION p1 VALUES IN (42, 142));
+
+INSERT INTO t1 VALUES (2,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+SELECT * FROM t1;
+ALTER TABLE t1 ADD PARTITION
+    (PARTITION p2 VALUES IN (412));
+SELECT * FROM t1;
+DROP TABLE t1;

--- 1.25/sql/ha_ndbcluster_binlog.cc	2006-02-26 15:03:40 +01:00
+++ 1.26/sql/ha_ndbcluster_binlog.cc	2006-02-28 12:28:46 +01:00
@@ -284,11 +284,11 @@
     it may be in use by the injector thread
   */
   share->ndb_value[0]= (NdbValue*)
-    alloc_root(mem_root, sizeof(NdbValue) * table->s->fields
-               + 1 /*extra for hidden key*/);
+    alloc_root(mem_root, sizeof(NdbValue) *
+               (table->s->fields + 2 /*extra for hidden key and part key*/));
   share->ndb_value[1]= (NdbValue*)
-    alloc_root(mem_root, sizeof(NdbValue) * table->s->fields
-               +1 /*extra for hidden key*/);
+    alloc_root(mem_root, sizeof(NdbValue) *
+               (table->s->fields + 2 /*extra for hidden key and part key*/));
 
   DBUG_RETURN(0);
 }
Thread
bk commit into 5.1 tree (tomas:1.2188) BUG#16385tomas28 Feb