summaryrefslogtreecommitdiff
path: root/sql/sql_derived.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2005-04-01 13:02:29 +0300
committerunknown <bell@sanja.is.com.ua>2005-04-01 13:02:29 +0300
commit58d39ce307ee545493534c301c63d1693046eff1 (patch)
treee76b7cb6fc7a1b94e97279a599ad81923224a0c7 /sql/sql_derived.cc
parent3c006835932f434a4a35760f7ef5e64f6b110e33 (diff)
parent776b9f8f09ec6321f0a2ade6077566ed6f6575a0 (diff)
downloadmariadb-git-58d39ce307ee545493534c301c63d1693046eff1.tar.gz
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-5.0
into sanja.is.com.ua:/home/bell/mysql/bk/work-multi-5.0 mysql-test/r/view.result: Auto merged sql/sql_derived.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_parse.cc: Auto merged sql/sql_prepare.cc: Auto merged sql/sql_select.cc: Auto merged
Diffstat (limited to 'sql/sql_derived.cc')
-rw-r--r--sql/sql_derived.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc
index 45718e7c7da..2ae293c1bff 100644
--- a/sql/sql_derived.cc
+++ b/sql/sql_derived.cc
@@ -43,8 +43,10 @@
int
mysql_handle_derived(LEX *lex, int (*processor)(THD*, LEX*, TABLE_LIST*))
{
+ int res= 0;
if (lex->derived_tables)
{
+ lex->thd->derived_tables_processing= TRUE;
for (SELECT_LEX *sl= lex->all_selects_list;
sl;
sl= sl->next_select_in_list())
@@ -53,9 +55,8 @@ mysql_handle_derived(LEX *lex, int (*processor)(THD*, LEX*, TABLE_LIST*))
cursor;
cursor= cursor->next_local)
{
- int res;
if ((res= (*processor)(lex->thd, lex, cursor)))
- return res;
+ goto out;
}
if (lex->describe)
{
@@ -68,7 +69,9 @@ mysql_handle_derived(LEX *lex, int (*processor)(THD*, LEX*, TABLE_LIST*))
}
}
}
- return 0;
+out:
+ lex->thd->derived_tables_processing= FALSE;
+ return res;
}