summaryrefslogtreecommitdiff
path: root/sql/sql_cte.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2018-04-16 10:31:30 -0700
committerIgor Babaev <igor@askmonty.org>2018-04-16 10:31:30 -0700
commite34d3184fd02967616bb83904aa3c21977ce6205 (patch)
tree252f3b267c246c504193b39da43cd679ff469718 /sql/sql_cte.cc
parent612850782d6d8bbe44d2b153a045b9a8afc624ef (diff)
downloadmariadb-git-e34d3184fd02967616bb83904aa3c21977ce6205.tar.gz
MDEV-15556 MariaDB crash with big_tables=1 and CTE
This bug manifested itself when the optimizer chose an execution plan with an access of the recursive CTE in a recursive query by key and ARIA/MYISAM temporary tables were used to store recursive tables. The problem appeared due to passing an incorrect parameter to the call of instantiate_tmp_table() in the function With_element::instantiate_tmp_tables().
Diffstat (limited to 'sql/sql_cte.cc')
-rw-r--r--sql/sql_cte.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_cte.cc b/sql/sql_cte.cc
index dd46295d799..6bc833b46a7 100644
--- a/sql/sql_cte.cc
+++ b/sql/sql_cte.cc
@@ -1401,7 +1401,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))