summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorDmitry Shulga <dmitry.shulga@mariadb.com>2022-01-20 16:25:43 +0700
committerMarko Mäkelä <marko.makela@mariadb.com>2022-01-20 12:50:27 +0200
commit7dcef6504620114f503dea92eadbb0e0fe95eb17 (patch)
treecb167d25cfe13afef5e113414fdc5a35fd540f67 /sql
parent1d27b5789aaa353175f5331d3a8b104b22dd1fce (diff)
downloadmariadb-git-7dcef6504620114f503dea92eadbb0e0fe95eb17.tar.gz
MDEV-24827: Follow-up patch to fix compilation warning
Mixed declarations and code is not allowed for C90 so fix it to avoid compilation break on some platforms.
Diffstat (limited to 'sql')
-rw-r--r--sql/sql_select.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index abdc79c1bf3..db8a63eeb48 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -12960,6 +12960,12 @@ return_zero_rows(JOIN *join, select_result *result, List<TABLE_LIST> &tables,
if (!send_error)
result->send_eof(); // Should be safe
}
+ /*
+ JOIN::join_free() must be called after the virtual method
+ select::send_result_set_metadata() returned control since
+ implementation of this method could use data strutcures
+ that are released by the method JOIN::join_free().
+ */
join->join_free();
DBUG_RETURN(0);