1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Bug#29368: Modified error messages

Problem: there was no standard syntax error when
         creating partitions with syntax error in
         the partitioning clause.

Solution: added "Syntax error: " to the error message


mysql-test/r/partition.result:
  Bug#29368: Incorrect error for syntax error when createing
             partition
  
  test result update
mysql-test/r/partition_error.result:
  Bug#29368: Incorrect error for syntax error when createing
             partition
  
  test result
mysql-test/t/partition_error.test:
  Bug#29368: Incorrect error for syntax error when createing
             partition
  
  test case
sql/share/errmsg.txt:
  Bug#29368: Incorrect error for syntax error when createing
             partition
  
  Modified error messages
This commit is contained in:
unknown
2007-11-10 13:09:18 +01:00
parent fc800ff76d
commit 8aa1c8b9e6
4 changed files with 30 additions and 8 deletions

View File

@ -709,7 +709,7 @@ partition by range (a)
alter table t1 add partition (partition p1 values in (2));
ERROR HY000: Only LIST PARTITIONING can use VALUES IN in partition definition
alter table t1 add partition (partition p1);
ERROR HY000: RANGE PARTITIONING requires definition of VALUES LESS THAN for each partition
ERROR HY000: Syntax error: RANGE PARTITIONING requires definition of VALUES LESS THAN for each partition
drop table t1;
create table t1 (a int)
partition by list (a)
@ -717,7 +717,7 @@ partition by list (a)
alter table t1 add partition (partition p1 values less than (2));
ERROR HY000: Only RANGE PARTITIONING can use VALUES LESS THAN in partition definition
alter table t1 add partition (partition p1);
ERROR HY000: LIST PARTITIONING requires definition of VALUES IN for each partition
ERROR HY000: Syntax error: LIST PARTITIONING requires definition of VALUES IN for each partition
drop table t1;
create table t1 (a int)
partition by hash (a)

View File

@ -1,4 +1,13 @@
drop table if exists t1;
CREATE TABLE t1 (
a int
)
PARTITION BY RANGE (a)
(
PARTITION p0 VALUES LESS THAN (1),
PARTITION p1 VALU ES LESS THAN (2)
);
ERROR HY000: Syntax error: RANGE PARTITIONING requires definition of VALUES LESS THAN for each partition
partition by list (a)
partitions 3
(partition x1 values in (1,2,9,4) tablespace ts1,
@ -351,7 +360,7 @@ partition by range (a)
partitions 2
(partition x1 values less than (4),
partition x2);
ERROR HY000: RANGE PARTITIONING requires definition of VALUES LESS THAN for each partition
ERROR HY000: Syntax error: RANGE PARTITIONING requires definition of VALUES LESS THAN for each partition
CREATE TABLE t1 (
a int not null,
b int not null,
@ -531,7 +540,7 @@ partition by list (a)
partitions 2
(partition x1 values in (4),
partition x2);
ERROR HY000: LIST PARTITIONING requires definition of VALUES IN for each partition
ERROR HY000: Syntax error: LIST PARTITIONING requires definition of VALUES IN for each partition
CREATE TABLE t1 (
a int not null,
b int not null,
@ -551,7 +560,7 @@ partition by list (a)
partitions 2
(partition x1 values in (4,6),
partition x2);
ERROR HY000: LIST PARTITIONING requires definition of VALUES IN for each partition
ERROR HY000: Syntax error: LIST PARTITIONING requires definition of VALUES IN for each partition
CREATE TABLE t1 (
a int not null,
b int not null,

View File

@ -8,6 +8,19 @@
drop table if exists t1;
--enable_warnings
#
# Bug 29368:
# Incorrect error, 1467, for syntax error when creating partition
--error ER_PARTITION_REQUIRES_VALUES_ERROR
CREATE TABLE t1 (
a int
)
PARTITION BY RANGE (a)
(
PARTITION p0 VALUES LESS THAN (1),
PARTITION p1 VALU ES LESS THAN (2)
);
#
# Partition by key stand-alone error
#