mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 10:14:19 +01:00
Fixed test cases with regards to error codes
This commit is contained in:
parent
93fca66f85
commit
3903aada9b
6 changed files with 11 additions and 15 deletions
|
@ -312,7 +312,7 @@ PARTITION BY RANGE(f_int1)
|
||||||
--echo #------------------------------------------------------------------------
|
--echo #------------------------------------------------------------------------
|
||||||
--echo # 3.5.1 NULL in RANGE partitioning clause
|
--echo # 3.5.1 NULL in RANGE partitioning clause
|
||||||
--echo # 3.5.1.1 VALUE LESS THAN (NULL) is not allowed
|
--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 (
|
eval CREATE TABLE t1 (
|
||||||
$column_list
|
$column_list
|
||||||
)
|
)
|
||||||
|
@ -320,7 +320,7 @@ PARTITION BY RANGE(f_int1)
|
||||||
( PARTITION part1 VALUES LESS THAN (NULL),
|
( PARTITION part1 VALUES LESS THAN (NULL),
|
||||||
PARTITION part2 VALUES LESS THAN (1000));
|
PARTITION part2 VALUES LESS THAN (1000));
|
||||||
--echo # 3.5.1.2 VALUE LESS THAN (NULL) is not allowed
|
--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 (
|
eval CREATE TABLE t1 (
|
||||||
$column_list
|
$column_list
|
||||||
)
|
)
|
||||||
|
|
|
@ -610,8 +610,7 @@ f_charbig VARCHAR(1000)
|
||||||
PARTITION BY RANGE(f_int1)
|
PARTITION BY RANGE(f_int1)
|
||||||
( PARTITION part1 VALUES LESS THAN (NULL),
|
( PARTITION part1 VALUES LESS THAN (NULL),
|
||||||
PARTITION part2 VALUES LESS THAN (1000));
|
PARTITION part2 VALUES LESS THAN (1000));
|
||||||
ERROR 42000: Not allowed to use NULL value in VALUES LESS THAN near '),
|
ERROR HY000: Not allowed to use NULL value in VALUES LESS THAN
|
||||||
PARTITION part2 VALUES LESS THAN (1000))' at line 9
|
|
||||||
# 3.5.1.2 VALUE LESS THAN (NULL) is not allowed
|
# 3.5.1.2 VALUE LESS THAN (NULL) is not allowed
|
||||||
CREATE TABLE t1 (
|
CREATE TABLE t1 (
|
||||||
f_int1 INTEGER,
|
f_int1 INTEGER,
|
||||||
|
@ -623,8 +622,7 @@ f_charbig VARCHAR(1000)
|
||||||
PARTITION BY RANGE(f_int1)
|
PARTITION BY RANGE(f_int1)
|
||||||
( PARTITION part1 VALUES LESS THAN (NULL),
|
( PARTITION part1 VALUES LESS THAN (NULL),
|
||||||
PARTITION part2 VALUES LESS THAN (1000));
|
PARTITION part2 VALUES LESS THAN (1000));
|
||||||
ERROR 42000: Not allowed to use NULL value in VALUES LESS THAN near '),
|
ERROR HY000: Not allowed to use NULL value in VALUES LESS THAN
|
||||||
PARTITION part2 VALUES LESS THAN (1000))' at line 9
|
|
||||||
# 3.5.2 NULL in LIST partitioning clause
|
# 3.5.2 NULL in LIST partitioning clause
|
||||||
# 3.5.2.1 VALUE IN (NULL)
|
# 3.5.2.1 VALUE IN (NULL)
|
||||||
CREATE TABLE t1 (
|
CREATE TABLE t1 (
|
||||||
|
|
|
@ -610,8 +610,7 @@ f_charbig VARCHAR(1000)
|
||||||
PARTITION BY RANGE(f_int1)
|
PARTITION BY RANGE(f_int1)
|
||||||
( PARTITION part1 VALUES LESS THAN (NULL),
|
( PARTITION part1 VALUES LESS THAN (NULL),
|
||||||
PARTITION part2 VALUES LESS THAN (1000));
|
PARTITION part2 VALUES LESS THAN (1000));
|
||||||
ERROR 42000: Not allowed to use NULL value in VALUES LESS THAN near '),
|
ERROR HY000: Not allowed to use NULL value in VALUES LESS THAN
|
||||||
PARTITION part2 VALUES LESS THAN (1000))' at line 9
|
|
||||||
# 3.5.1.2 VALUE LESS THAN (NULL) is not allowed
|
# 3.5.1.2 VALUE LESS THAN (NULL) is not allowed
|
||||||
CREATE TABLE t1 (
|
CREATE TABLE t1 (
|
||||||
f_int1 INTEGER,
|
f_int1 INTEGER,
|
||||||
|
@ -623,8 +622,7 @@ f_charbig VARCHAR(1000)
|
||||||
PARTITION BY RANGE(f_int1)
|
PARTITION BY RANGE(f_int1)
|
||||||
( PARTITION part1 VALUES LESS THAN (NULL),
|
( PARTITION part1 VALUES LESS THAN (NULL),
|
||||||
PARTITION part2 VALUES LESS THAN (1000));
|
PARTITION part2 VALUES LESS THAN (1000));
|
||||||
ERROR 42000: Not allowed to use NULL value in VALUES LESS THAN near '),
|
ERROR HY000: Not allowed to use NULL value in VALUES LESS THAN
|
||||||
PARTITION part2 VALUES LESS THAN (1000))' at line 9
|
|
||||||
# 3.5.2 NULL in LIST partitioning clause
|
# 3.5.2 NULL in LIST partitioning clause
|
||||||
# 3.5.2.1 VALUE IN (NULL)
|
# 3.5.2.1 VALUE IN (NULL)
|
||||||
CREATE TABLE t1 (
|
CREATE TABLE t1 (
|
||||||
|
|
|
@ -1679,7 +1679,7 @@ bool partition_info::add_column_list_value(THD *thd, Item *item)
|
||||||
{
|
{
|
||||||
context->table_list= save_list;
|
context->table_list= save_list;
|
||||||
thd->where= save_where;
|
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);
|
DBUG_RETURN(TRUE);
|
||||||
}
|
}
|
||||||
thd->where= save_where;
|
thd->where= save_where;
|
||||||
|
|
|
@ -1638,7 +1638,7 @@ bool fix_partition_func(THD *thd, TABLE *table,
|
||||||
goto end;
|
goto end;
|
||||||
if (unlikely(part_info->subpart_expr->result_type() != INT_RESULT))
|
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);
|
subpart_str);
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
@ -1666,7 +1666,7 @@ bool fix_partition_func(THD *thd, TABLE *table,
|
||||||
goto end;
|
goto end;
|
||||||
if (unlikely(part_info->part_expr->result_type() != INT_RESULT))
|
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;
|
goto end;
|
||||||
}
|
}
|
||||||
part_info->part_result_type= INT_RESULT;
|
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);
|
String *res= item_expr->val_str(&str);
|
||||||
if (!res)
|
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;
|
return 1;
|
||||||
}
|
}
|
||||||
if (item_expr->result_type() == STRING_RESULT)
|
if (item_expr->result_type() == STRING_RESULT)
|
||||||
|
|
|
@ -4245,7 +4245,7 @@ part_value_expr_item:
|
||||||
|
|
||||||
if (!lex->safe_to_cache_query)
|
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;
|
MYSQL_YYABORT;
|
||||||
}
|
}
|
||||||
if (part_info->add_column_list_value(YYTHD, part_expr))
|
if (part_info->add_column_list_value(YYTHD, part_expr))
|
||||||
|
|
Loading…
Add table
Reference in a new issue