[MDEV-27527] UDF (user defined function) plugin SDK model(dll) not working properly(for aggregated function) Created: 2022-01-17 Updated: 2022-02-07 Resolved: 2022-02-07 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Documentation |
| Affects Version/s: | 10.6.5 |
| Fix Version/s: | N/A |
| Type: | Bug | Priority: | Critical |
| Reporter: | Mitchell Lee | Assignee: | Ian Gilfillan |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Windows11 64bit, visual studio 2022, MariaDB 10.6\bin\mysql.exe Ver 15.1 Distrib 10.6.5-MariaDB, for Win64 (AMD64), source revision 109fc67d4da46d52d2a96528eaea3b0ef6275692 |
||
| Description |
|
For the UDF aggregate model that calling 'x_init > x_clear > x_add > xxx > x_deinit' as the guide said, reference doc : https://mariadb.com/kb/en/creating-user-defined-functions/ |
| Comments |
| Comment by Sergei Golubchik [ 2022-01-17 ] | |
|
are you installing it with CREATE AGGREGATE FUNCTION ? generally aggregate UDF functions work on Windows, there's an aggregate UDF in the udf_example.c and it's tested in our test suite which is run regularly in our CI, also on Windows (e.g. here) | |
| Comment by Mitchell Lee [ 2022-01-17 ] | |
|
CREATE FUNCTION ta_ema RETURNS REAL SONAME 'lib_mysqludf_ta.dll'; DROP FUNCTION IF EXISTS ta_ema; possibly, the MariaDB not fully compatible with standard dll build/entry point. | |
| Comment by Anel Husakovic [ 2022-01-17 ] | |
|
Can you please paste result of mysql.func table? | |
| Comment by Mitchell Lee [ 2022-01-17 ] | |
|
"name" "ret" "dl" "type" | |
| Comment by Mitchell Lee [ 2022-01-17 ] | |
|
does not '__declspec(dllexport) void ta_tr_win_clear(UDF_INIT *initid, char *is_null, char *error)' this prototype of dll entry not working with the server?
| |
| Comment by Sergei Golubchik [ 2022-01-17 ] | |
|
npdmailing@gmail.com, that's what I said in my first comment, you must use
note the keyword AGGREGATE | |
| Comment by Mitchell Lee [ 2022-01-17 ] | |
|
Shame me. Thanks. | |
| Comment by Anel Husakovic [ 2022-01-17 ] | |
| Comment by Mitchell Lee [ 2022-01-17 ] | |
|
Holy....that isn't fair thanks. cheers. |