My Project
|
Public Member Functions | |
Item_insert_value (Name_resolution_context *context_arg, Item *a) | |
bool | eq (const Item *item, bool binary_cmp) const |
bool | fix_fields (THD *, Item **) |
virtual void | print (String *str, enum_query_type query_type) |
type_conversion_status | save_in_field (Field *field_arg, bool no_conversions) |
table_map | used_tables () const |
bool | walk (Item_processor processor, bool walk_subquery, uchar *args) |
Public Attributes | |
Item * | arg |
bool Item_insert_value::eq | ( | const Item * | item, |
bool | binary_cmp | ||
) | const [virtual] |
This function is called when:
Reimplemented from Item_field.
bool Item_insert_value::fix_fields | ( | THD * | thd, |
Item ** | reference | ||
) | [virtual] |
Resolve the name of a column reference.
The method resolves the column reference represented by 'this' as a column present in one of: FROM clause, SELECT clause, GROUP BY clause of a query Q, or in outer queries that contain Q.
The name resolution algorithm used is (where [T_j] is an optional table name that qualifies the column name):
resolve_column_reference([T_j].col_ref_i) { search for a column or derived column named col_ref_i [in table T_j] in the FROM clause of Q; if such a column is NOT found AND // Lookup in outer queries. there are outer queries { for each outer query Q_k beginning from the inner-most one { search for a column or derived column named col_ref_i [in table T_j] in the FROM clause of Q_k; if such a column is not found Search for a column or derived column named col_ref_i [in table T_j] in the SELECT and GROUP clauses of Q_k. } } }
Notice that compared to Item_ref::fix_fields, here we first search the FROM clause, and then we search the SELECT and GROUP BY clauses.
[in] | thd | current thread |
[in,out] | reference | view column if this item was resolved to a view column |
TRUE | if error |
FALSE | on success |
Reimplemented from Item_field.
void Item_insert_value::print | ( | String * | str, |
enum_query_type | query_type | ||
) | [virtual] |
This method is used for to:
For more information about view definition query, INFORMATION_SCHEMA query and why they should be generated from the Item-tree,
Reimplemented from Item_field.
type_conversion_status Item_insert_value::save_in_field | ( | Field * | field, |
bool | no_conversions | ||
) | [inline, virtual] |
Save a temporal value in packed longlong format into a Field. Used in optimizer.
OUT | field The field to set the value to. |
0 | On success. |
>0 | In error. |
Reimplemented from Item_field.