[MDEV-23290] Add overloading support in MariaDB_FUNCTION_PLUGIN Created: 2020-07-25 Updated: 2023-12-22 |
|
| Status: | Open |
| Project: | MariaDB Server |
| Component/s: | Plugins |
| Fix Version/s: | 11.5 |
| Type: | Task | Priority: | Major |
| Reporter: | Alexander Barkov | Assignee: | Alexey Botchkov |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||
| Description |
|
Under terms of Every function plugin exports a Create_func object. This is the traditional way of defining functions in MySQL/MariaDB. But it has a disadvantage: it does not support function overloading. So two plugin authors cannot create functions with the same name but different signatures, e.g.
Inside the server we already have Item_handled_func, which supports overloading through its Item_handled_func::Handler, and which is used by some functions:
For example, ADDTIME() has the following overloads:
Let's expose this interface to function plugins, so a function plugin exports:
|