Commit 3903aada authored by Mikael Ronstrom's avatar Mikael Ronstrom

Fixed test cases with regards to error codes

parent 93fca66f
......@@ -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
)
......
......@@ -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 (
......
......@@ -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 (
......
......@@ -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;
......
......@@ -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)
......
......@@ -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))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment