summaryrefslogtreecommitdiff
path: root/sql/item.h
diff options
context:
space:
mode:
authorunknown <tsmith@ramayana.hindu.god>2007-08-01 18:40:02 -0600
committerunknown <tsmith@ramayana.hindu.god>2007-08-01 18:40:02 -0600
commit15835a5693da749cc9635d127ff708286831872e (patch)
tree7db31fdc56ff34260977557c78abc33869800671 /sql/item.h
parent7756406fa95cf4b8ddc1a473e1a273bed4474323 (diff)
parent31e33aba7b48150abfb361d3fe754ba739e7457d (diff)
downloadmariadb-git-15835a5693da749cc9635d127ff708286831872e.tar.gz
Merge tsmith@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into ramayana.hindu.god:/home/tsmith/m/bk/maint/51 mysql-test/r/show_check.result: Auto merged mysql-test/t/disabled.def: Auto merged mysql-test/t/show_check.test: Auto merged sql/handler.cc: Auto merged sql/handler.h: Auto merged sql/log.cc: Auto merged sql/set_var.cc: Auto merged sql/sql_base.cc: Auto merged sql/sql_class.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_delete.cc: Auto merged sql/sql_insert.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_select.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_yacc.yy: Auto merged sql/table.cc: Auto merged
Diffstat (limited to 'sql/item.h')
-rw-r--r--sql/item.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/sql/item.h b/sql/item.h
index 432da6c3a1c..ab39505bf5f 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -653,6 +653,7 @@ public:
int save_time_in_field(Field *field);
int save_date_in_field(Field *field);
+ int save_str_value_in_field(Field *field, String *result);
virtual Field *get_tmp_table_field() { return 0; }
/* This is also used to create fields in CREATE ... SELECT: */
@@ -1053,9 +1054,18 @@ public:
SP variable in query text.
*/
uint pos_in_query;
+ /*
+ Byte length of SP variable name in the statement (see pos_in_query).
+ The value of this field may differ from the name_length value because
+ name_length contains byte length of UTF8-encoded item name, but
+ the query string (see sp_instr_stmt::m_query) is currently stored with
+ a charset from the SET NAMES statement.
+ */
+ uint len_in_query;
Item_splocal(const LEX_STRING &sp_var_name, uint sp_var_idx,
- enum_field_types sp_var_type, uint pos_in_q= 0);
+ enum_field_types sp_var_type,
+ uint pos_in_q= 0, uint len_in_q= 0);
bool is_splocal() { return 1; } /* Needed for error checking */
@@ -2293,7 +2303,10 @@ public:
my_decimal *val_decimal(my_decimal *);
void make_field(Send_field *field) { item->make_field(field); }
void copy();
- int save_in_field(Field *field, bool no_conversions);
+ int save_in_field(Field *field, bool no_conversions)
+ {
+ return save_str_value_in_field(field, &str_value);
+ }
table_map used_tables() const { return (table_map) 1L; }
bool const_item() const { return 0; }
bool is_null() { return null_value; }