summaryrefslogtreecommitdiff
path: root/sql/item_subselect.cc
diff options
context:
space:
mode:
authorcmiller@zippy.cornsilk.net <>2007-12-14 10:52:10 -0500
committercmiller@zippy.cornsilk.net <>2007-12-14 10:52:10 -0500
commitc940d64a69474c165e3988eb7ad93f16a88ef852 (patch)
tree12c2887fa7da423ee894c74c94ab3ee5f2f1b748 /sql/item_subselect.cc
parenta30c52cbf55f892bcd3b4269d63dab4991e6f540 (diff)
parent5a19f077b372d96b301a9a926326fb780d88c5e8 (diff)
downloadmariadb-git-c940d64a69474c165e3988eb7ad93f16a88ef852.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-5.1-maint
Diffstat (limited to 'sql/item_subselect.cc')
-rw-r--r--sql/item_subselect.cc112
1 files changed, 58 insertions, 54 deletions
diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc
index 423f067e54d..614f30c48d7 100644
--- a/sql/item_subselect.cc
+++ b/sql/item_subselect.cc
@@ -13,12 +13,15 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-/*
- subselect Item
+/**
+ @file
+
+ @brief
+ subselect Item
-SUBSELECT TODO:
- - add function from mysql_select that use JOIN* as parameter to JOIN methods
- (sql_select.h/sql_select.cc)
+ @todo
+ - add function from mysql_select that use JOIN* as parameter to JOIN
+ methods (sql_select.h/sql_select.cc)
*/
#ifdef USE_PRAGMA_IMPLEMENTATION
@@ -403,6 +406,16 @@ void Item_singlerow_subselect::reset()
}
+/**
+ @todo
+ - We cant change name of Item_field or Item_ref, because it will
+ prevent it's correct resolving, but we should save name of
+ removed item => we do not make optimization if top item of
+ list is field or reference.
+ - switch off this optimization for prepare statement,
+ because we do not rollback this changes.
+ Make rollback for it, or special name resolving mode in 5.0.
+*/
Item_subselect::trans_res
Item_singlerow_subselect::select_transformer(JOIN *join)
{
@@ -1445,24 +1458,24 @@ Item_in_subselect::select_transformer(JOIN *join)
}
-/*
+/**
Prepare IN/ALL/ANY/SOME subquery transformation and call appropriate
- transformation function
+ transformation function.
- SYNOPSIS
- Item_in_subselect::select_in_like_transformer()
- join JOIN object of transforming subquery
- func creator of condition function of subquery
-
- DESCRIPTION
To decide which transformation procedure (scalar or row) applicable here
we have to call fix_fields() for left expression to be able to call
cols() method on it. Also this method make arena management for
underlying transformation methods.
- RETURN
+ @param join JOIN object of transforming subquery
+ @param func creator of condition function of subquery
+
+ @retval
RES_OK OK
- RES_REDUCE OK, and current subquery was reduced during transformation
+ @retval
+ RES_REDUCE OK, and current subquery was reduced during
+ transformation
+ @retval
RES_ERROR Error
*/
@@ -2423,16 +2436,15 @@ void subselect_indexsubquery_engine::print(String *str)
str->append(')');
}
-/*
- change select_result object of engine
+/**
+ change select_result object of engine.
- SYNOPSIS
- subselect_single_select_engine::change_result()
- si new subselect Item
- res new select_result object
+ @param si new subselect Item
+ @param res new select_result object
- RETURN
+ @retval
FALSE OK
+ @retval
TRUE error
*/
@@ -2445,16 +2457,15 @@ bool subselect_single_select_engine::change_result(Item_subselect *si,
}
-/*
- change select_result object of engine
+/**
+ change select_result object of engine.
- SYNOPSIS
- subselect_single_select_engine::change_result()
- si new subselect Item
- res new select_result object
+ @param si new subselect Item
+ @param res new select_result object
- RETURN
+ @retval
FALSE OK
+ @retval
TRUE error
*/
@@ -2468,16 +2479,15 @@ bool subselect_union_engine::change_result(Item_subselect *si,
}
-/*
- change select_result emulation, never should be called
+/**
+ change select_result emulation, never should be called.
- SYNOPSIS
- subselect_single_select_engine::change_result()
- si new subselect Item
- res new select_result object
+ @param si new subselect Item
+ @param res new select_result object
- RETURN
+ @retval
FALSE OK
+ @retval
TRUE error
*/
@@ -2489,14 +2499,12 @@ bool subselect_uniquesubquery_engine::change_result(Item_subselect *si,
}
-/*
- Report about presence of tables in subquery
-
- SYNOPSIS
- subselect_single_select_engine::no_tables()
+/**
+ Report about presence of tables in subquery.
- RETURN
+ @retval
TRUE there are not tables used in subquery
+ @retval
FALSE there are some tables in subquery
*/
bool subselect_single_select_engine::no_tables()
@@ -2521,14 +2529,12 @@ bool subselect_single_select_engine::may_be_null()
}
-/*
- Report about presence of tables in subquery
+/**
+ Report about presence of tables in subquery.
- SYNOPSIS
- subselect_union_engine::no_tables()
-
- RETURN
+ @retval
TRUE there are not tables used in subquery
+ @retval
FALSE there are some tables in subquery
*/
bool subselect_union_engine::no_tables()
@@ -2542,14 +2548,12 @@ bool subselect_union_engine::no_tables()
}
-/*
- Report about presence of tables in subquery
+/**
+ Report about presence of tables in subquery.
- SYNOPSIS
- subselect_uniquesubquery_engine::no_tables()
-
- RETURN
+ @retval
TRUE there are not tables used in subquery
+ @retval
FALSE there are some tables in subquery
*/