summaryrefslogtreecommitdiff
path: root/sql/ha_innobase.cc
diff options
context:
space:
mode:
authorunknown <heikki@donna.mysql.fi>2001-04-25 14:44:35 +0300
committerunknown <heikki@donna.mysql.fi>2001-04-25 14:44:35 +0300
commitd909ccb6dc7805616e299cc2014af50e0540fd53 (patch)
treec44920b031fcb917f4b3583b4176aef034a73bf0 /sql/ha_innobase.cc
parent5744a6353cde4ec85055ed6b451b1e4ea8e9b1a8 (diff)
downloadmariadb-git-d909ccb6dc7805616e299cc2014af50e0540fd53.tar.gz
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
Diffstat (limited to 'sql/ha_innobase.cc')
-rw-r--r--sql/ha_innobase.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/ha_innobase.cc b/sql/ha_innobase.cc
index f263f693103..72857fc953f 100644
--- a/sql/ha_innobase.cc
+++ b/sql/ha_innobase.cc
@@ -1868,7 +1868,7 @@ corresponding row to buf. */
int
ha_innobase::index_first(
/*=====================*/
- /* out: 0, HA_ERR_KEY_NOT_FOUND,
+ /* out: 0, HA_ERR_END_OF_FILE,
or error code */
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);
+ /* 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);
}
@@ -1899,7 +1905,7 @@ ha_innobase::index_last(
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) {
error = HA_ERR_END_OF_FILE;