From a32b868c3b930b512ffd840c2708e0ee894507b1 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 14 May 2003 21:51:33 +0300 Subject: subselect transformation moved in after-fix_field place removed "of is null" if it is possible (this cset should be SCRUM related, but not approved as scrum task yet) mysql-test/r/subselect.result: new subselect test result (new place of error detecting & and more subselect reducing) sql/item.cc: layout fix sql/item.h: unneed ';' fixed print pethod sql/item_cmpfunc.cc: new method to support transformation after fix_fields sql/item_cmpfunc.h: new method to support transformation after fix_fields fixed Item printing sql/item_subselect.cc: new transformation sql/item_subselect.h: new transformation sql/sql_derived.cc: 'table' & 'table_list' now is not union sql/sql_lex.cc: 'table' & 'table_list' now is not union to support reinit only shared tables (but all) sql/sql_lex.h: mark fake st_select_lex sql/sql_olap.cc: fixed table assignment TODO added sql/sql_select.cc: 'table' & 'table_list' now is not union transforming subselect sql/sql_union.cc: prepare make on fix_fields sql/sql_yacc.yy: fixed layout sql/table.h: 'table & 'table_list' now is different fields --- sql/item.cc | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'sql/item.cc') diff --git a/sql/item.cc b/sql/item.cc index bc6d32731c4..74a0072062b 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1324,17 +1324,15 @@ bool Item_ref::fix_fields(THD *thd,TABLE_LIST *tables, Item **reference) } } -/* - * The following conditional is changed as to correctly identify - * incorrect references in group functions or forward references - * with sub-select's / derived tables, while it prevents this - * check when Item_ref is created in an expression involving - * summing function, which is to be placed in the user variable. - * - */ - + /* + The following conditional is changed as to correctly identify + incorrect references in group functions or forward references + with sub-select's / derived tables, while it prevents this + check when Item_ref is created in an expression involving + summing function, which is to be placed in the user variable. + */ if (((*ref)->with_sum_func && name && - (depended_from || + (depended_from || !(thd->lex.current_select->linkage != GLOBAL_OPTIONS_TYPE && thd->lex.current_select->select_lex()->having_fix_field))) || !(*ref)->fixed) -- cgit v1.2.1 From 25ec248319e6b0473ffcadc97c1118023bbae80f Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 26 Jun 2003 15:07:42 +0300 Subject: Item::str_value can't be used for storing value (fixed error in Item_cache_str) sql/item.cc: Item::str_value can't be used for storing value sql/item.h: Item::str_value can't be used for storing value --- sql/item.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'sql/item.cc') diff --git a/sql/item.cc b/sql/item.cc index 804963b4c9a..755bcc5c77b 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -1630,11 +1630,11 @@ Item_cache* Item_cache::get_cache(Item_result type) void Item_cache_str::store(Item *item) { - str_value.set(buffer, sizeof(buffer), item->charset()); - value= item->str_result(&str_value); + value_buff.set(buffer, sizeof(buffer), item->charset()); + value= item->str_result(&value_buff); if ((null_value= item->null_value)) value= 0; - else if (value != &str_value) + else if (value != &value_buff) { /* We copy string value to avoid changing value if 'item' is table field @@ -1644,10 +1644,10 @@ void Item_cache_str::store(Item *item) (select c from t1 where a=t2.a) from t2; */ - str_value.copy(*value); - value= &str_value; + value_buff.copy(*value); + value= &value_buff; } - + set_charset(&item->collation); } double Item_cache_str::val() { -- cgit v1.2.1