diff options
author | unknown <bell@sanja.is.com.ua> | 2004-05-14 15:29:23 +0300 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2004-05-14 15:29:23 +0300 |
commit | aebab97dd0f254652d5ebcb7c1e4817c7109d18c (patch) | |
tree | ccff3101aa3aa4d8f1caed9c1191aa248bbf5fc0 /sql/sql_union.cc | |
parent | 8c0e5ebfd372a53cd6b2104c366ac4b6ac4a304b (diff) | |
parent | 98fbcd9f2c89b9613c240983b5c1870d25473ed4 (diff) | |
download | mariadb-git-aebab97dd0f254652d5ebcb7c1e4817c7109d18c.tar.gz |
Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1
into sanja.is.com.ua:/home/bell/mysql/bk/work-explain-4.1
mysql-test/r/subselect.result:
Auto merged
mysql-test/t/subselect.test:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_union.cc:
Auto merged
Diffstat (limited to 'sql/sql_union.cc')
-rw-r--r-- | sql/sql_union.cc | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/sql/sql_union.cc b/sql/sql_union.cc index 42a714aaded..003ff2d95f5 100644 --- a/sql/sql_union.cc +++ b/sql/sql_union.cc @@ -577,3 +577,32 @@ void st_select_lex_unit::reinit_exec_mechanism() } #endif } + + +/* + change select_result object of unit + + SYNOPSIS + st_select_lex_unit::change_result() + result new select_result object + old_result old select_result object + + RETURN + 0 - OK + -1 - error +*/ + +int st_select_lex_unit::change_result(select_subselect *result, + select_subselect *old_result) +{ + int res= 0; + for (SELECT_LEX *sl= first_select_in_union(); sl; sl= sl->next_select()) + { + if (sl->join && sl->join->result == old_result) + if ((res= sl->join->change_result(result))) + return (res); + } + if (fake_select_lex && fake_select_lex->join) + res= fake_select_lex->join->change_result(result); + return (res); +} |