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.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index a58c34cc2fa..82f332b83df 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -12500,7 +12500,8 @@ bool JOIN_TAB::preread_init()
derived, DT_CREATE | DT_FILL))
return TRUE;
- if (!(derived->get_unit()->uncacheable & UNCACHEABLE_DEPENDENT))
+ if (!(derived->get_unit()->uncacheable & UNCACHEABLE_DEPENDENT) ||
+ derived->is_nonrecursive_derived_with_rec_ref())
preread_init_done= TRUE;
if (select && select->quick)
select->quick->replace_handler(table->file);