diff options
author | Igor Babaev <igor@askmonty.org> | 2018-04-16 10:31:30 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2018-04-16 10:31:30 -0700 |
commit | e34d3184fd02967616bb83904aa3c21977ce6205 (patch) | |
tree | 252f3b267c246c504193b39da43cd679ff469718 /sql/sql_cte.cc | |
parent | 612850782d6d8bbe44d2b153a045b9a8afc624ef (diff) | |
download | mariadb-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.cc | 2 |
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)) |