mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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/r/ndb_partition_range.result: Bug#16385, Partitions: crash when updating a range partitioned NDB table mysql-test/t/ndb_partition_range.test: Bug#16385, Partitions: crash when updating a range partitioned NDB table
This commit is contained in:
@ -198,3 +198,26 @@ DROP DATAFILE 'datafile.dat'
|
|||||||
ENGINE=NDB;
|
ENGINE=NDB;
|
||||||
DROP TABLESPACE ts1 ENGINE=NDB;
|
DROP TABLESPACE ts1 ENGINE=NDB;
|
||||||
DROP LOGFILE GROUP lg1 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;
|
||||||
|
@ -197,3 +197,29 @@ ALTER TABLESPACE ts1
|
|||||||
ENGINE=NDB;
|
ENGINE=NDB;
|
||||||
DROP TABLESPACE ts1 ENGINE=NDB;
|
DROP TABLESPACE ts1 ENGINE=NDB;
|
||||||
DROP LOGFILE GROUP lg1 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;
|
||||||
|
@ -284,11 +284,11 @@ ndbcluster_binlog_open_table(THD *thd, NDB_SHARE *share,
|
|||||||
it may be in use by the injector thread
|
it may be in use by the injector thread
|
||||||
*/
|
*/
|
||||||
share->ndb_value[0]= (NdbValue*)
|
share->ndb_value[0]= (NdbValue*)
|
||||||
alloc_root(mem_root, sizeof(NdbValue) * table->s->fields
|
alloc_root(mem_root, sizeof(NdbValue) *
|
||||||
+ 1 /*extra for hidden key*/);
|
(table->s->fields + 2 /*extra for hidden key and part key*/));
|
||||||
share->ndb_value[1]= (NdbValue*)
|
share->ndb_value[1]= (NdbValue*)
|
||||||
alloc_root(mem_root, sizeof(NdbValue) * table->s->fields
|
alloc_root(mem_root, sizeof(NdbValue) *
|
||||||
+1 /*extra for hidden key*/);
|
(table->s->fields + 2 /*extra for hidden key and part key*/));
|
||||||
|
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user