summaryrefslogtreecommitdiff
path: root/sql/item_sum.h
diff options
context:
space:
mode:
authorpem@mysql.comhem.se <>2005-03-07 18:09:53 +0100
committerpem@mysql.comhem.se <>2005-03-07 18:09:53 +0100
commit6a15e0139378bd1169de2c7224fdd70921e3ac7c (patch)
treedc709a8cc3273465f91f588a9cdc81a7dbe848d8 /sql/item_sum.h
parent9c2fe003dc965dc317c89b89f054f618899044a7 (diff)
downloadmariadb-git-6a15e0139378bd1169de2c7224fdd70921e3ac7c.tar.gz
Fixed BUG#8937: Stored Procedure: AVG() works as SUM() in SELECT ... INTO statement
Diffstat (limited to 'sql/item_sum.h')
-rw-r--r--sql/item_sum.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/item_sum.h b/sql/item_sum.h
index fead45f1881..af2710d7800 100644
--- a/sql/item_sum.h
+++ b/sql/item_sum.h
@@ -356,6 +356,8 @@ public:
void clear();
bool add();
double val_real();
+ // In SPs we might force the "wrong" type with select into a declare variable
+ longlong val_int() { return (longlong)val_real(); }
my_decimal *val_decimal(my_decimal *);
String *val_str(String *str);
void reset_field();