summaryrefslogtreecommitdiff
path: root/sql/log_event_old.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/log_event_old.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/log_event_old.cc')
-rw-r--r--sql/log_event_old.cc29
1 files changed, 0 insertions, 29 deletions
diff --git a/sql/log_event_old.cc b/sql/log_event_old.cc
index 6154f30070f..66c4c2bef42 100644
--- a/sql/log_event_old.cc
+++ b/sql/log_event_old.cc
@@ -513,8 +513,6 @@ replace_record(THD *thd, TABLE *table,
if (unlikely(error))
{
DBUG_PRINT("info",("rnd_pos() returns error %d",error));
- if (error == HA_ERR_RECORD_DELETED)
- error= HA_ERR_KEY_NOT_FOUND;
table->file->print_error(error, MYF(0));
DBUG_RETURN(error);
}
@@ -542,8 +540,6 @@ replace_record(THD *thd, TABLE *table,
if (unlikely(error))
{
DBUG_PRINT("info", ("index_read_idx() returns error %d", error));
- if (error == HA_ERR_RECORD_DELETED)
- error= HA_ERR_KEY_NOT_FOUND;
table->file->print_error(error, MYF(0));
DBUG_RETURN(error);
}
@@ -741,9 +737,6 @@ static int find_and_fetch_row(TABLE *table, uchar *key)
while ((error= table->file->ha_index_next(table->record[1])))
{
- /* We just skip records that has already been deleted */
- if (unlikely(error == HA_ERR_RECORD_DELETED))
- continue;
table->file->print_error(error, MYF(0));
table->file->ha_index_end();
DBUG_RETURN(error);
@@ -767,7 +760,6 @@ static int find_and_fetch_row(TABLE *table, uchar *key)
/* Continue until we find the right record or have made a full loop */
do
{
- restart_rnd_next:
error= table->file->ha_rnd_next(table->record[1]);
DBUG_DUMP("record[0]", table->record[0], table->s->reclength);
@@ -777,13 +769,6 @@ static int find_and_fetch_row(TABLE *table, uchar *key)
case 0:
break;
- /*
- If the record was deleted, we pick the next one without doing
- any comparisons.
- */
- case HA_ERR_RECORD_DELETED:
- goto restart_rnd_next;
-
case HA_ERR_END_OF_FILE:
if (++restart_count < 2)
{
@@ -1995,8 +1980,6 @@ Old_rows_log_event::write_row(rpl_group_info *rgi, const bool overwrite)
if (unlikely(error))
{
DBUG_PRINT("info",("rnd_pos() returns error %d",error));
- if (error == HA_ERR_RECORD_DELETED)
- error= HA_ERR_KEY_NOT_FOUND;
table->file->print_error(error, MYF(0));
DBUG_RETURN(error);
}
@@ -2030,8 +2013,6 @@ Old_rows_log_event::write_row(rpl_group_info *rgi, const bool overwrite)
if (unlikely(error))
{
DBUG_PRINT("info",("index_read_idx() returns error %d", error));
- if (error == HA_ERR_RECORD_DELETED)
- error= HA_ERR_KEY_NOT_FOUND;
table->file->print_error(error, MYF(0));
DBUG_RETURN(error);
}
@@ -2191,8 +2172,6 @@ int Old_rows_log_event::find_row(rpl_group_info *rgi)
if (unlikely(error))
{
DBUG_PRINT("info",("rnd_pos returns error %d",error));
- if (error == HA_ERR_RECORD_DELETED)
- error= HA_ERR_KEY_NOT_FOUND;
table->file->print_error(error, MYF(0));
}
DBUG_RETURN(error);
@@ -2254,8 +2233,6 @@ int Old_rows_log_event::find_row(rpl_group_info *rgi)
HA_READ_KEY_EXACT))))
{
DBUG_PRINT("info",("no record matching the key found in the table"));
- if (error == HA_ERR_RECORD_DELETED)
- error= HA_ERR_KEY_NOT_FOUND;
table->file->print_error(error, MYF(0));
table->file->ha_index_end();
DBUG_RETURN(error);
@@ -2325,9 +2302,6 @@ int Old_rows_log_event::find_row(rpl_group_info *rgi)
{
while (unlikely(error= table->file->ha_index_next(table->record[0])))
{
- /* We just skip records that has already been deleted */
- if (error == HA_ERR_RECORD_DELETED)
- continue;
DBUG_PRINT("info",("no record matching the given row found"));
table->file->print_error(error, MYF(0));
(void) table->file->ha_index_end();
@@ -2360,9 +2334,6 @@ int Old_rows_log_event::find_row(rpl_group_info *rgi)
case 0:
break;
- case HA_ERR_RECORD_DELETED:
- goto restart_rnd_next;
-
case HA_ERR_END_OF_FILE:
if (++restart_count < 2)
{