diff options
author | unknown <bell@sanja.is.com.ua> | 2003-02-16 20:37:51 +0200 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2003-02-16 20:37:51 +0200 |
commit | 77f5c5a7cf4e99fa3d760f1541bafec3b182def3 (patch) | |
tree | 49124c9d7a4d500f48cad2744d46b5f87542783b /sql | |
parent | 2854479ef3acfd1b9a2f400d0874201cd1d7a78f (diff) | |
download | mariadb-git-77f5c5a7cf4e99fa3d760f1541bafec3b182def3.tar.gz |
fixed excluding st_select_lex from global select list
fixed destroing not well constructed analize object
fixed wrong detection of unions in derived tables
sql/sql_analyse.h:
fixed destroing not well constructed analize object
sql/sql_derived.cc:
fixed wrong detection of unions in derived tables
sql/sql_lex.cc:
fixed excluding st_select_lex from global select list
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_analyse.h | 11 | ||||
-rw-r--r-- | sql/sql_derived.cc | 2 | ||||
-rw-r--r-- | sql/sql_lex.cc | 7 |
3 files changed, 11 insertions, 9 deletions
diff --git a/sql/sql_analyse.h b/sql/sql_analyse.h index ada46374a15..5f0058c3ad9 100644 --- a/sql/sql_analyse.h +++ b/sql/sql_analyse.h @@ -306,13 +306,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); diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc index 528bdb7b6f5..f1a5912cfdb 100644 --- a/sql/sql_derived.cc +++ b/sql/sql_derived.cc @@ -71,7 +71,7 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, select_union *derived_result; TABLE_LIST *tables= (TABLE_LIST *)sl->table_list.first; TMP_TABLE_PARAM tmp_table_param; - bool is_union= sl->next_select() && sl->next_select()->linkage == UNION_TYPE; + bool is_union= sl->next_select(); bool is_subsel= sl->first_inner_unit() ? 1: 0; SELECT_LEX_NODE *save_current_select= lex->current_select; DBUG_ENTER("mysql_derived"); diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 0fe3d11e404..779a109367c 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -1098,10 +1098,11 @@ void st_select_lex_node::fast_exclude() { if ((*link_prev= link_next)) link_next->link_prev= link_prev; - // Remove slave structure - for (; slave; slave= slave->next) - slave->fast_exclude(); } + // Remove slave structure + for (; slave; slave= slave->next) + slave->fast_exclude(); + } /* |