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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
dec0720a
Commit
dec0720a
authored
Dec 15, 2005
by
holyfoot@deer.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug #15524 (partitioning range/list violation error message is insufficient)
parent
55e7f450
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
3 deletions
+23
-3
include/my_base.h
include/my_base.h
+2
-1
mysql-test/r/partition_error.result
mysql-test/r/partition_error.result
+5
-0
mysql-test/t/partition_error.test
mysql-test/t/partition_error.test
+8
-0
sql/ha_partition.cc
sql/ha_partition.cc
+6
-2
sql/share/errmsg.txt
sql/share/errmsg.txt
+2
-0
No files found.
include/my_base.h
View file @
dec0720a
...
@@ -343,8 +343,9 @@ enum ha_base_keytype {
...
@@ -343,8 +343,9 @@ enum ha_base_keytype {
#define HA_ERR_NO_CONNECTION 157
/* Could not connect to storage engine */
#define HA_ERR_NO_CONNECTION 157
/* Could not connect to storage engine */
#define HA_ERR_NULL_IN_SPATIAL 158
/* NULLs are not supported in spatial index */
#define HA_ERR_NULL_IN_SPATIAL 158
/* NULLs are not supported in spatial index */
#define HA_ERR_TABLE_DEF_CHANGED 159
/* The table changed in storage engine */
#define HA_ERR_TABLE_DEF_CHANGED 159
/* The table changed in storage engine */
#define HA_ERR_NO_PARTITION_FOUND 160
/* There's no partition in table for given value */
#define HA_ERR_LAST 1
59
/*Copy last error nr.*/
#define HA_ERR_LAST 1
60
/*Copy last error nr.*/
/* Add error numbers before HA_ERR_LAST and change it accordingly. */
/* Add error numbers before HA_ERR_LAST and change it accordingly. */
#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)
#define HA_ERR_ERRORS (HA_ERR_LAST - HA_ERR_FIRST + 1)
...
...
mysql-test/r/partition_error.result
View file @
dec0720a
...
@@ -544,3 +544,8 @@ partitions 2
...
@@ -544,3 +544,8 @@ partitions 2
partition x2 values in (5));
partition x2 values in (5));
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '4,
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '4,
partition x2 values in (5))' at line 8
partition x2 values in (5))' at line 8
CREATE TABLE t1(a int)
PARTITION BY RANGE (a) (PARTITION p1 VALUES LESS THAN(5));
insert into t1 values (10);
ERROR HY000: Table has no partition for value 10
drop table t1;
mysql-test/t/partition_error.test
View file @
dec0720a
...
@@ -727,3 +727,11 @@ partitions 2
...
@@ -727,3 +727,11 @@ partitions 2
(
partition
x1
values
in
4
,
(
partition
x1
values
in
4
,
partition
x2
values
in
(
5
));
partition
x2
values
in
(
5
));
#
# No partition for the given value
#
CREATE
TABLE
t1
(
a
int
)
PARTITION
BY
RANGE
(
a
)
(
PARTITION
p1
VALUES
LESS
THAN
(
5
));
--
error
ER_NO_PARTITION_FOR_GIVEN_VALUE
insert
into
t1
values
(
10
);
drop
table
t1
;
sql/ha_partition.cc
View file @
dec0720a
...
@@ -1174,7 +1174,7 @@ int ha_partition::write_row(byte * buf)
...
@@ -1174,7 +1174,7 @@ int ha_partition::write_row(byte * buf)
}
}
#endif
#endif
if
(
unlikely
(
error
))
if
(
unlikely
(
error
))
DBUG_RETURN
(
error
);
DBUG_RETURN
(
HA_ERR_NO_PARTITION_FOUND
);
m_last_part
=
part_id
;
m_last_part
=
part_id
;
DBUG_PRINT
(
"info"
,
(
"Insert in partition %d"
,
part_id
));
DBUG_PRINT
(
"info"
,
(
"Insert in partition %d"
,
part_id
));
DBUG_RETURN
(
m_file
[
part_id
]
->
write_row
(
buf
));
DBUG_RETURN
(
m_file
[
part_id
]
->
write_row
(
buf
));
...
@@ -2973,7 +2973,11 @@ void ha_partition::print_error(int error, myf errflag)
...
@@ -2973,7 +2973,11 @@ void ha_partition::print_error(int error, myf errflag)
DBUG_ENTER
(
"ha_partition::print_error"
);
DBUG_ENTER
(
"ha_partition::print_error"
);
/* Should probably look for my own errors first */
/* Should probably look for my own errors first */
/* monty: needs to be called for the last used partition ! */
/* monty: needs to be called for the last used partition ! */
m_file
[
0
]
->
print_error
(
error
,
errflag
);
if
(
error
==
HA_ERR_NO_PARTITION_FOUND
)
my_error
(
ER_NO_PARTITION_FOR_GIVEN_VALUE
,
MYF
(
0
),
m_part_info
->
part_expr
->
val_int
());
else
m_file
[
0
]
->
print_error
(
error
,
errflag
);
DBUG_VOID_RETURN
;
DBUG_VOID_RETURN
;
}
}
...
...
sql/share/errmsg.txt
View file @
dec0720a
...
@@ -5725,3 +5725,5 @@ ER_PLUGIN_IS_NOT_LOADED
...
@@ -5725,3 +5725,5 @@ ER_PLUGIN_IS_NOT_LOADED
eng "Plugin '%-.64s' is not loaded"
eng "Plugin '%-.64s' is not loaded"
ER_WRONG_VALUE
ER_WRONG_VALUE
eng "Incorrect %-.32s value: '%-.128s'"
eng "Incorrect %-.32s value: '%-.128s'"
ER_NO_PARTITION_FOR_GIVEN_VALUE
eng "Table has no partition for value %d"
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