diff options
author | unknown <dlenev@brandersnatch.localdomain> | 2004-03-31 22:17:10 +0400 |
---|---|---|
committer | unknown <dlenev@brandersnatch.localdomain> | 2004-03-31 22:17:10 +0400 |
commit | e6d766154709c920c010a96fb8d10295cd694dbc (patch) | |
tree | 955a27f6963da17e12ea042cedc8a8ced053e0e6 /sql/item.cc | |
parent | 0dd6f77d47a9fbb857cf906ed025ebbc44137116 (diff) | |
parent | d2906f0ed07bc06161d749d03ffa8acb7c09c785 (diff) | |
download | mariadb-git-e6d766154709c920c010a96fb8d10295cd694dbc.tar.gz |
Merge of fix for bug #2050 and bug #3307
BitKeeper/etc/logging_ok:
auto-union
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_acl.cc:
Auto merged
sql/sql_base.cc:
Manual merge
Diffstat (limited to 'sql/item.cc')
-rw-r--r-- | sql/item.cc | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/sql/item.cc b/sql/item.cc index 48e35f06ec3..9cad60b8197 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -103,9 +103,12 @@ void Item::print_item_w_name(String *str) Item_ident::Item_ident(const char *db_name_par,const char *table_name_par, const char *field_name_par) - :changed_during_fix_field(0), db_name(db_name_par), - table_name(table_name_par), field_name(field_name_par), - depended_from(0) + : + orig_db_name(db_name_par), orig_table_name(table_name_par), + orig_field_name(field_name_par), changed_during_fix_field(0), + db_name(db_name_par), table_name(table_name_par), + field_name(field_name_par), cached_field_index(NO_CACHED_FIELD_INDEX), + cached_table(0), depended_from(0) { name = (char*) field_name_par; } @@ -113,10 +116,15 @@ Item_ident::Item_ident(const char *db_name_par,const char *table_name_par, // Constructor used by Item_field & Item_ref (see Item comment) Item_ident::Item_ident(THD *thd, Item_ident *item) :Item(thd, item), + orig_db_name(item->orig_db_name), + orig_table_name(item->orig_table_name), + orig_field_name(item->orig_field_name), changed_during_fix_field(0), db_name(item->db_name), table_name(item->table_name), field_name(item->field_name), + cached_field_index(item->cached_field_index), + cached_table(item->cached_table), depended_from(item->depended_from) {} @@ -128,6 +136,9 @@ void Item_ident::cleanup() *changed_during_fix_field= this; changed_during_fix_field= 0; } + db_name= orig_db_name; + table_name= orig_table_name; + field_name= orig_field_name; } bool Item_ident::remove_dependence_processor(byte * arg) @@ -309,6 +320,15 @@ Item_field::Item_field(Field *f) fixed= 1; } +Item_field::Item_field(THD *thd, Field *f) + :Item_ident(NullS, thd->strdup(f->table_name), + thd->strdup(f->field_name)) +{ + set_field(f); + collation.set(DERIVATION_IMPLICIT); + fixed= 1; +} + // Constructor need to process subselect with temporary tables (see Item) Item_field::Item_field(THD *thd, Item_field *item) :Item_ident(thd, item), |