diff options
author | unknown <bell@sanja.is.com.ua> | 2003-03-05 23:32:59 +0200 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2003-03-05 23:32:59 +0200 |
commit | 33131c9e58a101327e6d867146e79f67a574fa11 (patch) | |
tree | b8e99fe8ae71a1da64306df579ad966b075f9d37 /sql/sql_lex.cc | |
parent | 64d48cd6d1d668256bdb639c6467be6112c58164 (diff) | |
download | mariadb-git-33131c9e58a101327e6d867146e79f67a574fa11.tar.gz |
calloc replaced with alloc in st_select_lex_node 'new' operator (SCRUM?)
sql/sql_lex.cc:
initialization of all need field
sql/sql_lex.h:
calloc replaced with alloc
sql/sql_parse.cc:
no need full initialization here
sql/sql_yacc.yy:
removed initialization which will be done in init_qiery method
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r-- | sql/sql_lex.cc | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 94c06d41634..c6514a93053 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -999,6 +999,8 @@ int yylex(void *arg, void *yythd) void st_select_lex_node::init_query() { + options= 0; + linkage= UNSPECIFIED_TYPE; no_table_names_allowed= uncacheable= dependent= 0; ref_pointer_array= 0; } @@ -1016,8 +1018,8 @@ void st_select_lex_node::init_select() void st_select_lex_unit::init_query() { - linkage= GLOBAL_OPTIONS_TYPE; st_select_lex_node::init_query(); + linkage= GLOBAL_OPTIONS_TYPE; global_parameters= this; select_limit_cnt= HA_POS_ERROR; offset_limit_cnt= 0; @@ -1031,11 +1033,10 @@ void st_select_lex_unit::init_query() void st_select_lex::init_query() { st_select_lex_node::init_query(); - table_list.elements= 0; - table_list.first= 0; - table_list.next= (byte**) &table_list.first; + table_list.empty(); item_list.empty(); join= 0; + where= 0; olap= UNSPECIFIED_OLAP_TYPE; having_fix_field= 0; with_wild= 0; @@ -1044,11 +1045,15 @@ void st_select_lex::init_query() void st_select_lex::init_select() { st_select_lex_node::init_select(); - group_list.elements= 0; - group_list.first= 0; - group_list.next= (byte**) &group_list.first; + group_list.empty(); + type= db= db1= table1= db2= table2= 0; + having= 0; + group_list.empty(); + use_index_ptr= ignore_index_ptr= 0; + table_join_options= 0; + in_sum_expr= with_wild= 0; options= 0; - where= having= 0; + braces= 0; when_list.empty(); expr_list.empty(); interval_list.empty(); |