summaryrefslogtreecommitdiff
path: root/sql/sql_union.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2004-01-17 11:53:04 +0200
committerunknown <bell@sanja.is.com.ua>2004-01-17 11:53:04 +0200
commitadca234881975e5b686275357980e34b2139b6de (patch)
treedbb897b5d82c8b6b0db2fc4ab82f1544145159f7 /sql/sql_union.cc
parente0bd7faf5bc2845f49f60d067579a20092bf62b6 (diff)
parentfc75518a78af9dfb68baac2cbf279983fe54b492 (diff)
downloadmariadb-git-adca234881975e5b686275357980e34b2139b6de.tar.gz
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-sub-4.1 mysql-test/r/subselect_innodb.result: Auto merged mysql-test/t/subselect_innodb.test: Auto merged sql/item_subselect.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_union.cc: Auto merged
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r--sql/sql_union.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc
index 25620229844..260903c9dd1 100644
--- a/sql/sql_union.cc
+++ b/sql/sql_union.cc
@@ -29,7 +29,7 @@ int mysql_union(THD *thd, LEX *lex, select_result *result,
{
DBUG_ENTER("mysql_union");
int res= 0;
- if (!(res= unit->prepare(thd, result)))
+ if (!(res= unit->prepare(thd, result, SELECT_NO_UNLOCK)))
res= unit->exec();
res|= unit->cleanup();
DBUG_RETURN(res);
@@ -106,7 +106,8 @@ bool select_union::flush()
}
-int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result)
+int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
+ ulong additional_options)
{
SELECT_LEX *lex_select_save= thd_arg->lex->current_select;
SELECT_LEX *sl, *first_select;
@@ -146,7 +147,7 @@ int st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result)
for (;sl; sl= sl->next_select())
{
JOIN *join= new JOIN(thd_arg, sl->item_list,
- sl->options | thd_arg->options | SELECT_NO_UNLOCK,
+ sl->options | thd_arg->options | additional_options,
tmp_result);
thd_arg->lex->current_select= sl;
offset_limit_cnt= sl->offset_limit;