summaryrefslogtreecommitdiff
path: root/sql/item_subselect.cc
diff options
context:
space:
mode:
authorunknown <konstantin@oak.local>2003-12-19 20:52:13 +0300
committerunknown <konstantin@oak.local>2003-12-19 20:52:13 +0300
commit8d987f9e532689545becf521aa6a6aa6b23bf330 (patch)
treea4c72a1d62170f1e5637ed34fd09ada369f1c764 /sql/item_subselect.cc
parentbfe77e3398944bed4c919ba0c7477a4318d9f2cc (diff)
downloadmariadb-git-8d987f9e532689545becf521aa6a6aa6b23bf330.tar.gz
THD::lex now points to THD::main_lex like in 5.0
All tests pass (client_test included) libmysqld/lib_sql.cc: THD::lex now points to THD::main_lex like in 5.0 sql/filesort.cc: THD::lex now points to THD::main_lex like in 5.0 sql/ha_innodb.cc: THD::lex now points to THD::main_lex like in 5.0 sql/ha_myisam.cc: THD::lex now points to THD::main_lex like in 5.0 sql/item.cc: THD::lex now points to THD::main_lex like in 5.0 sql/item_cmpfunc.cc: THD::lex now points to THD::main_lex like in 5.0 sql/item_create.cc: THD::lex now points to THD::main_lex like in 5.0 sql/item_func.cc: THD::lex now points to THD::main_lex like in 5.0 sql/item_subselect.cc: THD::lex now points to THD::main_lex like in 5.0 sql/item_sum.cc: THD::lex now points to THD::main_lex like in 5.0 sql/mysql_priv.h: THD::lex now points to THD::main_lex like in 5.0 sql/mysqld.cc: THD::lex now points to THD::main_lex like in 5.0 sql/protocol.cc: THD::lex now points to THD::main_lex like in 5.0 sql/repl_failsafe.cc: THD::lex now points to THD::main_lex like in 5.0 sql/slave.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_acl.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_base.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_cache.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_class.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_class.h: THD::lex now points to THD::main_lex like in 5.0 sql/sql_delete.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_error.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_insert.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_lex.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_lex.h: THD::lex now points to THD::main_lex like in 5.0 sql/sql_parse.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_prepare.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_repl.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_select.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_table.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_union.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_update.cc: THD::lex now points to THD::main_lex like in 5.0 sql/sql_yacc.yy: THD::lex now points to THD::main_lex like in 5.0
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r--sql/item_subselect.cc46
1 files changed, 23 insertions, 23 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index bc16fe87c2a..43775e1c96c 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -253,7 +253,7 @@ Item_singlerow_subselect::select_transformer(JOIN *join)
{
have_to_be_excluded= 1;
- if (join->thd->lex.describe)
+ if (join->thd->lex->describe)
{
char warn_buff[MYSQL_ERRMSG_SIZE];
sprintf(warn_buff, ER(ER_SELECT_REDUCED), select_lex->select_number);
@@ -608,14 +608,14 @@ Item_in_subselect::single_value_transformer(JOIN *join,
subs= new Item_maxmin_subselect(this, select_lex, func->l_op());
}
// left expression belong to outer select
- SELECT_LEX *current= thd_tmp->lex.current_select, *up;
- thd_tmp->lex.current_select= up= current->return_after_parsing();
+ SELECT_LEX *current= thd_tmp->lex->current_select, *up;
+ thd_tmp->lex->current_select= up= current->return_after_parsing();
if (left_expr->fix_fields(thd_tmp, up->get_table_list(), &left_expr))
{
- thd_tmp->lex.current_select= current;
+ thd_tmp->lex->current_select= current;
DBUG_RETURN(RES_ERROR);
}
- thd_tmp->lex.current_select= current;
+ thd_tmp->lex->current_select= current;
substitution= func->create(left_expr, subs);
DBUG_RETURN(RES_OK);
}
@@ -626,16 +626,16 @@ Item_in_subselect::single_value_transformer(JOIN *join,
SELECT_LEX_UNIT *unit= select_lex->master_unit();
substitution= optimizer= new Item_in_optimizer(left_expr, this);
- SELECT_LEX *current= thd_tmp->lex.current_select, *up;
+ SELECT_LEX *current= thd_tmp->lex->current_select, *up;
- thd_tmp->lex.current_select= up= current->return_after_parsing();
+ thd_tmp->lex->current_select= up= current->return_after_parsing();
//optimizer never use Item **ref => we can pass 0 as parameter
if (!optimizer || optimizer->fix_left(thd_tmp, up->get_table_list(), 0))
{
- thd_tmp->lex.current_select= current;
+ thd_tmp->lex->current_select= current;
DBUG_RETURN(RES_ERROR);
}
- thd_tmp->lex.current_select= current;
+ thd_tmp->lex->current_select= current;
/*
As far as Item_ref_in_optimizer do not substitude itself on fix_fields
@@ -726,7 +726,7 @@ Item_in_subselect::single_value_transformer(JOIN *join,
// fix_field of item will be done in time of substituting
substitution= item;
have_to_be_excluded= 1;
- if (thd_tmp->lex.describe)
+ if (thd_tmp->lex->describe)
{
char warn_buff[MYSQL_ERRMSG_SIZE];
sprintf(warn_buff, ER(ER_SELECT_REDUCED), select_lex->select_number);
@@ -763,15 +763,15 @@ Item_in_subselect::row_value_transformer(JOIN *join)
SELECT_LEX_UNIT *unit= select_lex->master_unit();
substitution= optimizer= new Item_in_optimizer(left_expr, this);
- SELECT_LEX *current= thd_tmp->lex.current_select, *up;
- thd_tmp->lex.current_select= up= current->return_after_parsing();
+ SELECT_LEX *current= thd_tmp->lex->current_select, *up;
+ thd_tmp->lex->current_select= up= current->return_after_parsing();
//optimizer never use Item **ref => we can pass 0 as parameter
if (!optimizer || optimizer->fix_left(thd_tmp, up->get_table_list(), 0))
{
- thd_tmp->lex.current_select= current;
+ thd_tmp->lex->current_select= current;
DBUG_RETURN(RES_ERROR);
}
- thd_tmp->lex.current_select= current;
+ thd_tmp->lex->current_select= current;
unit->uncacheable|= UNCACHEABLE_DEPENDENT;
}
@@ -913,8 +913,8 @@ int subselect_single_select_engine::prepare()
return 1;
}
prepared= 1;
- SELECT_LEX *save_select= thd->lex.current_select;
- thd->lex.current_select= select_lex;
+ SELECT_LEX *save_select= thd->lex->current_select;
+ thd->lex->current_select= select_lex;
if (join->prepare(&select_lex->ref_pointer_array,
(TABLE_LIST*) select_lex->table_list.first,
select_lex->with_wild,
@@ -927,7 +927,7 @@ int subselect_single_select_engine::prepare()
(ORDER*) 0, select_lex,
select_lex->master_unit()))
return 1;
- thd->lex.current_select= save_select;
+ thd->lex->current_select= save_select;
return 0;
}
@@ -1000,8 +1000,8 @@ int subselect_single_select_engine::exec()
{
DBUG_ENTER("subselect_single_select_engine::exec");
char const *save_where= join->thd->where;
- SELECT_LEX *save_select= join->thd->lex.current_select;
- join->thd->lex.current_select= select_lex;
+ SELECT_LEX *save_select= join->thd->lex->current_select;
+ join->thd->lex->current_select= select_lex;
if (!optimized)
{
optimized=1;
@@ -1009,7 +1009,7 @@ int subselect_single_select_engine::exec()
{
join->thd->where= save_where;
executed= 1;
- join->thd->lex.current_select= save_select;
+ join->thd->lex->current_select= save_select;
DBUG_RETURN(join->error?join->error:1);
}
if (item->engine_changed)
@@ -1022,7 +1022,7 @@ int subselect_single_select_engine::exec()
if (join->reinit())
{
join->thd->where= save_where;
- join->thd->lex.current_select= save_select;
+ join->thd->lex->current_select= save_select;
DBUG_RETURN(1);
}
item->reset();
@@ -1033,11 +1033,11 @@ int subselect_single_select_engine::exec()
join->exec();
executed= 1;
join->thd->where= save_where;
- join->thd->lex.current_select= save_select;
+ join->thd->lex->current_select= save_select;
DBUG_RETURN(join->error||thd->is_fatal_error);
}
join->thd->where= save_where;
- join->thd->lex.current_select= save_select;
+ join->thd->lex->current_select= save_select;
DBUG_RETURN(0);
}