summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2004-01-19 21:06:27 +0400
committerunknown <hf@deer.(none)>2004-01-19 21:06:27 +0400
commitb44c819bb61664b4b69680c0209b8627b40fe2b2 (patch)
tree68d020ad65ffc40d49179abe19fb94245bfbf5d6 /sql/sql_select.cc
parent584e137887326584e1f24d2061e75486d745584e (diff)
parent9af09d1266c5a354e6126f13feaea0a3680442d3 (diff)
downloadmariadb-git-b44c819bb61664b4b69680c0209b8627b40fe2b2.tar.gz
Merge deer.(none):/home/hf/work/mysql-4.1.clean
into deer.(none):/home/hf/work/mysql-4.1.1676 sql/item.cc: Auto merged sql/item.h: Auto merged sql/item_func.h: Auto merged sql/item_strfunc.cc: Auto merged sql/item_subselect.cc: Auto merged sql/mysql_priv.h: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_yacc.yy: Auto merged
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 58b876704b0..e4f7214ad00 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -301,7 +301,7 @@ JOIN::prepare(Item ***rref_pointer_array,
/* Check that all tables, fields, conds and order are ok */
- if (setup_tables(tables_list) ||
+ if (setup_tables(tables_list, 0) ||
setup_wild(thd, tables_list, fields_list, &all_fields, wild_num) ||
select_lex->setup_ref_array(thd, og_num) ||
setup_fields(thd, (*rref_pointer_array), tables_list, fields_list, 1,
@@ -1015,7 +1015,7 @@ JOIN::reinit()
if (unit->select_limit_cnt == HA_POS_ERROR)
select_lex->options&= ~OPTION_FOUND_ROWS;
- if (setup_tables(tables_list))
+ if (setup_tables(tables_list, 1))
DBUG_RETURN(1);
/* Reset of sum functions */
@@ -1586,7 +1586,8 @@ mysql_select(THD *thd, Item ***rref_pointer_array,
}
else
{
- join= new JOIN(thd, fields, select_options, result);
+ if (!(join= new JOIN(thd, fields, select_options, result)))
+ DBUG_RETURN(-1);
thd->proc_info="init";
thd->used_tables=0; // Updated by setup_fields
if (join->prepare(rref_pointer_array, tables, wild_num,
@@ -9130,16 +9131,16 @@ int mysql_explain_union(THD *thd, SELECT_LEX_UNIT *unit, select_result *result)
{
res= mysql_explain_select(thd, sl,
(((&thd->lex->select_lex)==sl)?
- ((thd->lex->all_selects_list != sl)?"PRIMARY":
- "SIMPLE"):
+ ((thd->lex->all_selects_list != sl) ?
+ primary_key_name : "SIMPLE"):
((sl == first)?
((sl->linkage == DERIVED_TABLE_TYPE) ?
"DERIVED":
- ((sl->uncacheable & UNCACHEABLE_DEPENDENT)?
+ ((sl->uncacheable & UNCACHEABLE_DEPENDENT) ?
"DEPENDENT SUBQUERY":
(sl->uncacheable?"UNCACHEABLE SUBQUERY":
"SUBQUERY"))):
- ((sl->uncacheable & UNCACHEABLE_DEPENDENT)?
+ ((sl->uncacheable & UNCACHEABLE_DEPENDENT) ?
"DEPENDENT UNION":
sl->uncacheable?"UNCACHEABLE UNION":
"UNION"))),