Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
Description
A function collection plugin will provide an array of Create_item's.
A function collection plugin data will have a structure approximately like this:
struct st_mariadb_function_collection |
{
|
int m_interface_version; |
HASH m_hash;
|
const Native_func_registry *m_elements; |
size_t m_count; // The number of elements in m_elements |
};
|
m_elements will point to a static array of Native_func_registry's, like the one defined in item_create.cc:
static Native_func_registry func_array[] = |
{
|
{ { STRING_WITH_LEN("FUNC1") }, BUILDER(Create_func_func1)}, |
{ { STRING_WITH_LEN("FUNC2") }, BUILDER(Create_func_func2)}, |
{ { STRING_WITH_LEN("FUNC3") }, BUILDER(Create_func_func3)}, |
{ { STRING_WITH_LEN("FUNC4") }, BUILDER(Create_func_func4)}, |
{ { STRING_WITH_LEN("FUNC5") }, BUILDER(Create_func_func5)}, |
...
|
};
|
When initializing a function collection plugin, the server will populate m_hash.
When de-initializing a function collection plugin, the server will free m_hash.
Function collection plugins will allow to:
- Split out optional SQL functions into seperate plugins (e.g. GIS, XML, INET functions)
- Remove conditional compilation from existing server code.
- Provide a better interface (than the existing limited UDF API), which will support:
- character sets and collations
- user defined data types
Attachments
Issue Links
- blocks
-
MDEV-274 The data type for IPv6/IPv4 addresses in MariaDB
- Closed
-
MDEV-4912 Data type plugin API version 1
- Closed
-
MDEV-20768 Turn INET functions into a function collection plugin
- Closed
- relates to
-
MDEV-5315 ItemFunc plugins for server
- Open
-
MDEV-20837 Add MariaDB_FUNCTION_PLUGIN
- Closed