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
commit45ede284eba39a3cdcc84574b981a73532b9b1d0 (patch)
treedbb897b5d82c8b6b0db2fc4ab82f1544145159f7 /sql/sql_union.cc
parent9a8305da0c70111dce90ee0db225483a75d84cf7 (diff)
parentc29178232f1d2f318886d8ebb00333e561a0d59a (diff)
downloadmariadb-git-45ede284eba39a3cdcc84574b981a73532b9b1d0.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;