Debian Codegraph @

mysql-test/suite/ndb/r/ndb_partition_error.result

raw
1 set new=on;
2 Warnings:
3 Warning 1287 '@@new' is deprecated and will be removed in a future release.
4 CREATE TABLE t1 (
5 a int not null,
6 b int not null,
7 c int not null,
8 primary key(a,b),
9 index (a))
10 engine = ndb
11 partition by range (a)
12 partitions 3
13 (partition x1 values less than (5) nodegroup 12,
14 partition x2 values less than (10) nodegroup 13,
15 partition x3 values less than (20) nodegroup 14);
16 ERROR HY000: Can't create table 't1' (use SHOW WARNINGS for more info).
17 show warnings;
18 Level Code Message
19 Warning 1296 Got error 771 'Given NODEGROUP doesn't exist in this cluster' from NDB
20 Error 1005 Can't create table 't1' (use SHOW WARNINGS for more info).
21 CREATE TABLE t1 (
22 a int not null,
23 b int not null,
24 c int not null,
25 primary key(a))
26 engine = ndb
27 partition by range (a)
28 partitions 3
29 (partition x1 values less than (5),
30 partition x2 values less than (10),
31 partition x3 values less than (20));
32 drop table t1;
33 CREATE TABLE t1 (id INT PRIMARY KEY) ENGINE=NDB
34 PARTITION BY LIST(id)
35 (PARTITION p0 VALUES IN (2, 4),
36 PARTITION p1 VALUES IN (42, 142));
37 INSERT INTO t1 VALUES (2);
38 UPDATE t1 SET id=5 WHERE id=2;
39 ERROR HY000: Table has no partition for value 5
40 DROP TABLE t1;
41 create table t1 (a int,b int, c int, primary key(a))
42 engine = ndb
43 partition by list(a)
44 partitions 2
45 (partition x123 values in (11, 12),
46 partition x234 values in (5, 1));
47 insert into t1 values (NULL,1,1);
48 Got one of the listed errors
49 drop table t1;
50 create table `t1` (`a` int, b int, primary key (a,b)) engine=ndb partition by key(`a`,`b`,`a`);
51 ERROR HY000: Duplicate partition field name 'a'
52 #
53 # Bug#32773358 CREATE TABLE PARTITION FUNCTION CLEANUP
54 # - test LIST and RANGE partition setup during CREATE TABLE
55 #
56 CREATE TABLE t1 ( id INT PRIMARY KEY) ENGINE=NDB
57 PARTITION BY LIST(id)
58 (PARTITION p0 VALUES IN (0),
59 PARTITION p1 VALUES IN (NULL), -- Will not create partition
60 PARTITION p2 VALUES IN (2147483647),
61 PARTITION p3 VALUES IN (-2147483648));
62 INSERT INTO t1 VALUES(0);
63 INSERT INTO t1 VALUES(2147483647);
64 INSERT INTO t1 VALUES(-2147483648);
65 DROP TABLE t1;
66 CREATE TABLE t1 ( id INT PRIMARY KEY) ENGINE=NDB
67 PARTITION BY LIST(id)
68 (PARTITION p0 VALUES IN (0),
69 PARTITION p2 VALUES IN (2147483648));
70 ERROR HY000: The NDB handler only supports 32 bit integers in VALUES
71 CREATE TABLE t1 ( id INT PRIMARY KEY) ENGINE=NDB
72 PARTITION BY LIST(id)
73 (PARTITION p0 VALUES IN (0),
74 PARTITION p2 VALUES IN (-2147483649));
75 ERROR HY000: The NDB handler only supports 32 bit integers in VALUES
76 CREATE TABLE t1 ( id INT PRIMARY KEY) ENGINE=NDB
77 PARTITION BY RANGE(id)
78 (PARTITION p1 VALUES LESS THAN (-2147483648),
79 PARTITION p2 VALUES LESS THAN (0),
80 PARTITION p3 VALUES LESS THAN (256),
81 PARTITION p4 VALUES LESS THAN (2147483646),
82 PARTITION p5 VALUES LESS THAN MAXVALUE);
83 INSERT INTO t1 VALUES(-2147483648);
84 INSERT INTO t1 VALUES(0);
85 INSERT INTO t1 VALUES(256);
86 INSERT INTO t1 VALUES(2147483647);
87 DROP TABLE t1;
88 CREATE TABLE t1 ( id INT PRIMARY KEY) ENGINE=NDB
89 PARTITION BY RANGE(id)
90 (PARTITION p1 VALUES LESS THAN (-2147483649),
91 PARTITION p2 VALUES LESS THAN MAXVALUE);
92 ERROR HY000: The NDB handler only supports 32 bit integers in VALUES
93 CREATE TABLE t1 ( id INT PRIMARY KEY) ENGINE=NDB
94 PARTITION BY RANGE(id)
95 (PARTITION p1 VALUES LESS THAN (2147483647),
96 PARTITION p2 VALUES LESS THAN MAXVALUE);
97 ERROR HY000: The NDB handler only supports 32 bit integers in VALUES