Commit e17ad368 authored by bell@sanja.is.com.ua's avatar bell@sanja.is.com.ua

Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1

into sanja.is.com.ua:/home/bell/mysql/bk/work-alloc-4.1
parents 354af955 cffc2141
...@@ -963,6 +963,8 @@ int yylex(void *arg, void *yythd) ...@@ -963,6 +963,8 @@ int yylex(void *arg, void *yythd)
void st_select_lex_node::init_query() void st_select_lex_node::init_query()
{ {
options= 0;
linkage= UNSPECIFIED_TYPE;
no_table_names_allowed= uncacheable= dependent= 0; no_table_names_allowed= uncacheable= dependent= 0;
ref_pointer_array= 0; ref_pointer_array= 0;
} }
...@@ -981,8 +983,8 @@ void st_select_lex_node::init_select() ...@@ -981,8 +983,8 @@ void st_select_lex_node::init_select()
void st_select_lex_unit::init_query() void st_select_lex_unit::init_query()
{ {
linkage= GLOBAL_OPTIONS_TYPE;
st_select_lex_node::init_query(); st_select_lex_node::init_query();
linkage= GLOBAL_OPTIONS_TYPE;
global_parameters= this; global_parameters= this;
select_limit_cnt= HA_POS_ERROR; select_limit_cnt= HA_POS_ERROR;
offset_limit_cnt= 0; offset_limit_cnt= 0;
...@@ -996,11 +998,10 @@ void st_select_lex_unit::init_query() ...@@ -996,11 +998,10 @@ void st_select_lex_unit::init_query()
void st_select_lex::init_query() void st_select_lex::init_query()
{ {
st_select_lex_node::init_query(); st_select_lex_node::init_query();
table_list.elements= 0; table_list.empty();
table_list.first= 0;
table_list.next= (byte**) &table_list.first;
item_list.empty(); item_list.empty();
join= 0; join= 0;
where= 0;
olap= UNSPECIFIED_OLAP_TYPE; olap= UNSPECIFIED_OLAP_TYPE;
having_fix_field= 0; having_fix_field= 0;
with_wild= 0; with_wild= 0;
...@@ -1009,11 +1010,15 @@ void st_select_lex::init_query() ...@@ -1009,11 +1010,15 @@ void st_select_lex::init_query()
void st_select_lex::init_select() void st_select_lex::init_select()
{ {
st_select_lex_node::init_select(); st_select_lex_node::init_select();
group_list.elements= 0; group_list.empty();
group_list.first= 0; type= db= db1= table1= db2= table2= 0;
group_list.next= (byte**) &group_list.first; having= 0;
group_list.empty();
use_index_ptr= ignore_index_ptr= 0;
table_join_options= 0;
in_sum_expr= with_wild= 0;
options= 0; options= 0;
where= having= 0; braces= 0;
when_list.empty(); when_list.empty();
expr_list.empty(); expr_list.empty();
interval_list.empty(); interval_list.empty();
......
...@@ -215,8 +215,7 @@ class st_select_lex_node { ...@@ -215,8 +215,7 @@ class st_select_lex_node {
static void *operator new(size_t size) static void *operator new(size_t size)
{ {
// TODO: Change to alloc() and explicitely clear elements in constructors return (void*) sql_alloc((uint) size);
return (void*) sql_calloc((uint) size);
} }
static void operator delete(void *ptr,size_t size) {} static void operator delete(void *ptr,size_t size) {}
st_select_lex_node(): linkage(UNSPECIFIED_TYPE) {} st_select_lex_node(): linkage(UNSPECIFIED_TYPE) {}
......
...@@ -3590,7 +3590,7 @@ void mysql_init_multi_delete(LEX *lex) ...@@ -3590,7 +3590,7 @@ void mysql_init_multi_delete(LEX *lex)
lex->select_lex.select_limit= lex->unit.select_limit_cnt= lex->select_lex.select_limit= lex->unit.select_limit_cnt=
HA_POS_ERROR; HA_POS_ERROR;
lex->auxilliary_table_list= lex->select_lex.table_list; lex->auxilliary_table_list= lex->select_lex.table_list;
lex->select_lex.init_query(); lex->select_lex.table_list.empty();
} }
......
...@@ -3571,7 +3571,6 @@ delete: ...@@ -3571,7 +3571,6 @@ delete:
{ {
LEX *lex= Lex; LEX *lex= Lex;
lex->sql_command= SQLCOM_DELETE; lex->sql_command= SQLCOM_DELETE;
lex->select_lex.options= 0;
lex->lock_option= lex->thd->update_lock_default; lex->lock_option= lex->thd->update_lock_default;
lex->select_lex.init_order(); lex->select_lex.init_order();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment