fix HA_ERR_RECORD_DELETED for falcon

parent c4f34104
...@@ -340,7 +340,7 @@ enum ha_base_keytype { ...@@ -340,7 +340,7 @@ enum ha_base_keytype {
#define HA_ERR_WRONG_COMMAND 131 /* Command not supported */ #define HA_ERR_WRONG_COMMAND 131 /* Command not supported */
#define HA_ERR_OLD_FILE 132 /* old databasfile */ #define HA_ERR_OLD_FILE 132 /* old databasfile */
#define HA_ERR_NO_ACTIVE_RECORD 133 /* No record read in update() */ #define HA_ERR_NO_ACTIVE_RECORD 133 /* No record read in update() */
#define HA_ERR_RECORD_DELETED 134 /* Intern error-code */ #define HA_ERR_RECORD_DELETED 134 /* A record is not there */
#define HA_ERR_RECORD_FILE_FULL 135 /* No more room in file */ #define HA_ERR_RECORD_FILE_FULL 135 /* No more room in file */
#define HA_ERR_INDEX_FILE_FULL 136 /* No more room in file */ #define HA_ERR_INDEX_FILE_FULL 136 /* No more room in file */
#define HA_ERR_END_OF_FILE 137 /* end in next/prev/first/last */ #define HA_ERR_END_OF_FILE 137 /* end in next/prev/first/last */
......
...@@ -4306,7 +4306,8 @@ TRP_ROR_INTERSECT *get_best_covering_ror_intersect(PARAM *param, ...@@ -4306,7 +4306,8 @@ TRP_ROR_INTERSECT *get_best_covering_ror_intersect(PARAM *param,
DBUG_EXECUTE("info", print_ror_scans_arr(param->table, DBUG_EXECUTE("info", print_ror_scans_arr(param->table,
"building covering ROR-I", "building covering ROR-I",
ror_scan_mark, ror_scans_end);); ror_scan_mark, ror_scans_end););
do { do
{
/* /*
Update changed sorting info: Update changed sorting info:
#covered fields, #covered fields,
...@@ -7387,11 +7388,14 @@ int QUICK_ROR_INTERSECT_SELECT::get_next() ...@@ -7387,11 +7388,14 @@ int QUICK_ROR_INTERSECT_SELECT::get_next()
uint last_rowid_count=0; uint last_rowid_count=0;
DBUG_ENTER("QUICK_ROR_INTERSECT_SELECT::get_next"); DBUG_ENTER("QUICK_ROR_INTERSECT_SELECT::get_next");
do
{
/* Get a rowid for first quick and save it as a 'candidate' */ /* Get a rowid for first quick and save it as a 'candidate' */
quick= quick_it++; quick= quick_it++;
if (cpk_quick) if (cpk_quick)
{ {
do { do
{
error= quick->get_next(); error= quick->get_next();
}while (!error && !cpk_quick->row_in_ranges()); }while (!error && !cpk_quick->row_in_ranges());
} }
...@@ -7413,7 +7417,8 @@ int QUICK_ROR_INTERSECT_SELECT::get_next() ...@@ -7413,7 +7417,8 @@ int QUICK_ROR_INTERSECT_SELECT::get_next()
quick= quick_it++; quick= quick_it++;
} }
do { do
{
if ((error= quick->get_next())) if ((error= quick->get_next()))
DBUG_RETURN(error); DBUG_RETURN(error);
quick->file->position(quick->record); quick->file->position(quick->record);
...@@ -7445,6 +7450,7 @@ int QUICK_ROR_INTERSECT_SELECT::get_next() ...@@ -7445,6 +7450,7 @@ int QUICK_ROR_INTERSECT_SELECT::get_next()
/* We get here iff we got the same row ref in all scans. */ /* We get here iff we got the same row ref in all scans. */
if (need_to_fetch_row) if (need_to_fetch_row)
error= head->file->rnd_pos(head->record[0], last_rowid); error= head->file->rnd_pos(head->record[0], last_rowid);
} while (error == HA_ERR_RECORD_DELETED);
DBUG_RETURN(error); DBUG_RETURN(error);
} }
...@@ -7471,6 +7477,8 @@ int QUICK_ROR_UNION_SELECT::get_next() ...@@ -7471,6 +7477,8 @@ int QUICK_ROR_UNION_SELECT::get_next()
byte *tmp; byte *tmp;
DBUG_ENTER("QUICK_ROR_UNION_SELECT::get_next"); DBUG_ENTER("QUICK_ROR_UNION_SELECT::get_next");
do
{
do do
{ {
if (!queue.elements) if (!queue.elements)
...@@ -7501,13 +7509,14 @@ int QUICK_ROR_UNION_SELECT::get_next() ...@@ -7501,13 +7509,14 @@ int QUICK_ROR_UNION_SELECT::get_next()
} }
else else
dup_row= !head->file->cmp_ref(cur_rowid, prev_rowid); dup_row= !head->file->cmp_ref(cur_rowid, prev_rowid);
}while (dup_row); } while (dup_row);
tmp= cur_rowid; tmp= cur_rowid;
cur_rowid= prev_rowid; cur_rowid= prev_rowid;
prev_rowid= tmp; prev_rowid= tmp;
error= head->file->rnd_pos(quick->record, prev_rowid); error= head->file->rnd_pos(quick->record, prev_rowid);
} while (error == HA_ERR_RECORD_DELETED);
DBUG_RETURN(error); DBUG_RETURN(error);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment