summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 7fcecb8b24d..35949c41b3c 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -2352,6 +2352,11 @@ make_join_readinfo(JOIN *join,uint options)
break;
case JT_EQ_REF:
table->status=STATUS_NO_RECORD;
+ if (tab->select)
+ {
+ delete tab->select->quick;
+ tab->select->quick=0;
+ }
delete tab->quick;
tab->quick=0;
table->file->index_init(tab->ref.key);
@@ -2365,6 +2370,11 @@ make_join_readinfo(JOIN *join,uint options)
break;
case JT_REF:
table->status=STATUS_NO_RECORD;
+ if (tab->select)
+ {
+ delete tab->select->quick;
+ tab->select->quick=0;
+ }
delete tab->quick;
tab->quick=0;
table->file->index_init(tab->ref.key);