Lines 50-56
Link Here
|
50 |
CHARSET_INFO *collation; |
50 |
CHARSET_INFO *collation; |
51 |
enum Derivation derivation; |
51 |
enum Derivation derivation; |
52 |
uint repertoire; |
52 |
uint repertoire; |
53 |
|
53 |
|
54 |
void set_repertoire_from_charset(CHARSET_INFO *cs) |
54 |
void set_repertoire_from_charset(CHARSET_INFO *cs) |
55 |
{ |
55 |
{ |
56 |
repertoire= cs->state & MY_CS_PUREASCII ? |
56 |
repertoire= cs->state & MY_CS_PUREASCII ? |
Lines 69-75
Link Here
|
69 |
set_repertoire_from_charset(collation_arg); |
69 |
set_repertoire_from_charset(collation_arg); |
70 |
} |
70 |
} |
71 |
void set(DTCollation &dt) |
71 |
void set(DTCollation &dt) |
72 |
{ |
72 |
{ |
73 |
collation= dt.collation; |
73 |
collation= dt.collation; |
74 |
derivation= dt.derivation; |
74 |
derivation= dt.derivation; |
75 |
repertoire= dt.repertoire; |
75 |
repertoire= dt.repertoire; |
Lines 271-277
Link Here
|
271 |
for the purpose of name resolution. The first and last name resolution |
271 |
for the purpose of name resolution. The first and last name resolution |
272 |
table references allow us to search only in a sub-tree of the nested |
272 |
table references allow us to search only in a sub-tree of the nested |
273 |
join tree in a FROM clause. This is needed for NATURAL JOIN, JOIN ... USING |
273 |
join tree in a FROM clause. This is needed for NATURAL JOIN, JOIN ... USING |
274 |
and JOIN ... ON. |
274 |
and JOIN ... ON. |
275 |
*/ |
275 |
*/ |
276 |
TABLE_LIST *first_name_resolution_table; |
276 |
TABLE_LIST *first_name_resolution_table; |
277 |
/* |
277 |
/* |
Lines 425-431
Link Here
|
425 |
argp in/out IN: Analysis parameter |
425 |
argp in/out IN: Analysis parameter |
426 |
OUT: Parameter to be passed to the transformer |
426 |
OUT: Parameter to be passed to the transformer |
427 |
|
427 |
|
428 |
RETURN |
428 |
RETURN |
429 |
TRUE Invoke the transformer |
429 |
TRUE Invoke the transformer |
430 |
FALSE Don't do it |
430 |
FALSE Don't do it |
431 |
|
431 |
|
Lines 458-464
Link Here
|
458 |
enum cond_result { COND_UNDEF,COND_OK,COND_TRUE,COND_FALSE }; |
458 |
enum cond_result { COND_UNDEF,COND_OK,COND_TRUE,COND_FALSE }; |
459 |
|
459 |
|
460 |
enum traverse_order { POSTFIX, PREFIX }; |
460 |
enum traverse_order { POSTFIX, PREFIX }; |
461 |
|
461 |
|
462 |
/* Reuse size, only used by SP local variable assignment, otherwize 0 */ |
462 |
/* Reuse size, only used by SP local variable assignment, otherwize 0 */ |
463 |
uint rsize; |
463 |
uint rsize; |
464 |
|
464 |
|
Lines 680-695
Link Here
|
680 |
virtual uint decimal_precision() const; |
680 |
virtual uint decimal_precision() const; |
681 |
inline int decimal_int_part() const |
681 |
inline int decimal_int_part() const |
682 |
{ return my_decimal_int_part(decimal_precision(), decimals); } |
682 |
{ return my_decimal_int_part(decimal_precision(), decimals); } |
683 |
/* |
683 |
/* |
684 |
Returns true if this is constant (during query execution, i.e. its value |
684 |
Returns true if this is constant (during query execution, i.e. its value |
685 |
will not change until next fix_fields) and its value is known. |
685 |
will not change until next fix_fields) and its value is known. |
686 |
*/ |
686 |
*/ |
687 |
virtual bool const_item() const { return used_tables() == 0; } |
687 |
virtual bool const_item() const { return used_tables() == 0; } |
688 |
/* |
688 |
/* |
689 |
Returns true if this is constant but its value may be not known yet. |
689 |
Returns true if this is constant but its value may be not known yet. |
690 |
(Can be used for parameters of prep. stmts or of stored procedures.) |
690 |
(Can be used for parameters of prep. stmts or of stored procedures.) |
691 |
*/ |
691 |
*/ |
692 |
virtual bool const_during_execution() const |
692 |
virtual bool const_during_execution() const |
693 |
{ return (used_tables() & ~PARAM_TABLE_BIT) == 0; } |
693 |
{ return (used_tables() & ~PARAM_TABLE_BIT) == 0; } |
694 |
/* |
694 |
/* |
695 |
This is an essential method for correct functioning of VIEWS. |
695 |
This is an essential method for correct functioning of VIEWS. |
Lines 716-723
Link Here
|
716 |
virtual bool get_date_result(MYSQL_TIME *ltime,uint fuzzydate) |
716 |
virtual bool get_date_result(MYSQL_TIME *ltime,uint fuzzydate) |
717 |
{ return get_date(ltime,fuzzydate); } |
717 |
{ return get_date(ltime,fuzzydate); } |
718 |
/* |
718 |
/* |
719 |
The method allows to determine nullness of a complex expression |
719 |
The method allows to determine nullness of a complex expression |
720 |
without fully evaluating it, instead of calling val/result*() then |
720 |
without fully evaluating it, instead of calling val/result*() then |
721 |
checking null_value. Used in Item_func_isnull/Item_func_isnotnull |
721 |
checking null_value. Used in Item_func_isnull/Item_func_isnotnull |
722 |
and Item_sum_count/Item_sum_count_distinct. |
722 |
and Item_sum_count/Item_sum_count_distinct. |
723 |
Any new item which can be NULL must implement this method. |
723 |
Any new item which can be NULL must implement this method. |
Lines 769-778
Link Here
|
769 |
|
769 |
|
770 |
/* |
770 |
/* |
771 |
This function performs a generic "compilation" of the Item tree. |
771 |
This function performs a generic "compilation" of the Item tree. |
772 |
The process of compilation is assumed to go as follows: |
772 |
The process of compilation is assumed to go as follows: |
773 |
|
773 |
|
774 |
compile() |
774 |
compile() |
775 |
{ |
775 |
{ |
776 |
if (this->*some_analyzer(...)) |
776 |
if (this->*some_analyzer(...)) |
777 |
{ |
777 |
{ |
778 |
compile children if any; |
778 |
compile children if any; |
Lines 781-787
Link Here
|
781 |
} |
781 |
} |
782 |
|
782 |
|
783 |
i.e. analysis is performed top-down while transformation is done |
783 |
i.e. analysis is performed top-down while transformation is done |
784 |
bottom-up. |
784 |
bottom-up. |
785 |
*/ |
785 |
*/ |
786 |
virtual Item* compile(Item_analyzer analyzer, byte **arg_p, |
786 |
virtual Item* compile(Item_analyzer analyzer, byte **arg_p, |
787 |
Item_transformer transformer, byte *arg_t) |
787 |
Item_transformer transformer, byte *arg_t) |
Lines 806-815
Link Here
|
806 |
virtual bool reset_query_id_processor(byte *query_id_arg) { return 0; } |
806 |
virtual bool reset_query_id_processor(byte *query_id_arg) { return 0; } |
807 |
virtual bool is_expensive_processor(byte *arg) { return 0; } |
807 |
virtual bool is_expensive_processor(byte *arg) { return 0; } |
808 |
virtual bool subst_argument_checker(byte **arg) |
808 |
virtual bool subst_argument_checker(byte **arg) |
809 |
{ |
809 |
{ |
810 |
if (*arg) |
810 |
if (*arg) |
811 |
*arg= NULL; |
811 |
*arg= NULL; |
812 |
return TRUE; |
812 |
return TRUE; |
813 |
} |
813 |
} |
814 |
|
814 |
|
815 |
virtual Item *equal_fields_propagator(byte * arg) { return this; } |
815 |
virtual Item *equal_fields_propagator(byte * arg) { return this; } |
Lines 873-879
Link Here
|
873 |
virtual Field::geometry_type get_geometry_type() const |
873 |
virtual Field::geometry_type get_geometry_type() const |
874 |
{ return Field::GEOM_GEOMETRY; }; |
874 |
{ return Field::GEOM_GEOMETRY; }; |
875 |
String *check_well_formed_result(String *str, bool send_error= 0); |
875 |
String *check_well_formed_result(String *str, bool send_error= 0); |
876 |
bool eq_by_collation(Item *item, bool binary_cmp, CHARSET_INFO *cs); |
876 |
bool eq_by_collation(Item *item, bool binary_cmp, CHARSET_INFO *cs); |
877 |
}; |
877 |
}; |
878 |
|
878 |
|
879 |
|
879 |
|
Lines 939-950
Link Here
|
939 |
|
939 |
|
940 |
public: |
940 |
public: |
941 |
inline void make_field(Send_field *field); |
941 |
inline void make_field(Send_field *field); |
942 |
|
942 |
|
943 |
inline bool const_item() const; |
943 |
inline bool const_item() const; |
944 |
|
944 |
|
945 |
inline int save_in_field(Field *field, bool no_conversions); |
945 |
inline int save_in_field(Field *field, bool no_conversions); |
946 |
inline bool send(Protocol *protocol, String *str); |
946 |
inline bool send(Protocol *protocol, String *str); |
947 |
}; |
947 |
}; |
948 |
|
948 |
|
949 |
/***************************************************************************** |
949 |
/***************************************************************************** |
950 |
Item_sp_variable inline implementation. |
950 |
Item_sp_variable inline implementation. |
Lines 991-997
Link Here
|
991 |
Item_result m_result_type; |
991 |
Item_result m_result_type; |
992 |
enum_field_types m_field_type; |
992 |
enum_field_types m_field_type; |
993 |
public: |
993 |
public: |
994 |
/* |
994 |
/* |
995 |
Position of this reference to SP variable in the statement (the |
995 |
Position of this reference to SP variable in the statement (the |
996 |
statement itself is in sp_instr_stmt::m_query). |
996 |
statement itself is in sp_instr_stmt::m_query). |
997 |
This is valid only for references to SP variables in statements, |
997 |
This is valid only for references to SP variables in statements, |
Lines 1112-1120
Link Here
|
1112 |
|
1112 |
|
1113 |
|
1113 |
|
1114 |
/* |
1114 |
/* |
1115 |
NAME_CONST(given_name, const_value). |
1115 |
NAME_CONST(given_name, const_value). |
1116 |
This 'function' has all properties of the supplied const_value (which is |
1116 |
This 'function' has all properties of the supplied const_value (which is |
1117 |
assumed to be a literal constant), and the name given_name. |
1117 |
assumed to be a literal constant), and the name given_name. |
1118 |
|
1118 |
|
1119 |
This is used to replace references to SP variables when we write PROCEDURE |
1119 |
This is used to replace references to SP variables when we write PROCEDURE |
1120 |
statements into the binary log. |
1120 |
statements into the binary log. |
Lines 1186-1195
Link Here
|
1186 |
class Item_ident :public Item |
1186 |
class Item_ident :public Item |
1187 |
{ |
1187 |
{ |
1188 |
protected: |
1188 |
protected: |
1189 |
/* |
1189 |
/* |
1190 |
We have to store initial values of db_name, table_name and field_name |
1190 |
We have to store initial values of db_name, table_name and field_name |
1191 |
to be able to restore them during cleanup() because they can be |
1191 |
to be able to restore them during cleanup() because they can be |
1192 |
updated during fix_fields() to values from Field object and life-time |
1192 |
updated during fix_fields() to values from Field object and life-time |
1193 |
of those is shorter than life-time of Item_field. |
1193 |
of those is shorter than life-time of Item_field. |
1194 |
*/ |
1194 |
*/ |
1195 |
const char *orig_db_name; |
1195 |
const char *orig_db_name; |
Lines 1202-1210
Link Here
|
1202 |
const char *table_name; |
1202 |
const char *table_name; |
1203 |
const char *field_name; |
1203 |
const char *field_name; |
1204 |
bool alias_name_used; /* true if item was resolved against alias */ |
1204 |
bool alias_name_used; /* true if item was resolved against alias */ |
1205 |
/* |
1205 |
/* |
1206 |
Cached value of index for this field in table->field array, used by prep. |
1206 |
Cached value of index for this field in table->field array, used by prep. |
1207 |
stmts for speeding up their re-execution. Holds NO_CACHED_FIELD_INDEX |
1207 |
stmts for speeding up their re-execution. Holds NO_CACHED_FIELD_INDEX |
1208 |
if index value is not known. |
1208 |
if index value is not known. |
1209 |
*/ |
1209 |
*/ |
1210 |
uint cached_field_index; |
1210 |
uint cached_field_index; |
Lines 1402-1408
Link Here
|
1402 |
{ |
1402 |
{ |
1403 |
save_in_field(result_field, no_conversions); |
1403 |
save_in_field(result_field, no_conversions); |
1404 |
} |
1404 |
} |
1405 |
}; |
1405 |
}; |
1406 |
|
1406 |
|
1407 |
/* Item represents one placeholder ('?') of prepared statement */ |
1407 |
/* Item represents one placeholder ('?') of prepared statement */ |
1408 |
|
1408 |
|
Lines 1766-1774
Link Here
|
1766 |
enum_field_types field_type() const { return MYSQL_TYPE_VARCHAR; } |
1766 |
enum_field_types field_type() const { return MYSQL_TYPE_VARCHAR; } |
1767 |
bool basic_const_item() const { return 1; } |
1767 |
bool basic_const_item() const { return 1; } |
1768 |
bool eq(const Item *item, bool binary_cmp) const; |
1768 |
bool eq(const Item *item, bool binary_cmp) const; |
1769 |
Item *clone_item() |
1769 |
Item *clone_item() |
1770 |
{ |
1770 |
{ |
1771 |
return new Item_string(name, str_value.ptr(), |
1771 |
return new Item_string(name, str_value.ptr(), |
1772 |
str_value.length(), collation.collation); |
1772 |
str_value.length(), collation.collation); |
1773 |
} |
1773 |
} |
1774 |
Item *safe_charset_converter(CHARSET_INFO *tocs); |
1774 |
Item *safe_charset_converter(CHARSET_INFO *tocs); |
Lines 1842-1849
Link Here
|
1842 |
Item_hex_string(const char *str,uint str_length); |
1842 |
Item_hex_string(const char *str,uint str_length); |
1843 |
enum Type type() const { return VARBIN_ITEM; } |
1843 |
enum Type type() const { return VARBIN_ITEM; } |
1844 |
double val_real() |
1844 |
double val_real() |
1845 |
{ |
1845 |
{ |
1846 |
DBUG_ASSERT(fixed == 1); |
1846 |
DBUG_ASSERT(fixed == 1); |
1847 |
return (double) (ulonglong) Item_hex_string::val_int(); |
1847 |
return (double) (ulonglong) Item_hex_string::val_int(); |
1848 |
} |
1848 |
} |
1849 |
longlong val_int(); |
1849 |
longlong val_int(); |
Lines 1907-1920
Link Here
|
1907 |
This constructor is used in two scenarios: |
1907 |
This constructor is used in two scenarios: |
1908 |
A) *item = NULL |
1908 |
A) *item = NULL |
1909 |
No initialization is performed, fix_fields() call will be necessary. |
1909 |
No initialization is performed, fix_fields() call will be necessary. |
1910 |
|
1910 |
|
1911 |
B) *item points to an Item this Item_ref will refer to. This is |
1911 |
B) *item points to an Item this Item_ref will refer to. This is |
1912 |
used for GROUP BY. fix_fields() will not be called in this case, |
1912 |
used for GROUP BY. fix_fields() will not be called in this case, |
1913 |
so we call set_properties to make this item "fixed". set_properties |
1913 |
so we call set_properties to make this item "fixed". set_properties |
1914 |
performs a subset of action Item_ref::fix_fields does, and this subset |
1914 |
performs a subset of action Item_ref::fix_fields does, and this subset |
1915 |
is enough for Item_ref's used in GROUP BY. |
1915 |
is enough for Item_ref's used in GROUP BY. |
1916 |
|
1916 |
|
1917 |
TODO we probably fix a superset of problems like in BUG#6658. Check this |
1917 |
TODO we probably fix a superset of problems like in BUG#6658. Check this |
1918 |
with Bar, and if we have a more broader set of problems like this. |
1918 |
with Bar, and if we have a more broader set of problems like this. |
1919 |
*/ |
1919 |
*/ |
1920 |
Item_ref(Name_resolution_context *context_arg, Item **item, |
1920 |
Item_ref(Name_resolution_context *context_arg, Item **item, |
Lines 1926-1932
Link Here
|
1926 |
:Item_ident(thd, item), result_field(item->result_field), ref(item->ref) {} |
1926 |
:Item_ident(thd, item), result_field(item->result_field), ref(item->ref) {} |
1927 |
enum Type type() const { return REF_ITEM; } |
1927 |
enum Type type() const { return REF_ITEM; } |
1928 |
bool eq(const Item *item, bool binary_cmp) const |
1928 |
bool eq(const Item *item, bool binary_cmp) const |
1929 |
{ |
1929 |
{ |
1930 |
Item *it= ((Item *) item)->real_item(); |
1930 |
Item *it= ((Item *) item)->real_item(); |
1931 |
return ref && (*ref)->eq(it, binary_cmp); |
1931 |
return ref && (*ref)->eq(it, binary_cmp); |
1932 |
} |
1932 |
} |
Lines 1952-1965
Link Here
|
1952 |
Field *get_tmp_table_field() |
1952 |
Field *get_tmp_table_field() |
1953 |
{ return result_field ? result_field : (*ref)->get_tmp_table_field(); } |
1953 |
{ return result_field ? result_field : (*ref)->get_tmp_table_field(); } |
1954 |
Item *get_tmp_table_item(THD *thd); |
1954 |
Item *get_tmp_table_item(THD *thd); |
1955 |
table_map used_tables() const |
1955 |
table_map used_tables() const |
1956 |
{ |
1956 |
{ |
1957 |
return depended_from ? OUTER_REF_TABLE_BIT : (*ref)->used_tables(); |
1957 |
return depended_from ? OUTER_REF_TABLE_BIT : (*ref)->used_tables(); |
1958 |
} |
1958 |
} |
1959 |
void update_used_tables() |
1959 |
void update_used_tables() |
1960 |
{ |
1960 |
{ |
1961 |
if (!depended_from) |
1961 |
if (!depended_from) |
1962 |
(*ref)->update_used_tables(); |
1962 |
(*ref)->update_used_tables(); |
1963 |
} |
1963 |
} |
1964 |
table_map not_null_tables() const { return (*ref)->not_null_tables(); } |
1964 |
table_map not_null_tables() const { return (*ref)->not_null_tables(); } |
1965 |
void set_result_field(Field *field) { result_field= field; } |
1965 |
void set_result_field(Field *field) { result_field= field; } |
Lines 1999-2005
Link Here
|
1999 |
} |
1999 |
} |
2000 |
bool check_cols(uint c) |
2000 |
bool check_cols(uint c) |
2001 |
{ |
2001 |
{ |
2002 |
return ref && result_type() == ROW_RESULT ? (*ref)->check_cols(c) |
2002 |
return ref && result_type() == ROW_RESULT ? (*ref)->check_cols(c) |
2003 |
: Item::check_cols(c); |
2003 |
: Item::check_cols(c); |
2004 |
} |
2004 |
} |
2005 |
bool null_inside() |
2005 |
bool null_inside() |
Lines 2007-2013
Link Here
|
2007 |
return ref && result_type() == ROW_RESULT ? (*ref)->null_inside() : 0; |
2007 |
return ref && result_type() == ROW_RESULT ? (*ref)->null_inside() : 0; |
2008 |
} |
2008 |
} |
2009 |
void bring_value() |
2009 |
void bring_value() |
2010 |
{ |
2010 |
{ |
2011 |
if (ref && result_type() == ROW_RESULT) |
2011 |
if (ref && result_type() == ROW_RESULT) |
2012 |
(*ref)->bring_value(); |
2012 |
(*ref)->bring_value(); |
2013 |
} |
2013 |
} |
Lines 2166-2174
Link Here
|
2166 |
The following class is used to optimize comparing of date and bigint columns |
2166 |
The following class is used to optimize comparing of date and bigint columns |
2167 |
We need to save the original item ('ref') to be able to call |
2167 |
We need to save the original item ('ref') to be able to call |
2168 |
ref->save_in_field(). This is used to create index search keys. |
2168 |
ref->save_in_field(). This is used to create index search keys. |
2169 |
|
2169 |
|
2170 |
An instance of Item_int_with_ref may have signed or unsigned integer value. |
2170 |
An instance of Item_int_with_ref may have signed or unsigned integer value. |
2171 |
|
2171 |
|
2172 |
*/ |
2172 |
*/ |
2173 |
|
2173 |
|
2174 |
class Item_int_with_ref :public Item_int |
2174 |
class Item_int_with_ref :public Item_int |
Lines 2230-2236
Link Here
|
2230 |
int err; |
2230 |
int err; |
2231 |
return null_value ? LL(0) : my_strntoll(str_value.charset(),str_value.ptr(), |
2231 |
return null_value ? LL(0) : my_strntoll(str_value.charset(),str_value.ptr(), |
2232 |
str_value.length(),10, (char**) 0, |
2232 |
str_value.length(),10, (char**) 0, |
2233 |
&err); |
2233 |
&err); |
2234 |
} |
2234 |
} |
2235 |
String *val_str(String*); |
2235 |
String *val_str(String*); |
2236 |
my_decimal *val_decimal(my_decimal *); |
2236 |
my_decimal *val_decimal(my_decimal *); |
Lines 2362-2368
Link Here
|
2362 |
{ |
2362 |
{ |
2363 |
return Item_field::save_in_field(field_arg, no_conversions); |
2363 |
return Item_field::save_in_field(field_arg, no_conversions); |
2364 |
} |
2364 |
} |
2365 |
/* |
2365 |
/* |
2366 |
We use RAND_TABLE_BIT to prevent Item_insert_value from |
2366 |
We use RAND_TABLE_BIT to prevent Item_insert_value from |
2367 |
being treated as a constant and precalculated before execution |
2367 |
being treated as a constant and precalculated before execution |
2368 |
*/ |
2368 |
*/ |
Lines 2478-2491
Link Here
|
2478 |
Item *example; |
2478 |
Item *example; |
2479 |
table_map used_table_map; |
2479 |
table_map used_table_map; |
2480 |
/* |
2480 |
/* |
2481 |
Field that this object will get value from. This is set/used by |
2481 |
Field that this object will get value from. This is set/used by |
2482 |
index-based subquery engines to detect and remove the equality injected |
2482 |
index-based subquery engines to detect and remove the equality injected |
2483 |
by IN->EXISTS transformation. |
2483 |
by IN->EXISTS transformation. |
2484 |
For all other uses of Item_cache, cached_field doesn't matter. |
2484 |
For all other uses of Item_cache, cached_field doesn't matter. |
2485 |
*/ |
2485 |
*/ |
2486 |
Field *cached_field; |
2486 |
Field *cached_field; |
2487 |
public: |
2487 |
public: |
2488 |
Item_cache(): example(0), used_table_map(0), cached_field(0) |
2488 |
Item_cache(): example(0), used_table_map(0), cached_field(0) |
2489 |
{ |
2489 |
{ |
2490 |
fixed= 1; null_value= 1; |
2490 |
fixed= 1; null_value= 1; |
2491 |
} |
2491 |
} |
Lines 2510-2517
Link Here
|
2510 |
table_map used_tables() const { return used_table_map; } |
2510 |
table_map used_tables() const { return used_table_map; } |
2511 |
virtual void keep_array() {} |
2511 |
virtual void keep_array() {} |
2512 |
void print(String *str); |
2512 |
void print(String *str); |
2513 |
bool eq_def(Field *field) |
2513 |
bool eq_def(Field *field) |
2514 |
{ |
2514 |
{ |
2515 |
return cached_field ? cached_field->eq_def (field) : FALSE; |
2515 |
return cached_field ? cached_field->eq_def (field) : FALSE; |
2516 |
} |
2516 |
} |
2517 |
bool eq(const Item *item, bool binary_cmp) const |
2517 |
bool eq(const Item *item, bool binary_cmp) const |
Lines 2575-2581
Link Here
|
2575 |
char buffer[STRING_BUFFER_USUAL_SIZE]; |
2575 |
char buffer[STRING_BUFFER_USUAL_SIZE]; |
2576 |
String *value, value_buff; |
2576 |
String *value, value_buff; |
2577 |
bool is_varbinary; |
2577 |
bool is_varbinary; |
2578 |
|
2578 |
|
2579 |
public: |
2579 |
public: |
2580 |
Item_cache_str(const Item *item) : |
2580 |
Item_cache_str(const Item *item) : |
2581 |
Item_cache(), value(0), |
2581 |
Item_cache(), value(0), |
Lines 2602-2610
Link Here
|
2602 |
public: |
2602 |
public: |
2603 |
Item_cache_row() |
2603 |
Item_cache_row() |
2604 |
:Item_cache(), values(0), item_count(2), save_array(0) {} |
2604 |
:Item_cache(), values(0), item_count(2), save_array(0) {} |
2605 |
|
2605 |
|
2606 |
/* |
2606 |
/* |
2607 |
'allocate' used only in row transformer, to preallocate space for row |
2607 |
'allocate' used only in row transformer, to preallocate space for row |
2608 |
cache. |
2608 |
cache. |
2609 |
*/ |
2609 |
*/ |
2610 |
bool allocate(uint num); |
2610 |
bool allocate(uint num); |
Lines 2641-2647
Link Here
|
2641 |
}; |
2641 |
}; |
2642 |
|
2642 |
|
2643 |
enum Item_result result_type() const { return ROW_RESULT; } |
2643 |
enum Item_result result_type() const { return ROW_RESULT; } |
2644 |
|
2644 |
|
2645 |
uint cols() { return item_count; } |
2645 |
uint cols() { return item_count; } |
2646 |
Item *element_index(uint i) { return values[i]; } |
2646 |
Item *element_index(uint i) { return values[i]; } |
2647 |
Item **addr(uint i) { return (Item **) (values + i); } |
2647 |
Item **addr(uint i) { return (Item **) (values + i); } |