summaryrefslogtreecommitdiff
path: root/sql/sql_union.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r--sql/sql_union.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc
index f644bf43e2d..8390699511c 100644
--- a/sql/sql_union.cc
+++ b/sql/sql_union.cc
@@ -1502,7 +1502,7 @@ bool st_select_lex_unit::exec_recursive()
thd->inc_examined_row_count(examined_rows);
incr_table->file->info(HA_STATUS_VARIABLE);
- if (incr_table->file->stats.records == 0)
+ if (with_element->level && incr_table->file->stats.records == 0)
with_element->set_as_stabilized();
else
with_element->level++;