Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
3903aada
Commit
3903aada
authored
Oct 21, 2009
by
Mikael Ronstrom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed test cases with regards to error codes
parent
93fca66f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
15 deletions
+11
-15
mysql-test/suite/parts/inc/partition_syntax.inc
mysql-test/suite/parts/inc/partition_syntax.inc
+2
-2
mysql-test/suite/parts/r/partition_syntax_innodb.result
mysql-test/suite/parts/r/partition_syntax_innodb.result
+2
-4
mysql-test/suite/parts/r/partition_syntax_myisam.result
mysql-test/suite/parts/r/partition_syntax_myisam.result
+2
-4
sql/partition_info.cc
sql/partition_info.cc
+1
-1
sql/sql_partition.cc
sql/sql_partition.cc
+3
-3
sql/sql_yacc.yy
sql/sql_yacc.yy
+1
-1
No files found.
mysql-test/suite/parts/inc/partition_syntax.inc
View file @
3903aada
...
...
@@ -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
)
...
...
mysql-test/suite/parts/r/partition_syntax_innodb.result
View file @
3903aada
...
...
@@ -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 (
...
...
mysql-test/suite/parts/r/partition_syntax_myisam.result
View file @
3903aada
...
...
@@ -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 (
...
...
sql/partition_info.cc
View file @
3903aada
...
...
@@ -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
;
...
...
sql/sql_partition.cc
View file @
3903aada
...
...
@@ -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_FUNC
TION_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_FUNC
TION_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
)
...
...
sql/sql_yacc.yy
View file @
3903aada
...
...
@@ -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))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment