From ce2c46ddd6676960e0c002aa83c7913e85ebdc47 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 24 Oct 2003 17:28:32 +0300 Subject: support 'parallel' updates and rallback of whole statement in case of error in evalueting value which should be assigned (BUG#1484) mysql-test/r/variables.result: test of swaping variables mysql-test/t/variables.test: test of swaping variables sql/item_func.cc: new method of user variables to pre-fetch value sql/item_func.h: new method of user variables to pre-fetch value sql/set_var.cc: check() methods fetch & store value sql/set_var.h: check() methods fetch & store value --- sql/item_func.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sql/item_func.h') diff --git a/sql/item_func.h b/sql/item_func.h index 8086e65786d..fe9c2645216 100644 --- a/sql/item_func.h +++ b/sql/item_func.h @@ -900,6 +900,14 @@ class Item_func_set_user_var :public Item_func user_var_entry *entry; char buffer[MAX_FIELD_WIDTH]; String value; + union + { + longlong vint; + double vreal; + String *vstr; + } save_result; + String save_buff; + public: Item_func_set_user_var(LEX_STRING a,Item *b) @@ -910,6 +918,7 @@ public: String *val_str(String *str); bool update_hash(void *ptr, uint length, enum Item_result type, CHARSET_INFO *cs, Derivation dv); + bool check(); bool update(); enum Item_result result_type () const { return cached_result_type; } bool fix_fields(THD *thd, struct st_table_list *tables, Item **ref); -- cgit v1.2.1