List:Commits« Previous MessageNext Message »
From:mattiasj Date:October 22 2007 2:54pm
Subject:bk commit into 5.1 tree (mattiasj:1.2595) BUG#29368
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of mattiasj. When mattiasj does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-10-22 14:54:07+02:00, mattiasj@mattiasj-laptop.(none) +4 -0
  Bug#29368: Modified error messages
  New test cases

  mysql-test/r/partition_error.result@stripped, 2007-10-22 14:54:02+02:00,
mattiasj@mattiasj-laptop.(none) +12 -3
    test result

  mysql-test/t/partition_error.test@stripped, 2007-10-22 14:54:02+02:00,
mattiasj@mattiasj-laptop.(none) +13 -0
    test case

  sql/share/errmsg.txt@stripped, 2007-10-22 14:54:03+02:00, mattiasj@mattiasj-laptop.(none)
+3 -3
    Modified error messages

  sql/sql_yacc.yy@stripped, 2007-10-22 14:54:03+02:00, mattiasj@mattiasj-laptop.(none) +4 -2
    additional error description

diff -Nrup a/mysql-test/r/partition_error.result b/mysql-test/r/partition_error.result
--- a/mysql-test/r/partition_error.result	2007-06-13 17:28:57 +02:00
+++ b/mysql-test/r/partition_error.result	2007-10-22 14:54:02 +02:00
@@ -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 = p1
 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, partition = x2
 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, partition = x2
 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, partition = x2
 CREATE TABLE t1 (
 a int not null,
 b int not null,
diff -Nrup a/mysql-test/t/partition_error.test b/mysql-test/t/partition_error.test
--- a/mysql-test/t/partition_error.test	2007-06-13 17:28:57 +02:00
+++ b/mysql-test/t/partition_error.test	2007-10-22 14:54:02 +02:00
@@ -9,6 +9,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
 #
 --error 1064
diff -Nrup a/sql/share/errmsg.txt b/sql/share/errmsg.txt
--- a/sql/share/errmsg.txt	2007-10-17 10:13:54 +02:00
+++ b/sql/share/errmsg.txt	2007-10-22 14:54:03 +02:00
@@ -5667,9 +5667,9 @@ ER_ILLEGAL_HA_CREATE_OPTION
         eng "Table storage engine '%-.64s' does not support the create option '%.64s'"
         ger "Speicher-Engine '%-.64s' der Tabelle unterstützt die Option '%.64s' nicht"
 ER_PARTITION_REQUIRES_VALUES_ERROR
-        eng "%-.64s PARTITIONING requires definition of VALUES %-.64s for each partition"
-        ger "%-.64s-PARTITIONierung erfordert Definition von VALUES %-.64s für jede
Partition"
-        swe "%-.64s PARTITIONering kräver definition av VALUES %-.64s för varje
partition"
+        eng "Syntax error: %-.64s PARTITIONING requires definition of VALUES %-.64s for
each partition, partition = %-.64s"
+        ger "Fehler in der SQL-Syntax: %-.64s-PARTITIONierung erfordert Definition von
VALUES %-.64s für jede Partition, partition = %-.64s"
+        swe "Syntaxfel: %-.64s PARTITIONering kräver definition av VALUES %-.64s för
varje partition, partition = %-.64s"
 ER_PARTITION_WRONG_VALUES_ERROR
         eng "Only %-.64s PARTITIONING can use VALUES %-.64s in partition definition"
         ger "Nur %-.64s-PARTITIONierung kann VALUES %-.64s in der Partitionsdefinition
verwenden"
diff -Nrup a/sql/sql_yacc.yy b/sql/sql_yacc.yy
--- a/sql/sql_yacc.yy	2007-10-17 04:47:04 +02:00
+++ b/sql/sql_yacc.yy	2007-10-22 14:54:03 +02:00
@@ -3825,13 +3825,15 @@ opt_part_values:
               if (lex->part_info->part_type == RANGE_PARTITION)
               {
                 my_error(ER_PARTITION_REQUIRES_VALUES_ERROR, MYF(0),
-                         "RANGE", "LESS THAN");
+                         "RANGE", "LESS THAN",
+                         lex->part_info->curr_part_elem->partition_name);
                 MYSQL_YYABORT;
               }
               if (lex->part_info->part_type == LIST_PARTITION)
               {
                 my_error(ER_PARTITION_REQUIRES_VALUES_ERROR, MYF(0),
-                         "LIST", "IN");
+                         "LIST", "IN",
+                         lex->part_info->curr_part_elem->partition_name);
                 MYSQL_YYABORT;
               }
             }
Thread
bk commit into 5.1 tree (mattiasj:1.2595) BUG#29368mattiasj22 Oct