~stewart/drizzle/embedded-innodb-create-select-transaction-arrgh

« back to all changes in this revision

Viewing changes to mysql-test/suite/parts/t/ndb_partition_error.test

  • Committer: brian
  • Date: 2008-06-25 05:29:13 UTC
  • Revision ID: brian@localhost.localdomain-20080625052913-6upwo0jsrl4lnapl
clean slate

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
-- source include/have_ndb.inc
 
2
#--disable_abort_on_error
 
3
#
 
4
# Simple test for the partition storage engine
 
5
# Focuses on range partitioning tests
 
6
 
7
#-- source include/have_partition.inc
 
8
 
 
9
--disable_warnings
 
10
drop table if exists t1;
 
11
--enable_warnings
 
12
 
 
13
#
 
14
# Partition by range, generate node group error
 
15
#
 
16
--error 1005
 
17
CREATE TABLE t1 (
 
18
a int not null,
 
19
b int not null,
 
20
c int not null,
 
21
primary key(a,b),
 
22
index (a))
 
23
engine = ndb
 
24
partition by range (a)
 
25
partitions 3
 
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);
 
29
show warnings;
 
30
 
 
31
#
 
32
# Partition by range, create normal valid table 
 
33
#
 
34
CREATE TABLE t1 (
 
35
a int not null,
 
36
b int not null,
 
37
c int not null,
 
38
primary key(a))
 
39
engine = ndb
 
40
partition by range (a)
 
41
partitions 3
 
42
(partition x1 values less than (5),
 
43
 partition x2 values less than (10),
 
44
 partition x3 values less than (20));
 
45
 
 
46
drop table t1;
 
47
 
 
48
#
 
49
# Bug #17763 mysqld cores with list partitioning if update to missing partition
 
50
#
 
51
CREATE TABLE t1 (id INT) ENGINE=NDB
 
52
  PARTITION BY LIST(id)
 
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;
 
58
DROP TABLE t1;
 
59
 
 
60
#
 
61
# NULL for LIST partition
 
62
#
 
63
create table t1 (a int,b int, c int)
 
64
engine = ndb
 
65
partition by list(a)
 
66
partitions 2
 
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);
 
71
drop table t1;