[MDEV-8035] Cannot use UDF's when their library is embedded Created: 2015-04-22 Updated: 2017-01-26 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Admin statements, Embedded Server |
| Affects Version/s: | 5.5, 10.0, 10.1, 10.2 |
| Fix Version/s: | 10.2 |
| Type: | Bug | Priority: | Minor |
| Reporter: | Olivier Bertrand | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Description |
|
The CONNECT storage engine comes with additional UDF's used to generate JSON items. All is right when the plugin is not embedded. It can be installed using:
To create the functions, one can use statements such as:
However, when the server was compiled with:
there is no more ha_connect library and apparently it is impossible to create the UDF's. There should be a syntax to indicate they are located in the MariaDB server. Additional question: |
| Comments |
| Comment by Sergei Golubchik [ 2015-04-26 ] | |||||
|
To write tests you can use the following (copied from udf.test):
This works both on Windows and on Linux/etc. As for UDFs inside the main binary… UDF interface is at least 15 years old, it was created long before plugins. I've wanted to replace it with UDF plugins for, like, 10 years (see MYSQL_UDF_PLUGIN in plugin.h), but it always kinda worked. May be it's time to do it, finally. I would rather not add new features to old UDFs. | |||||
| Comment by Olivier Bertrand [ 2015-04-27 ] | |||||
|
Le 26/04/2015 22:25, Sergei Golubchik (JIRA) a écrit : "This works both on Windows and on Linux/etc." However, it is said before that:
Probably also on Windows. This explaining why it works. The way I was obliged to do it is in the attached file json_udf.inc, not quite friendly. But you're right: "May be it's time to do it". Implementing UDF's specific to a plugin storage engine should be a normal and useful feature of MariaDB that already offers many things not existing in MySQL such as additional create options and discovery. BTW I don't see why it would change anything to old UDF's. | |||||
| Comment by Olivier Bertrand [ 2015-05-30 ] | |||||
|
I am developing more JSON UDF's that will be an major feature of the JSON facility. |