#include <item_subselect.h>
Inheritance diagram for Item_maxmin_subselect:


Public Member Functions | |
| Item_maxmin_subselect (THD *thd, Item_subselect *parent, st_select_lex *select_lex, bool max) | |
| void | print (String *str) |
| void | cleanup () |
| bool | any_value () |
| void | register_value () |
| void | reset_value_registration () |
Protected Attributes | |
| bool | max |
| bool | was_values |
Definition at line 173 of file item_subselect.h.
| Item_maxmin_subselect::Item_maxmin_subselect | ( | THD * | thd, | |
| Item_subselect * | parent, | |||
| st_select_lex * | select_lex, | |||
| bool | max | |||
| ) |
Definition at line 311 of file item_subselect.cc.
References Item_subselect::const_item_cache, DBUG_ENTER, DBUG_VOID_RETURN, Item_subselect::get_const_item_cache(), Item_subselect::get_used_tables_cache(), Item_subselect::init(), max, Item_subselect::max_columns, Item::maybe_null, Item_subselect::thd, and Item_subselect::used_tables_cache.
00315 :Item_singlerow_subselect(), was_values(TRUE) 00316 { 00317 DBUG_ENTER("Item_maxmin_subselect::Item_maxmin_subselect"); 00318 max= max_arg; 00319 init(select_lex, new select_max_min_finder_subselect(this, max_arg)); 00320 max_columns= 1; 00321 maybe_null= 1; 00322 max_columns= 1; 00323 00324 /* 00325 Following information was collected during performing fix_fields() 00326 of Items belonged to subquery, which will be not repeated 00327 */ 00328 used_tables_cache= parent->get_used_tables_cache(); 00329 const_item_cache= parent->get_const_item_cache(); 00330 00331 /* 00332 this subquery always creates during preparation, so we can assign 00333 thd here 00334 */ 00335 thd= thd_param; 00336 00337 DBUG_VOID_RETURN; 00338 }
Here is the call graph for this function:

| bool Item_maxmin_subselect::any_value | ( | ) | [inline] |
Definition at line 183 of file item_subselect.h.
References was_values.
Referenced by Item_func_not_all::empty_underlying_subquery().
00183 { return was_values; }
Here is the caller graph for this function:

| void Item_maxmin_subselect::cleanup | ( | ) | [virtual] |
Reimplemented from Item_singlerow_subselect.
Definition at line 340 of file item_subselect.cc.
References Item_singlerow_subselect::cleanup(), DBUG_ENTER, DBUG_VOID_RETURN, TRUE, and was_values.
00341 { 00342 DBUG_ENTER("Item_maxmin_subselect::cleanup"); 00343 Item_singlerow_subselect::cleanup(); 00344 00345 /* 00346 By default it is TRUE to avoid TRUE reporting by 00347 Item_func_not_all/Item_func_nop_all if this item was never called. 00348 00349 Engine exec() set it to FALSE by reset_value_registration() call. 00350 select_max_min_finder_subselect::send_data() set it back to TRUE if some 00351 value will be found. 00352 */ 00353 was_values= TRUE; 00354 DBUG_VOID_RETURN; 00355 }
Here is the call graph for this function:

| void Item_maxmin_subselect::print | ( | String * | str | ) | [virtual] |
Reimplemented from Item_subselect.
Definition at line 358 of file item_subselect.cc.
References String::append(), max, and Item_subselect::print().
00359 { 00360 str->append(max?"<max>":"<min>", 5); 00361 Item_singlerow_subselect::print(str); 00362 }
Here is the call graph for this function:

| void Item_maxmin_subselect::register_value | ( | ) | [inline] |
Definition at line 184 of file item_subselect.h.
References TRUE, and was_values.
00184 { was_values= TRUE; }
| void Item_maxmin_subselect::reset_value_registration | ( | ) | [inline, virtual] |
Reimplemented from Item_subselect.
Definition at line 185 of file item_subselect.h.
References FALSE, and was_values.
00185 { was_values= FALSE; }
bool Item_maxmin_subselect::max [protected] |
Definition at line 176 of file item_subselect.h.
Referenced by Item_maxmin_subselect(), and print().
bool Item_maxmin_subselect::was_values [protected] |
Definition at line 177 of file item_subselect.h.
Referenced by any_value(), cleanup(), register_value(), and reset_value_registration().
1.4.7

