diff options
author | Oleksandr Byelkin <sanja@mariadb.com> | 2017-02-28 17:39:28 +0100 |
---|---|---|
committer | Oleksandr Byelkin <sanja@mariadb.com> | 2017-02-28 17:39:28 +0100 |
commit | 52cc72bd2477422e2c7aeea5d9ad3407203aeb1f (patch) | |
tree | 4ee1ebfc87217a9033e856e7103d172a50a74145 /sql/sql_select.cc | |
parent | 199f88cb9cfb08cefced1b51a7d98fe4c91b7a2e (diff) | |
download | mariadb-git-bb-5.5-MDEV-9635.tar.gz |
MDEV-9635: Server crashes in part_of_refkey or assertion `!created && key_to_save < (int)s->keys' failed in TABLE::use_index(int) or with join_cache_level>2bb-5.5-MDEV-9635
Do not try to create index where ref is for hash join.
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r-- | sql/sql_select.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 4133c8258a2..43b3b6bf47b 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -9422,7 +9422,7 @@ void JOIN::drop_unused_derived_keys() continue; if (!table->pos_in_table_list->is_materialized_derived()) continue; - if (table->max_keys > 1) + if (table->max_keys > 1 && !tab->is_ref_for_hash_join()) table->use_index(tab->ref.key); if (table->s->keys) { |