diff options
Diffstat (limited to 'sql/procedure.h')
-rw-r--r-- | sql/procedure.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sql/procedure.h b/sql/procedure.h index 15fd525ec65..b7e7b38a4d2 100644 --- a/sql/procedure.h +++ b/sql/procedure.h @@ -44,7 +44,7 @@ public: this->name.length= strlen(name_par); } enum Type type() const { return Item::PROC_ITEM; } - Field *create_tmp_field_ex(TABLE *table, Tmp_field_src *src, + Field *create_tmp_field_ex(MEM_ROOT *root, TABLE *table, Tmp_field_src *src, const Tmp_field_param *param) { /* @@ -52,7 +52,7 @@ public: DECLARE c CURSOR FOR SELECT * FROM t1 PROCEDURE analyse(); OPEN c; */ - return create_tmp_field_ex_simple(table, src, param); + return create_tmp_field_ex_simple(root, table, src, param); } virtual void set(double nr)=0; virtual void set(const char *str,uint length,CHARSET_INFO *cs)=0; @@ -107,7 +107,11 @@ class Item_proc_int :public Item_proc public: Item_proc_int(THD *thd, const char *name_par): Item_proc(thd, name_par) { max_length=11; } - const Type_handler *type_handler() const { return &type_handler_longlong; } + const Type_handler *type_handler() const + { + return unsigned_flag ? &type_handler_ulonglong : + &type_handler_slonglong; + } void set(double nr) { value=(longlong) nr; } void set(longlong nr) { value=nr; } void set(const char *str,uint length, CHARSET_INFO *cs) |