diff options
author | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2016-01-26 14:49:25 +0200 |
---|---|---|
committer | Vicențiu Ciorbaru <vicentiu@mariadb.org> | 2016-01-26 14:49:25 +0200 |
commit | a7f62444ae3ca3048ff69762e6f950f72eaf63ed (patch) | |
tree | 1d739cf70f393c1b109c82b41f7c19e38466a102 | |
parent | e7a89b46d4ece1351cc60d8bafb8bf90ca9d8cc8 (diff) | |
download | mariadb-git-bb-10.1-mdev-9304.tar.gz |
[MDEV-9304] MariaDB crash with specific querybb-10.1-mdev-9304
A fix making tmp_join not get double freed.
-rw-r--r-- | sql/sql_union.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc index c8350838ee8..6d584e1242e 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -1043,6 +1043,12 @@ bool st_select_lex_unit::cleanup() join->tables_list= 0; join->table_count= 0; join->top_join_tab_count= 0; + if (join->tmp_join && join->tmp_join != join) + { + join->tmp_join->tables_list= 0; + join->tmp_join->table_count= 0; + join->tmp_join->top_join_tab_count= 0; + } } error|= fake_select_lex->cleanup(); /* |