Commit 834cfbd1 authored by unknown's avatar unknown

enum renamed (asked for compilation under windows)

parent c2d54add
...@@ -72,7 +72,7 @@ Item_subselect::trans_res ...@@ -72,7 +72,7 @@ Item_subselect::trans_res
Item_subselect::select_transformer(JOIN *join) Item_subselect::select_transformer(JOIN *join)
{ {
DBUG_ENTER("Item_subselect::select_transformer"); DBUG_ENTER("Item_subselect::select_transformer");
DBUG_RETURN(OK); DBUG_RETURN(RES_OK);
} }
...@@ -214,14 +214,14 @@ Item_singlerow_subselect::select_transformer(JOIN *join) ...@@ -214,14 +214,14 @@ Item_singlerow_subselect::select_transformer(JOIN *join)
cond= join->having; cond= join->having;
else else
if (!(cond= new Item_cond_and(join->conds, join->having))) if (!(cond= new Item_cond_and(join->conds, join->having)))
return ERROR; return RES_ERROR;
if (!(substitution= new Item_func_if(cond, substitution, if (!(substitution= new Item_func_if(cond, substitution,
new Item_null()))) new Item_null())))
return ERROR; return RES_ERROR;
} }
return REDUCE; return RES_REDUCE;
} }
return OK; return RES_OK;
} }
void Item_singlerow_subselect::store(uint i, Item *item) void Item_singlerow_subselect::store(uint i, Item *item)
...@@ -508,7 +508,7 @@ Item_in_subselect::single_value_transformer(JOIN *join, ...@@ -508,7 +508,7 @@ Item_in_subselect::single_value_transformer(JOIN *join,
if (!optimizer || optimizer->fix_left(thd, up->get_table_list(), 0)) if (!optimizer || optimizer->fix_left(thd, up->get_table_list(), 0))
{ {
thd->lex.current_select= current; thd->lex.current_select= current;
DBUG_RETURN(ERROR); DBUG_RETURN(RES_ERROR);
} }
thd->lex.current_select= current; thd->lex.current_select= current;
...@@ -528,7 +528,7 @@ Item_in_subselect::single_value_transformer(JOIN *join, ...@@ -528,7 +528,7 @@ Item_in_subselect::single_value_transformer(JOIN *join,
if (select_lex->item_list.elements > 1) if (select_lex->item_list.elements > 1)
{ {
my_error(ER_CARDINALITY_COL, MYF(0), 1); my_error(ER_CARDINALITY_COL, MYF(0), 1);
DBUG_RETURN(ERROR); DBUG_RETURN(RES_ERROR);
} }
item= (Item*) select_lex->item_list.head(); item= (Item*) select_lex->item_list.head();
...@@ -546,7 +546,7 @@ Item_in_subselect::single_value_transformer(JOIN *join, ...@@ -546,7 +546,7 @@ Item_in_subselect::single_value_transformer(JOIN *join,
if (join->having->fix_fields(thd, join->tables_list, &join->having)) if (join->having->fix_fields(thd, join->tables_list, &join->having))
{ {
select_lex->having_fix_field= 0; select_lex->having_fix_field= 0;
DBUG_RETURN(ERROR); DBUG_RETURN(RES_ERROR);
} }
select_lex->having_fix_field= 0; select_lex->having_fix_field= 0;
} }
...@@ -570,7 +570,7 @@ Item_in_subselect::single_value_transformer(JOIN *join, ...@@ -570,7 +570,7 @@ Item_in_subselect::single_value_transformer(JOIN *join,
if (join->having->fix_fields(thd, join->tables_list, &join->having)) if (join->having->fix_fields(thd, join->tables_list, &join->having))
{ {
select_lex->having_fix_field= 0; select_lex->having_fix_field= 0;
DBUG_RETURN(ERROR); DBUG_RETURN(RES_ERROR);
} }
select_lex->having_fix_field= 0; select_lex->having_fix_field= 0;
item= new Item_cond_or(item, item= new Item_cond_or(item,
...@@ -578,7 +578,7 @@ Item_in_subselect::single_value_transformer(JOIN *join, ...@@ -578,7 +578,7 @@ Item_in_subselect::single_value_transformer(JOIN *join,
} }
join->conds= and_items(join->conds, item); join->conds= and_items(join->conds, item);
if (join->conds->fix_fields(thd, join->tables_list, &join->conds)) if (join->conds->fix_fields(thd, join->tables_list, &join->conds))
DBUG_RETURN(ERROR); DBUG_RETURN(RES_ERROR);
} }
else else
{ {
...@@ -592,7 +592,7 @@ Item_in_subselect::single_value_transformer(JOIN *join, ...@@ -592,7 +592,7 @@ Item_in_subselect::single_value_transformer(JOIN *join,
if (join->having->fix_fields(thd, join->tables_list, &join->having)) if (join->having->fix_fields(thd, join->tables_list, &join->having))
{ {
select_lex->having_fix_field= 0; select_lex->having_fix_field= 0;
DBUG_RETURN(ERROR); DBUG_RETURN(RES_ERROR);
} }
select_lex->having_fix_field= 0; select_lex->having_fix_field= 0;
} }
...@@ -610,11 +610,11 @@ Item_in_subselect::single_value_transformer(JOIN *join, ...@@ -610,11 +610,11 @@ Item_in_subselect::single_value_transformer(JOIN *join,
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, push_warning(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
ER_SELECT_REDUCED, warn_buff); ER_SELECT_REDUCED, warn_buff);
} }
DBUG_RETURN(REDUCE); DBUG_RETURN(RES_REDUCE);
} }
} }
} }
DBUG_RETURN(OK); DBUG_RETURN(RES_OK);
} }
Item_subselect::trans_res Item_subselect::trans_res
...@@ -640,7 +640,7 @@ Item_in_subselect::row_value_transformer(JOIN *join, ...@@ -640,7 +640,7 @@ Item_in_subselect::row_value_transformer(JOIN *join,
if (!optimizer || optimizer->fix_left(thd, up->get_table_list(), 0)) if (!optimizer || optimizer->fix_left(thd, up->get_table_list(), 0))
{ {
thd->lex.current_select= current; thd->lex.current_select= current;
DBUG_RETURN(ERROR); DBUG_RETURN(RES_ERROR);
} }
thd->lex.current_select= current; thd->lex.current_select= current;
...@@ -679,7 +679,7 @@ Item_in_subselect::row_value_transformer(JOIN *join, ...@@ -679,7 +679,7 @@ Item_in_subselect::row_value_transformer(JOIN *join,
if (join->having->fix_fields(thd, join->tables_list, &join->having)) if (join->having->fix_fields(thd, join->tables_list, &join->having))
{ {
select_lex->having_fix_field= 0; select_lex->having_fix_field= 0;
DBUG_RETURN(ERROR); DBUG_RETURN(RES_ERROR);
} }
select_lex->having_fix_field= 0; select_lex->having_fix_field= 0;
} }
...@@ -687,9 +687,9 @@ Item_in_subselect::row_value_transformer(JOIN *join, ...@@ -687,9 +687,9 @@ Item_in_subselect::row_value_transformer(JOIN *join,
{ {
join->conds= and_items(join->conds, item); join->conds= and_items(join->conds, item);
if (join->conds->fix_fields(thd, join->tables_list, &join->having)) if (join->conds->fix_fields(thd, join->tables_list, &join->having))
DBUG_RETURN(ERROR); DBUG_RETURN(RES_ERROR);
} }
DBUG_RETURN(OK); DBUG_RETURN(RES_OK);
} }
Item_subselect::trans_res Item_subselect::trans_res
......
...@@ -51,7 +51,7 @@ class Item_subselect :public Item_result_field ...@@ -51,7 +51,7 @@ class Item_subselect :public Item_result_field
/* changed engine indicator */ /* changed engine indicator */
bool engine_changed; bool engine_changed;
enum trans_res {OK, REDUCE, ERROR}; enum trans_res {RES_OK, RES_REDUCE, RES_ERROR};
enum subs_type {UNKNOWN_SUBS, SINGLEROW_SUBS, enum subs_type {UNKNOWN_SUBS, SINGLEROW_SUBS,
EXISTS_SUBS, IN_SUBS, ALLANY_SUBS}; EXISTS_SUBS, IN_SUBS, ALLANY_SUBS};
......
...@@ -324,8 +324,8 @@ JOIN::prepare(Item ***rref_pointer_array, ...@@ -324,8 +324,8 @@ JOIN::prepare(Item ***rref_pointer_array,
{ {
Item_subselect::trans_res res; Item_subselect::trans_res res;
if ((res= subselect->select_transformer(this)) != if ((res= subselect->select_transformer(this)) !=
Item_subselect::OK) Item_subselect::RES_OK)
DBUG_RETURN((res == Item_subselect::ERROR)); DBUG_RETURN((res == Item_subselect::RES_ERROR));
} }
} }
......
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