summaryrefslogtreecommitdiff
path: root/sql/item_windowfunc.h
diff options
context:
space:
mode:
authorVarun Gupta <varunraiko1803@gmail.com>2017-07-17 13:19:20 +0530
committerVarun Gupta <varunraiko1803@gmail.com>2017-11-01 23:13:01 +0530
commiteb2187a24f43fa22d0eb12ed9c9bae13faf16bd5 (patch)
treecc87356bb26af6fdbdbe2e47df0e170db6087b63 /sql/item_windowfunc.h
parent3393005e958de87909ac5fa7f8e6ca92f8cc8b21 (diff)
downloadmariadb-git-eb2187a24f43fa22d0eb12ed9c9bae13faf16bd5.tar.gz
Val_str function added for the percentile_disc function, as it can have result type as STRING_RESULT
Diffstat (limited to 'sql/item_windowfunc.h')
-rw-r--r--sql/item_windowfunc.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/sql/item_windowfunc.h b/sql/item_windowfunc.h
index 9dfff36f952..c5c2c0aa004 100644
--- a/sql/item_windowfunc.h
+++ b/sql/item_windowfunc.h
@@ -765,6 +765,17 @@ public:
return value->val_decimal(dec);
}
+ String* val_str(String *str)
+ {
+ if (get_row_count() == 0 || get_arg(0)->is_null())
+ {
+ null_value= true;
+ return 0;
+ }
+ null_value= false;
+ return value->val_str(str);
+ }
+
bool add()
{
Item *arg = get_arg(0);