diff options
author | Mikael Ronstrom <mikael@mysql.com> | 2009-10-21 18:27:34 +0200 |
---|---|---|
committer | Mikael Ronstrom <mikael@mysql.com> | 2009-10-21 18:27:34 +0200 |
commit | 3903aada9bfc0b03156d3810b802807b4075ecb7 (patch) | |
tree | a65e2ecad68caed3953464e66a6cde039aa01214 | |
parent | 93fca66f85475508b82ff86614c3262d74baae8b (diff) | |
download | mariadb-git-3903aada9bfc0b03156d3810b802807b4075ecb7.tar.gz |
Fixed test cases with regards to error codes
-rw-r--r-- | mysql-test/suite/parts/inc/partition_syntax.inc | 4 | ||||
-rw-r--r-- | mysql-test/suite/parts/r/partition_syntax_innodb.result | 6 | ||||
-rw-r--r-- | mysql-test/suite/parts/r/partition_syntax_myisam.result | 6 | ||||
-rw-r--r-- | sql/partition_info.cc | 2 | ||||
-rw-r--r-- | sql/sql_partition.cc | 6 | ||||
-rw-r--r-- | sql/sql_yacc.yy | 2 |
6 files changed, 11 insertions, 15 deletions
diff --git a/mysql-test/suite/parts/inc/partition_syntax.inc b/mysql-test/suite/parts/inc/partition_syntax.inc index e72aad80f0a..e7eea73325a 100644 --- a/mysql-test/suite/parts/inc/partition_syntax.inc +++ b/mysql-test/suite/parts/inc/partition_syntax.inc @@ -312,7 +312,7 @@ PARTITION BY RANGE(f_int1) --echo #------------------------------------------------------------------------ --echo # 3.5.1 NULL in RANGE partitioning clause --echo # 3.5.1.1 VALUE LESS THAN (NULL) is not allowed ---error ER_PARSE_ERROR +--error ER_NULL_IN_VALUES_LESS_THAN eval CREATE TABLE t1 ( $column_list ) @@ -320,7 +320,7 @@ PARTITION BY RANGE(f_int1) ( PARTITION part1 VALUES LESS THAN (NULL), PARTITION part2 VALUES LESS THAN (1000)); --echo # 3.5.1.2 VALUE LESS THAN (NULL) is not allowed ---error ER_PARSE_ERROR +--error ER_NULL_IN_VALUES_LESS_THAN eval CREATE TABLE t1 ( $column_list ) diff --git a/mysql-test/suite/parts/r/partition_syntax_innodb.result b/mysql-test/suite/parts/r/partition_syntax_innodb.result index c27a1386409..848a30a13df 100644 --- a/mysql-test/suite/parts/r/partition_syntax_innodb.result +++ b/mysql-test/suite/parts/r/partition_syntax_innodb.result @@ -610,8 +610,7 @@ f_charbig VARCHAR(1000) PARTITION BY RANGE(f_int1) ( PARTITION part1 VALUES LESS THAN (NULL), PARTITION part2 VALUES LESS THAN (1000)); -ERROR 42000: Not allowed to use NULL value in VALUES LESS THAN near '), -PARTITION part2 VALUES LESS THAN (1000))' at line 9 +ERROR HY000: Not allowed to use NULL value in VALUES LESS THAN # 3.5.1.2 VALUE LESS THAN (NULL) is not allowed CREATE TABLE t1 ( f_int1 INTEGER, @@ -623,8 +622,7 @@ f_charbig VARCHAR(1000) PARTITION BY RANGE(f_int1) ( PARTITION part1 VALUES LESS THAN (NULL), PARTITION part2 VALUES LESS THAN (1000)); -ERROR 42000: Not allowed to use NULL value in VALUES LESS THAN near '), -PARTITION part2 VALUES LESS THAN (1000))' at line 9 +ERROR HY000: Not allowed to use NULL value in VALUES LESS THAN # 3.5.2 NULL in LIST partitioning clause # 3.5.2.1 VALUE IN (NULL) CREATE TABLE t1 ( diff --git a/mysql-test/suite/parts/r/partition_syntax_myisam.result b/mysql-test/suite/parts/r/partition_syntax_myisam.result index 0cf98765797..f3b7f5b3025 100644 --- a/mysql-test/suite/parts/r/partition_syntax_myisam.result +++ b/mysql-test/suite/parts/r/partition_syntax_myisam.result @@ -610,8 +610,7 @@ f_charbig VARCHAR(1000) PARTITION BY RANGE(f_int1) ( PARTITION part1 VALUES LESS THAN (NULL), PARTITION part2 VALUES LESS THAN (1000)); -ERROR 42000: Not allowed to use NULL value in VALUES LESS THAN near '), -PARTITION part2 VALUES LESS THAN (1000))' at line 9 +ERROR HY000: Not allowed to use NULL value in VALUES LESS THAN # 3.5.1.2 VALUE LESS THAN (NULL) is not allowed CREATE TABLE t1 ( f_int1 INTEGER, @@ -623,8 +622,7 @@ f_charbig VARCHAR(1000) PARTITION BY RANGE(f_int1) ( PARTITION part1 VALUES LESS THAN (NULL), PARTITION part2 VALUES LESS THAN (1000)); -ERROR 42000: Not allowed to use NULL value in VALUES LESS THAN near '), -PARTITION part2 VALUES LESS THAN (1000))' at line 9 +ERROR HY000: Not allowed to use NULL value in VALUES LESS THAN # 3.5.2 NULL in LIST partitioning clause # 3.5.2.1 VALUE IN (NULL) CREATE TABLE t1 ( diff --git a/sql/partition_info.cc b/sql/partition_info.cc index dca026bd2d7..52535041776 100644 --- a/sql/partition_info.cc +++ b/sql/partition_info.cc @@ -1679,7 +1679,7 @@ bool partition_info::add_column_list_value(THD *thd, Item *item) { context->table_list= save_list; thd->where= save_where; - my_error(ER_NO_CONST_EXPR_IN_RANGE_OR_LIST_ERROR, MYF(0)); + my_error(ER_PARTITION_FUNCTION_IS_NOT_ALLOWED, MYF(0)); DBUG_RETURN(TRUE); } thd->where= save_where; diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc index 8fc32ebde80..ab342c0a6fb 100644 --- a/sql/sql_partition.cc +++ b/sql/sql_partition.cc @@ -1638,7 +1638,7 @@ bool fix_partition_func(THD *thd, TABLE *table, goto end; if (unlikely(part_info->subpart_expr->result_type() != INT_RESULT)) { - my_error(ER_PARTITION_FUNC_NOT_ALLOWED_ERROR, MYF(0), + my_error(ER_PARTITION_FUNCTION_IS_NOT_ALLOWED, MYF(0), subpart_str); goto end; } @@ -1666,7 +1666,7 @@ bool fix_partition_func(THD *thd, TABLE *table, goto end; if (unlikely(part_info->part_expr->result_type() != INT_RESULT)) { - my_error(ER_PARTITION_FUNC_NOT_ALLOWED_ERROR, MYF(0), part_str); + my_error(ER_PARTITION_FUNCTION_IS_NOT_ALLOWED, MYF(0), part_str); goto end; } part_info->part_result_type= INT_RESULT; @@ -2014,7 +2014,7 @@ static int add_column_list_values(File fptr, partition_info *part_info, String *res= item_expr->val_str(&str); if (!res) { - my_error(ER_NO_CONST_EXPR_IN_RANGE_OR_LIST_ERROR, MYF(0)); + my_error(ER_PARTITION_FUNCTION_IS_NOT_ALLOWED, MYF(0)); return 1; } if (item_expr->result_type() == STRING_RESULT) diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index 51b81f5b2af..c2873bffe9e 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -4245,7 +4245,7 @@ part_value_expr_item: if (!lex->safe_to_cache_query) { - my_error(ER_NO_CONST_EXPR_IN_RANGE_OR_LIST_ERROR, MYF(0)); + my_error(ER_PARTITION_FUNCTION_IS_NOT_ALLOWED, MYF(0)); MYSQL_YYABORT; } if (part_info->add_column_list_value(YYTHD, part_expr)) |