mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed LP bug #878199.
The function JOIN::drop_unused_derived_keys could erroneously set the value of REF::key to 0 for a joined materialized view/derived table in the case when no REF access to the table was used by the query execution plan. This could cause a crash of the server.
This commit is contained in:
@ -8541,7 +8541,7 @@ void JOIN::drop_unused_derived_keys()
|
||||
continue;
|
||||
if (table->max_keys > 1)
|
||||
table->use_index(tab->ref.key);
|
||||
if (table->s->keys)
|
||||
if (table->s->keys && tab->ref.key >= 0)
|
||||
tab->ref.key= 0;
|
||||
tab->keys= (key_map) (table->s->keys ? 1 : 0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user