summaryrefslogtreecommitdiff
path: root/sql/sql_cte.cc
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2018-04-19 15:23:21 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2018-04-19 15:23:21 +0300
commitd71a8855eef34e5792b4939ee5e88e6625080d91 (patch)
treeed4d5b9916395132fa56675eb58a9229d0672bbe /sql/sql_cte.cc
parent419385dbf10453b17a370fd9e5bd934d09e0b440 (diff)
parent66c14d3a8d31e877ede75d23f96dc61a4aa12971 (diff)
downloadmariadb-git-d71a8855eef34e5792b4939ee5e88e6625080d91.tar.gz
Merge 10.2 to 10.3
Temporarily disable main.cte_recursive due to hang in an added test related to MDEV-15575.
Diffstat (limited to 'sql/sql_cte.cc')
-rw-r--r--sql/sql_cte.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/sql_cte.cc b/sql/sql_cte.cc
index a58a9254a82..4ae15524dab 100644
--- a/sql/sql_cte.cc
+++ b/sql/sql_cte.cc
@@ -1189,7 +1189,7 @@ bool st_select_lex::check_unrestricted_recursive(bool only_standard_compliant)
/* Check conditions 3-4 for restricted specification*/
- if (with_sum_func ||
+ if ((with_sum_func && !with_elem->is_anchor(this)) ||
(with_elem->contains_sq_with_recursive_reference()))
with_elem->get_owner()->add_unrestricted(
with_elem->get_mutually_recursive());
@@ -1414,7 +1414,7 @@ bool With_element::instantiate_tmp_tables()
{
if (!rec_table->is_created() &&
instantiate_tmp_table(rec_table,
- rec_result->tmp_table_param.keyinfo,
+ rec_table->s->key_info,
rec_result->tmp_table_param.start_recinfo,
&rec_result->tmp_table_param.recinfo,
0))