summaryrefslogtreecommitdiff
path: root/sql/records.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-04-14 00:09:11 +0200
committerSergei Golubchik <serg@mariadb.org>2018-05-12 10:16:45 +0200
commit0f956a0676849bdd9c98bc45867b1965909f24f3 (patch)
tree6bd2e8bc586918c2344973a5b4a961552c140259 /sql/records.cc
parent5441bbd3b1f9e4d0232f8df83a79c51638e51a58 (diff)
downloadmariadb-git-0f956a0676849bdd9c98bc45867b1965909f24f3.tar.gz
cleanup: hide HA_ERR_RECORD_DELETED in ha_rnd_next()
it's internal storage engine error, don't let it leak into the upper layer.
Diffstat (limited to 'sql/records.cc')
-rw-r--r--sql/records.cc25
1 files changed, 6 insertions, 19 deletions
diff --git a/sql/records.cc b/sql/records.cc
index 244d3b4d962..59601ae99f3 100644
--- a/sql/records.cc
+++ b/sql/records.cc
@@ -217,7 +217,6 @@ bool init_read_record(READ_RECORD *info,THD *thd, TABLE *table,
info->select=select;
info->print_error=print_error;
info->unlock_row= rr_unlock_row;
- info->ignore_not_found_rows= 0;
table->status= 0; /* Rows are always found */
tempfile= 0;
@@ -365,11 +364,8 @@ static int rr_quick(READ_RECORD *info)
int tmp;
while ((tmp= info->select->quick->get_next()))
{
- if (info->thd->killed || (tmp != HA_ERR_RECORD_DELETED))
- {
- tmp= rr_handle_error(info, tmp);
- break;
- }
+ tmp= rr_handle_error(info, tmp);
+ break;
}
return tmp;
}
@@ -484,15 +480,8 @@ int rr_sequential(READ_RECORD *info)
int tmp;
while ((tmp= info->table->file->ha_rnd_next(info->record)))
{
- /*
- rnd_next can return RECORD_DELETED for MyISAM when one thread is
- reading and another deleting without locks.
- */
- if (info->thd->killed || (tmp != HA_ERR_RECORD_DELETED))
- {
- tmp= rr_handle_error(info, tmp);
- break;
- }
+ tmp= rr_handle_error(info, tmp);
+ break;
}
return tmp;
}
@@ -508,8 +497,7 @@ static int rr_from_tempfile(READ_RECORD *info)
if (!(tmp= info->table->file->ha_rnd_pos(info->record,info->ref_pos)))
break;
/* The following is extremely unlikely to happen */
- if (tmp == HA_ERR_RECORD_DELETED ||
- (tmp == HA_ERR_KEY_NOT_FOUND && info->ignore_not_found_rows))
+ if (tmp == HA_ERR_KEY_NOT_FOUND)
continue;
tmp= rr_handle_error(info, tmp);
break;
@@ -560,8 +548,7 @@ int rr_from_pointers(READ_RECORD *info)
break;
/* The following is extremely unlikely to happen */
- if (tmp == HA_ERR_RECORD_DELETED ||
- (tmp == HA_ERR_KEY_NOT_FOUND && info->ignore_not_found_rows))
+ if (tmp == HA_ERR_KEY_NOT_FOUND)
continue;
tmp= rr_handle_error(info, tmp);
break;