diff options
author | unknown <venu@myvenu.com> | 2003-04-04 12:33:17 -0500 |
---|---|---|
committer | unknown <venu@myvenu.com> | 2003-04-04 12:33:17 -0500 |
commit | f2f748c6318f863d7f7002a1b4ec57112f0ea781 (patch) | |
tree | 42fe434d04bcff35deb6004f260c42604b271580 /sql/item.h | |
parent | 1e8cc909de55b33b7a73ebfa7186598c1a7dbba3 (diff) | |
download | mariadb-git-f2f748c6318f863d7f7002a1b4ec57112f0ea781.tar.gz |
Fix to support update + bianry logs with prepared statements (Dynamic query)
sql/item.cc:
query_val_str to return param item value in string format
sql/item.h:
Misc defination changes for Item_param
sql/sql_class.h:
Changes for PREP_STMT
sql/sql_string.cc:
Duplicate String::replace to take char * and length as arguments
sql/sql_yacc.yy:
Change to take param marker position to Item_param as an argument
sql/sql_prepare.cc:
Fix for binary + update logs
sql/sql_string.h:
Added new replace()
Diffstat (limited to 'sql/item.h')
-rw-r--r-- | sql/item.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sql/item.h b/sql/item.h index 1b5fafc180f..6a7ebd506ac 100644 --- a/sql/item.h +++ b/sql/item.h @@ -239,15 +239,17 @@ public: enum Type item_type; enum enum_field_types buffer_type; bool item_is_time; - my_bool long_data_supplied; + bool long_data_supplied; + uint pos_in_query; - Item_param(char *name_par=0) + Item_param::Item_param(uint position) { - name= name_par ? name_par : (char*) "?"; - long_data_supplied= false; + name= (char*) "?"; + pos_in_query= position; item_type= STRING_ITEM; item_result_type = STRING_RESULT; item_is_time= false; + long_data_supplied= false; } enum Type type() const { return item_type; } double val(); @@ -268,8 +270,9 @@ public: void (*setup_param_func)(Item_param *param, uchar **pos); enum Item_result result_type () const { return item_result_type; } + String *query_val_str(String *str); enum_field_types field_type() const { return MYSQL_TYPE_STRING; } - Item *new_item() { return new Item_param(name); } + Item *new_item() { return new Item_param(pos_in_query); } }; class Item_int :public Item |