summaryrefslogtreecommitdiff
path: root/sql/sql_derived.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-06-08 11:09:49 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-06-08 11:09:49 +0300
commitbefb0bed68b555852e01859a846bf7ac40f15dbb (patch)
tree1698f0df44f4d5ad4ba1ff23314523179a94aac7 /sql/sql_derived.cc
parenta9bee9884aed7d9221bf028138349a1e7b5c984c (diff)
parentf458b40f66f33521ad3e4f0d4ebcbbcc501c89ed (diff)
downloadmariadb-git-befb0bed68b555852e01859a846bf7ac40f15dbb.tar.gz
Merge 10.2 into 10.3
Diffstat (limited to 'sql/sql_derived.cc')
-rw-r--r--sql/sql_derived.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc
index 1f465a100c9..11d3a13b8b9 100644
--- a/sql/sql_derived.cc
+++ b/sql/sql_derived.cc
@@ -1,6 +1,6 @@
/*
Copyright (c) 2002, 2011, Oracle and/or its affiliates.
- Copyright (c) 2010, 2015, MariaDB
+ Copyright (c) 2010, 2020, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -1110,7 +1110,6 @@ bool mysql_derived_fill(THD *thd, LEX *lex, TABLE_LIST *derived)
DBUG_ASSERT(derived->table && derived->table->is_created());
select_unit *derived_result= derived->derived_result;
SELECT_LEX *save_current_select= lex->current_select;
- bool derived_recursive_is_filled= false;
if (unit->executed && !derived_is_recursive &&
(unit->uncacheable & UNCACHEABLE_DEPENDENT))
@@ -1139,7 +1138,6 @@ bool mysql_derived_fill(THD *thd, LEX *lex, TABLE_LIST *derived)
{
/* In this case all iteration are performed */
res= derived->fill_recursive(thd);
- derived_recursive_is_filled= true;
}
}
else if (unit->is_unit_op())
@@ -1195,8 +1193,7 @@ bool mysql_derived_fill(THD *thd, LEX *lex, TABLE_LIST *derived)
}
}
err:
- if (res || (!lex->describe && !unit->uncacheable &&
- (!derived_is_recursive || derived_recursive_is_filled)))
+ if (res || (!derived_is_recursive && !lex->describe && !unit->uncacheable))
unit->cleanup();
lex->current_select= save_current_select;