summaryrefslogtreecommitdiff
path: root/sql/sql_udf.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2018-11-20 10:58:34 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2018-11-20 10:58:34 +0100
commit49b63dcc0482bcb0fc7f642b0c19c8e24740ab27 (patch)
tree7637b7fe2b8db287f38bb1eff662325ee735923a /sql/sql_udf.cc
parentb5ac863f1494920b5e7035c9dfa0ebfdaa50a15d (diff)
downloadmariadb-git-bb-10.4-MDEV-15073.tar.gz
MDEV-15073: Generic UDAF parser code in server for windows functionsbb-10.4-MDEV-15073
Added support for usual agreggate UDF (UDAF) Added remove() call support for more efficient window function processing Added example of aggregate UDF with efficient windows function support
Diffstat (limited to 'sql/sql_udf.cc')
-rw-r--r--sql/sql_udf.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_udf.cc b/sql/sql_udf.cc
index 9a036156de6..aee4869bd40 100644
--- a/sql/sql_udf.cc
+++ b/sql/sql_udf.cc
@@ -76,6 +76,8 @@ static const char *init_syms(udf_func *tmp, char *nm)
(void)strmov(end, "_add");
if (!((tmp->func_add= (Udf_func_add) dlsym(tmp->dlhandle, nm))))
return nm;
+ (void)strmov(end, "_remove");
+ tmp->func_remove= (Udf_func_add) dlsym(tmp->dlhandle, nm);
}
(void) strmov(end,"_deinit");
@@ -565,6 +567,7 @@ int mysql_create_function(THD *thd,udf_func *udf)
u_d->func_deinit= udf->func_deinit;
u_d->func_clear= udf->func_clear;
u_d->func_add= udf->func_add;
+ u_d->func_remove= udf->func_remove;
/* create entry in mysql.func table */