diff options
author | monty@mysql.com/narttu.mysql.fi <> | 2006-12-15 01:01:52 +0200 |
---|---|---|
committer | monty@mysql.com/narttu.mysql.fi <> | 2006-12-15 01:01:52 +0200 |
commit | a6481aa4c7016c996a9787db4824307c705ec8a1 (patch) | |
tree | b60f635d3126e8d0f1321f0187390d7cf8496558 /sql/item.h | |
parent | 95564bfea31aef4686ae4e7c6d422e2a20a5d73a (diff) | |
parent | 88dd873de0d5dc6e8f262268f925596a60b58704 (diff) | |
download | mariadb-git-a6481aa4c7016c996a9787db4824307c705ec8a1.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mysql.com:/home/my/mysql-5.0
Diffstat (limited to 'sql/item.h')
-rw-r--r-- | sql/item.h | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/sql/item.h b/sql/item.h index e0451febb1e..ea7b757c931 100644 --- a/sql/item.h +++ b/sql/item.h @@ -651,7 +651,7 @@ public: */ virtual bool basic_const_item() const { return 0; } /* cloning of constant items (0 if it is not const) */ - virtual Item *new_item() { return 0; } + virtual Item *clone_item() { return 0; } virtual cond_result eq_cmp_result() const { return COND_OK; } inline uint float_length(uint decimals_par) const { return decimals != NOT_FIXED_DEC ? (DBL_DIG+2+decimals_par) : DBL_DIG+8;} @@ -782,7 +782,7 @@ public: virtual bool collect_item_field_processor(byte * arg) { return 0; } virtual bool find_item_in_field_list_processor(byte *arg) { return 0; } virtual bool change_context_processor(byte *context) { return 0; } - virtual bool reset_query_id_processor(byte *query_id) { return 0; } + virtual bool reset_query_id_processor(byte *query_id_arg) { return 0; } virtual bool is_expensive_processor(byte *arg) { return 0; } virtual bool subst_argument_checker(byte **arg) { @@ -806,11 +806,11 @@ public: For SP local variable returns address of pointer to Item representing its current value and pointer passed via parameter otherwise. */ - virtual Item **this_item_addr(THD *thd, Item **addr) { return addr; } + virtual Item **this_item_addr(THD *thd, Item **addr_arg) { return addr_arg; } // Row emulation virtual uint cols() { return 1; } - virtual Item* el(uint i) { return this; } + virtual Item* element_index(uint i) { return this; } virtual Item** addr(uint i) { return 0; } virtual bool check_cols(uint c); // It is not row => null inside is impossible @@ -1076,7 +1076,8 @@ class Item_name_const : public Item Item *value_item; Item *name_item; public: - Item_name_const(Item *name, Item *val): value_item(val), name_item(name) + Item_name_const(Item *name_arg, Item *val): + value_item(val), name_item(name_arg) { Item::maybe_null= TRUE; } @@ -1296,7 +1297,7 @@ public: Item *equal_fields_propagator(byte *arg); bool set_no_const_sub(byte *arg); Item *replace_equal_field(byte *arg); - inline uint32 max_disp_length() { return field->max_length(); } + inline uint32 max_disp_length() { return field->max_display_length(); } Item_field *filed_for_view_update() { return this; } Item *safe_charset_converter(CHARSET_INFO *tocs); int fix_outer_field(THD *thd, Field **field, Item **reference); @@ -1330,7 +1331,7 @@ public: /* to prevent drop fixed flag (no need parent cleanup call) */ void cleanup() {} bool basic_const_item() const { return 1; } - Item *new_item() { return new Item_null(name); } + Item *clone_item() { return new Item_null(name); } bool is_null() { return 1; } void print(String *str) { str->append(STRING_WITH_LEN("NULL")); } Item *safe_charset_converter(CHARSET_INFO *tocs); @@ -1477,7 +1478,7 @@ public: basic_const_item returned TRUE. */ Item *safe_charset_converter(CHARSET_INFO *tocs); - Item *new_item(); + Item *clone_item(); /* Implement by-value equality evaluation if parameter value is set and is a basic constant (integer, real or string). @@ -1509,7 +1510,7 @@ public: String *val_str(String*); int save_in_field(Field *field, bool no_conversions); bool basic_const_item() const { return 1; } - Item *new_item() { return new Item_int(name,value,max_length); } + Item *clone_item() { return new Item_int(name,value,max_length); } // to prevent drop fixed flag (no need parent cleanup call) void cleanup() {} void print(String *str); @@ -1529,7 +1530,7 @@ public: double val_real() { DBUG_ASSERT(fixed == 1); return ulonglong2double((ulonglong)value); } String *val_str(String*); - Item *new_item() { return new Item_uint(name,max_length); } + Item *clone_item() { return new Item_uint(name,max_length); } int save_in_field(Field *field, bool no_conversions); void print(String *str); Item_num *neg (); @@ -1560,7 +1561,7 @@ public: my_decimal *val_decimal(my_decimal *val) { return &decimal_value; } int save_in_field(Field *field, bool no_conversions); bool basic_const_item() const { return 1; } - Item *new_item() + Item *clone_item() { return new Item_decimal(name, &decimal_value, decimals, max_length); } @@ -1618,7 +1619,7 @@ public: bool basic_const_item() const { return 1; } // to prevent drop fixed flag (no need parent cleanup call) void cleanup() {} - Item *new_item() + Item *clone_item() { return new Item_float(name, value, decimals, max_length); } Item_num *neg() { value= -value; return this; } void print(String *str); @@ -1703,7 +1704,7 @@ public: enum_field_types field_type() const { return MYSQL_TYPE_VARCHAR; } bool basic_const_item() const { return 1; } bool eq(const Item *item, bool binary_cmp) const; - Item *new_item() + Item *clone_item() { return new Item_string(name, str_value.ptr(), str_value.length(), collation.collation); @@ -1754,9 +1755,9 @@ class Item_return_int :public Item_int { enum_field_types int_field_type; public: - Item_return_int(const char *name, uint length, + Item_return_int(const char *name_arg, uint length, enum_field_types field_type_arg) - :Item_int(name, 0, length), int_field_type(field_type_arg) + :Item_int(name_arg, 0, length), int_field_type(field_type_arg) { unsigned_flag=1; } @@ -2018,7 +2019,7 @@ public: { return ref->save_in_field(field, no_conversions); } - Item *new_item(); + Item *clone_item(); virtual Item *real_item() { return ref; } }; @@ -2451,8 +2452,8 @@ public: enum Item_result result_type() const { return ROW_RESULT; } uint cols() { return item_count; } - Item* el(uint i) { return values[i]; } - Item** addr(uint i) { return (Item **) (values + i); } + Item *element_index(uint i) { return values[i]; } + Item **addr(uint i) { return (Item **) (values + i); } bool check_cols(uint c); bool null_inside(); void bring_value(); |