summaryrefslogtreecommitdiff
path: root/sql/sql_prepare.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2003-01-26 21:30:35 +0200
committerunknown <bell@sanja.is.com.ua>2003-01-26 21:30:35 +0200
commita72ebebf5dace430460ebdd9e96322780fcfe882 (patch)
treee194c81cba3115272354ebd186e5faa8e278d078 /sql/sql_prepare.cc
parentfbd882fca6902e5038bef1d25c1afbfad892d09a (diff)
downloadmariadb-git-a72ebebf5dace430460ebdd9e96322780fcfe882.tar.gz
after merge fix of 577 task (SCRUM, pre commit to be able to merge with static tables optimization fix)
fixed derived tables with subselect inside mysql-test/r/derived.result: test of subselects inside derived tables mysql-test/t/derived.test: test of subselects inside derived tables mysql-test/t/subselect.test: subselect test (not finished) sql/item.cc: after merge fix sql/item.h: after merge fix sql/item_cmpfunc.h: after merge fix sql/item_subselect.cc: after merge fix sql/item_sum.h: after merge fix sql/mysql_priv.h: fixed derived tables with subselect inside sql/sql_class.h: after merge fix sql/sql_derived.cc: fixed derived tables with subselect inside sql/sql_lex.cc: fixed derived tables with subselect inside sql/sql_lex.h: fixed derived tables with subselect inside sql/sql_parse.cc: fixed derived tables with subselect inside after merge fix sql/sql_prepare.cc: after merge fix sql/sql_select.cc: after merge fix fixed derived tables with subselect inside
Diffstat (limited to 'sql/sql_prepare.cc')
-rw-r--r--sql/sql_prepare.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/sql/sql_prepare.cc b/sql/sql_prepare.cc
index 7c9e4b27564..5d9e3c8d7e2 100644
--- a/sql/sql_prepare.cc
+++ b/sql/sql_prepare.cc
@@ -532,8 +532,9 @@ static bool mysql_test_upd_fields(PREP_STMT *stmt, TABLE_LIST *table_list,
And send column list fields info back to client.
*/
static bool mysql_test_select_fields(PREP_STMT *stmt, TABLE_LIST *tables,
+ uint wild_num,
List<Item> &fields, COND *conds,
- ORDER *order, ORDER *group,
+ uint og_num, ORDER *order, ORDER *group,
Item *having, ORDER *proc,
ulong select_options,
SELECT_LEX_UNIT *unit,
@@ -545,7 +546,7 @@ static bool mysql_test_select_fields(PREP_STMT *stmt, TABLE_LIST *tables,
DBUG_ENTER("mysql_test_select_fields");
if ((&lex->select_lex != lex->all_selects_list &&
- lex->unit.create_total_list(thd, lex, &tables)))
+ lex->unit.create_total_list(thd, lex, &tables, 0)))
DBUG_RETURN(1);
if (open_and_lock_tables(thd, tables))
@@ -564,7 +565,8 @@ static bool mysql_test_select_fields(PREP_STMT *stmt, TABLE_LIST *tables,
JOIN *join= new JOIN(thd, fields, select_options, result);
thd->used_tables= 0; // Updated by setup_fields
- if (join->prepare(tables, conds, order, group, having, proc,
+ if (join->prepare(&select_lex->ref_pointer_array, tables,
+ wild_num, conds, og_num, order, group, having, proc,
select_lex, unit, 0))
DBUG_RETURN(1);
@@ -623,9 +625,11 @@ static bool send_prepare_results(PREP_STMT *stmt)
break;
case SQLCOM_SELECT:
- if (mysql_test_select_fields(stmt, tables,
+ if (mysql_test_select_fields(stmt, tables, select_lex->with_wild,
select_lex->item_list,
select_lex->where,
+ select_lex->order_list.elements +
+ select_lex->group_list.elements,
(ORDER*) select_lex->order_list.first,
(ORDER*) select_lex->group_list.first,
select_lex->having,