1
-- source include/have_ndb.inc
2
#--disable_abort_on_error
4
# Simple test for the partition storage engine
5
# Focuses on range partitioning tests
7
#-- source include/have_partition.inc
10
drop table if exists t1;
14
# Partition by range, generate node group error
24
partition by range (a)
26
(partition x1 values less than (5) nodegroup 12,
27
partition x2 values less than (10) nodegroup 13,
28
partition x3 values less than (20) nodegroup 14);
32
# Partition by range, create normal valid table
40
partition by range (a)
42
(partition x1 values less than (5),
43
partition x2 values less than (10),
44
partition x3 values less than (20));
49
# Bug #17763 mysqld cores with list partitioning if update to missing partition
51
CREATE TABLE t1 (id INT) ENGINE=NDB
53
(PARTITION p0 VALUES IN (2, 4),
54
PARTITION p1 VALUES IN (42, 142));
55
INSERT INTO t1 VALUES (2);
56
--error ER_NO_PARTITION_FOR_GIVEN_VALUE
57
UPDATE t1 SET id=5 WHERE id=2;
61
# NULL for LIST partition
63
create table t1 (a int,b int, c int)
67
(partition x123 values in (11, 12),
68
partition x234 values in (5, 1));
69
--error ER_NO_PARTITION_FOR_GIVEN_VALUE
70
insert into t1 values (NULL,1,1);