Details
-
Task
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
None
Description
Originally, Serg and Bar decided to implement function plugins through MariaDB_FUNCTION_COLLECTION_PLUGIN, so a plugin can export multiple SQL functions at the same type.
The retionale of this solution was to avoid flooding the output of this query:
SELECT * FROM INFORMATION_SCHEMA.PLUGINS;
|
For example, we have 155 GEOMETRY related functions. Exporting all 155 function as individual plugins would add 155 entries to the query output.
After adding MariaDB_FUNCTION_COLLECTION_PLUGIN, we came up to the following:
- The hash to lookup functions by name appeared to be redundant. We already have a hash to lookup plugins by name (and type). So this new hash looked really duplicate.
- It's not possible to maintain ref_count of individual functions. So some more code duplication is needed for dynamic plugins, to maintain reference counters.
After discussing, Serg and Bar decided that:
- For now we should go through a new plugin type, MariaDB_FUNCTION_PLUGIN, where each plugin exports a single function. We'll do flood the output of INFORMATION_SCHEMA.PLUGINS queries for now, but this is tolerable. It's more important to avoid code duplication.
- Eventually we'll add generic collection plugins with these characteristics:
- A generic collection plugin will be able to join multiple plugins, even of different types (e.g. a number of MariaDB_DATE_TYPE_PLUGINs and MariaDB_FUNCTION_PLUGINs) into a single instance, which will be available in some INFORMATION_SCHEMA table (either PLUGINS, or a new one) as a single record.
- A generic collection plugin will be able to do atomic initialization: either load all sub-plugins, or load non of them.
Under terms of this task we do the following:
- Implement MariaDB_FUNCTION_PLUGIN, to export individual functions.
- Change the code in /plugins/type_inet/ and /plugins/type_test/ to use MariaDB_FUNCTION_PLUGIN instead of MariaDB_FUNCTION_COLLECTION_PLUGIN.
- Remove MariaDB_FUNCTION_COLLECTION.
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-20841 Turn GIS implementation into a plugin
- Open
-
MDEV-20842 Crash using versioning plugin functions after plugin was removed from server
- Closed
- causes
-
MDEV-34451 Document FUNCTION plugin type
- Open
- relates to
-
MDEV-20846 Add proper unlocking for MariaDB_FUNCTION_PLUGIN
- Open
-
MDEV-20764 Add MariaDB_FUNCTION_COLLECTION_PLUGIN
- Closed
-
MDEV-23290 Add overloading support in MariaDB_FUNCTION_PLUGIN
- Open