summaryrefslogtreecommitdiff
path: root/sql/item_func.h
diff options
context:
space:
mode:
authorunknown <pem@mysql.telia.com>2003-10-16 15:45:27 +0200
committerunknown <pem@mysql.telia.com>2003-10-16 15:45:27 +0200
commit2cb2900c95712759b3c28dfc05111ea0bd6d6fe0 (patch)
tree92f8f5d804369e2ccfc4b68f39e6e361e97d8b75 /sql/item_func.h
parentf582ac0d38dc89e0b24b9b09244ab1193c278d8e (diff)
downloadmariadb-git-2cb2900c95712759b3c28dfc05111ea0bd6d6fe0.tar.gz
Handle user variables (@-vars) as OUT and INOUT parameters in SPs.
mysql-test/r/sp.result: Test cases for user variables (@-vars) as OUT and INOUT parameters. mysql-test/t/sp.test: Test cases for user variables (@-vars) as OUT and INOUT parameters. sql/item_func.h: We need to be able to detect Item_func_get_user_vars when used as arguments to SPs. sql/sp_head.cc: Handle user variables (@-vars) as OUT and INOUT parameters. But we still just ignore it, if it's anything else.
Diffstat (limited to 'sql/item_func.h')
-rw-r--r--sql/item_func.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/item_func.h b/sql/item_func.h
index b15dea77c56..649ddfb9f78 100644
--- a/sql/item_func.h
+++ b/sql/item_func.h
@@ -46,7 +46,8 @@ public:
SP_TOUCHES_FUNC,SP_CROSSES_FUNC,SP_WITHIN_FUNC,
SP_CONTAINS_FUNC,SP_OVERLAPS_FUNC,
SP_STARTPOINT,SP_ENDPOINT,SP_EXTERIORRING,
- SP_POINTN,SP_GEOMETRYN,SP_INTERIORRINGN};
+ SP_POINTN,SP_GEOMETRYN,SP_INTERIORRINGN,
+ GUSERVAR_FUNC};
enum optimize_type { OPTIMIZE_NONE,OPTIMIZE_KEY,OPTIMIZE_OP, OPTIMIZE_NULL };
enum Type type() const { return FUNC_ITEM; }
virtual enum Functype functype() const { return UNKNOWN_FUNC; }
@@ -926,6 +927,8 @@ public:
Item_func_get_user_var(LEX_STRING a):
Item_func(), name(a) {}
user_var_entry *get_entry();
+ enum Functype functype() const { return GUSERVAR_FUNC; }
+ LEX_STRING get_name() { return name; }
double val();
longlong val_int();
String *val_str(String* str);