mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 03:47:17 +02:00
ha_innobase.cc Changed the error code HA_ERR_KEY_NOT_FOUND to HA_ERR_END_OF_INDEX in index_first to eliminate an error message
sql/ha_innobase.cc: Changed the error code HA_ERR_KEY_NOT_FOUND to HA_ERR_END_OF_INDEX in index_first to eliminate an error message
This commit is contained in:
parent
5744a6353c
commit
d909ccb6dc
1 changed files with 8 additions and 2 deletions
|
|
@ -1868,7 +1868,7 @@ corresponding row to buf. */
|
||||||
int
|
int
|
||||||
ha_innobase::index_first(
|
ha_innobase::index_first(
|
||||||
/*=====================*/
|
/*=====================*/
|
||||||
/* out: 0, HA_ERR_KEY_NOT_FOUND,
|
/* out: 0, HA_ERR_END_OF_FILE,
|
||||||
or error code */
|
or error code */
|
||||||
mysql_byte* buf) /* in/out: buffer for the row */
|
mysql_byte* buf) /* in/out: buffer for the row */
|
||||||
{
|
{
|
||||||
|
|
@ -1879,6 +1879,12 @@ ha_innobase::index_first(
|
||||||
|
|
||||||
error = index_read(buf, NULL, 0, HA_READ_AFTER_KEY);
|
error = index_read(buf, NULL, 0, HA_READ_AFTER_KEY);
|
||||||
|
|
||||||
|
/* MySQL does not seem to allow this to return HA_ERR_KEY_NOT_FOUND */
|
||||||
|
|
||||||
|
if (error == HA_ERR_KEY_NOT_FOUND) {
|
||||||
|
error = HA_ERR_END_OF_FILE;
|
||||||
|
}
|
||||||
|
|
||||||
DBUG_RETURN(error);
|
DBUG_RETURN(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1899,7 +1905,7 @@ ha_innobase::index_last(
|
||||||
|
|
||||||
error = index_read(buf, NULL, 0, HA_READ_BEFORE_KEY);
|
error = index_read(buf, NULL, 0, HA_READ_BEFORE_KEY);
|
||||||
|
|
||||||
/* MySQL does not seem to allow this to return HA_ERR_KEY_NOT_FOUND */
|
/* MySQL does not seem to allow this to return HA_ERR_KEY_NOT_FOUND */
|
||||||
|
|
||||||
if (error == HA_ERR_KEY_NOT_FOUND) {
|
if (error == HA_ERR_KEY_NOT_FOUND) {
|
||||||
error = HA_ERR_END_OF_FILE;
|
error = HA_ERR_END_OF_FILE;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue