summaryrefslogtreecommitdiff
path: root/sql/sql_analyse.h
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2003-02-18 10:18:51 +0200
committerunknown <bell@sanja.is.com.ua>2003-02-18 10:18:51 +0200
commite674c6476be62e2080e008bbe0247dcda934a7d4 (patch)
treee1fba4b3fd6496bfdf174185e871afaee10c89e7 /sql/sql_analyse.h
parent31d43a5e123f8d6bf19e067524823a0673c08642 (diff)
downloadmariadb-git-e674c6476be62e2080e008bbe0247dcda934a7d4.tar.gz
prevented crash on deleting non-constructed analyse object
Diffstat (limited to 'sql/sql_analyse.h')
-rw-r--r--sql/sql_analyse.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/sql/sql_analyse.h b/sql/sql_analyse.h
index ce5c0af6a96..c826b69e53c 100644
--- a/sql/sql_analyse.h
+++ b/sql/sql_analyse.h
@@ -288,13 +288,14 @@ protected:
public:
uint max_tree_elements, max_treemem;
- analyse(select_result *res) :Procedure(res, PROC_NO_SORT), rows(0),
- output_str_length(0) {}
+ analyse(select_result *res) :Procedure(res, PROC_NO_SORT), f_info(0),
+ rows(0), output_str_length(0) {}
~analyse()
- {
- for (field_info **f=f_info; f != f_end; f++)
- delete (*f);
+ {
+ if (f_info)
+ for (field_info **f=f_info; f != f_end; f++)
+ delete (*f);
}
virtual void add() {}
virtual bool change_columns(List<Item> &fields);