1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Fix for BUG#12082 (assert failure when the query fails to get a lock for record in 'const' table):

Set table->key_read back to 0 regardless of whether join_read_const() succeeded or not.
This commit is contained in:
unknown
2005-07-31 02:47:54 +00:00
parent 8db171dfbe
commit 7a62b5928b

View File

@ -9717,7 +9717,13 @@ join_read_const_table(JOIN_TAB *tab, POSITION *pos)
table->file->extra(HA_EXTRA_KEYREAD);
tab->index= tab->ref.key;
}
if ((error=join_read_const(tab)))
error=join_read_const(tab);
if (table->key_read)
{
table->key_read=0;
table->file->extra(HA_EXTRA_NO_KEYREAD);
}
if (error)
{
tab->info="unique row not found";
/* Mark for EXPLAIN that the row was not found */
@ -9725,11 +9731,6 @@ join_read_const_table(JOIN_TAB *tab, POSITION *pos)
if (!table->maybe_null || error > 0)
DBUG_RETURN(error);
}
if (table->key_read)
{
table->key_read=0;
table->file->extra(HA_EXTRA_NO_KEYREAD);
}
}
if (*tab->on_expr_ref && !table->null_row)
{