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
-
- Closed
-
-
MDEV-20837 Add MariaDB_FUNCTION_PLUGIN
-
- Closed
-
Activity
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: {code:sql} 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 }; {code} m_elements will point to a static array of Native_func_registry's, like the one defined in item_create.cc: {code:cpp} 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)}, ... }; {code} 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 |
A function collection plugin will provide an array of Create_item's.
A function collection plugin data will have a structure approximately like this: {code:cpp} 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 }; {code} m_elements will point to a static array of Native_func_registry's, like the one defined in item_create.cc: {code:cpp} 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)}, ... }; {code} 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 |
Fix Version/s | 10.5.0 [ 23709 ] | |
Fix Version/s | 10.5 [ 23123 ] | |
Resolution | Fixed [ 1 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Link |
This issue blocks |
Link |
This issue blocks |
Link |
This issue blocks |
Link |
This issue relates to |
Workflow | MariaDB v3 [ 100218 ] | MariaDB v4 [ 134111 ] |