diff options
author | unknown <bell@sanja.is.com.ua> | 2004-12-07 21:18:15 +0200 |
---|---|---|
committer | unknown <bell@sanja.is.com.ua> | 2004-12-07 21:18:15 +0200 |
commit | 86f19614e1c07b1e3e540d082c137edad80b9f44 (patch) | |
tree | c65dba4e993822cd73f2705f38ad9dfc008115e9 | |
parent | d91953fa905878bf6aeb048ce59d5ed4954c06c9 (diff) | |
download | mariadb-git-86f19614e1c07b1e3e540d082c137edad80b9f44.tar.gz |
postreview fix
sql/item_cmpfunc.cc:
comment fixed
sql/item_subselect.cc:
comment fixed
debug info and inherited method call
sql/item_subselect.h:
comment fixed
sql/item_sum.cc:
comment fixed
sql/item_sum.h:
comment fixed
-rw-r--r-- | sql/item_cmpfunc.cc | 4 | ||||
-rw-r--r-- | sql/item_subselect.cc | 9 | ||||
-rw-r--r-- | sql/item_subselect.h | 2 | ||||
-rw-r--r-- | sql/item_sum.cc | 4 | ||||
-rw-r--r-- | sql/item_sum.h | 2 |
5 files changed, 15 insertions, 6 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index c6ac1651118..51212418b09 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -146,7 +146,9 @@ void Item_func_not_all::print(String *str) /* - special NOP for ALL subquery + Special NOP (No OPeration) for ALL subquery it is like Item_func_not_all + (return TRUE if underlaying sudquery do not return rows) but if subquery + returns some rows it return same value as argument (TRUE/FALSE). */ longlong Item_func_nop_all::val_int() diff --git a/sql/item_subselect.cc b/sql/item_subselect.cc index b263b06c91f..1265d0b3557 100644 --- a/sql/item_subselect.cc +++ b/sql/item_subselect.cc @@ -292,14 +292,19 @@ Item_maxmin_subselect::Item_maxmin_subselect(Item_subselect *parent, void Item_maxmin_subselect::cleanup() { + DBUG_ENTER("Item_maxmin_subselect::cleanup"); + Item_singlerow_subselect::cleanup(); + /* - By default is is TRUE to avoid TRUE reporting by + By default it is TRUE to avoid TRUE reporting by Item_func_not_all/Item_func_nop_all if this item was never called. Engine exec() set it to FALSE by reset_value_registration() call. + select_max_min_finder_subselect::send_data() set it back to TRUE if some + value will be found. */ - was_values= TRUE; + DBUG_VOID_RETURN; } diff --git a/sql/item_subselect.h b/sql/item_subselect.h index bd6ede49255..ab2d441ed7a 100644 --- a/sql/item_subselect.h +++ b/sql/item_subselect.h @@ -160,7 +160,7 @@ class Item_maxmin_subselect :public Item_singlerow_subselect { protected: bool max; - bool was_values; // was checked at least some values + bool was_values; // Set if we have found at least one row public: Item_maxmin_subselect(Item_subselect *parent, st_select_lex *select_lex, bool max); diff --git a/sql/item_sum.cc b/sql/item_sum.cc index 7bc70052920..66d4fba205c 100644 --- a/sql/item_sum.cc +++ b/sql/item_sum.cc @@ -537,11 +537,13 @@ void Item_sum_hybrid::cleanup() DBUG_ENTER("Item_sum_hybrid::cleanup"); Item_sum::cleanup(); used_table_cache= ~(table_map) 0; + /* - by default is is TRUE to avoid TRUE reporting by + by default it is TRUE to avoid TRUE reporting by Item_func_not_all/Item_func_nop_all if this item was never called. no_rows_in_result() set it to FALSE if was not results found. + If some results found it will be left unchanged. */ was_values= TRUE; DBUG_VOID_RETURN; diff --git a/sql/item_sum.h b/sql/item_sum.h index e718c885d4a..cec611b8854 100644 --- a/sql/item_sum.h +++ b/sql/item_sum.h @@ -402,7 +402,7 @@ class Item_sum_hybrid :public Item_sum enum_field_types hybrid_field_type; int cmp_sign; table_map used_table_cache; - bool was_values; // was checked at least some values (for max/min only) + bool was_values; // Set if we have found at least one row (for max/min only) public: Item_sum_hybrid(Item *item_par,int sign) |