#include <stddef.h>
#include <sys/types.h>
#include "lex_string.h"
#include "my_inttypes.h"
#include "my_table_map.h"
#include "mysql/udf_registration_types.h"
Go to the source code of this file.
◆ udf_hash_for_each_func_t
typedef void udf_hash_for_each_func_t(udf_func *, void *) |
◆ find_udf()
udf_func * find_udf |
( |
const char * |
name, |
|
|
size_t |
len = 0 , |
|
|
bool |
mark_used = false |
|
) |
| |
◆ free_udf()
◆ mysql_create_function()
bool mysql_create_function |
( |
THD * |
thd, |
|
|
udf_func * |
udf, |
|
|
bool |
if_not_exists |
|
) |
| |
Create a user defined function.
Atomicity: The operation to create a user defined function is atomic/crash-safe. Changes to the Data-dictionary and writing event to binlog are part of the same transaction. All the changes are done as part of the same transaction or do not have any side effects on the operation failure. UDF hash is in sync with operation state. UDF hash do not contain any stale/incorrect data in case of failure. In case of crash, there won't be any discrepancy between the data-dictionary table and the binary log.
- Parameters
-
thd | THD context. |
udf | Pointer to UDF function. |
if_not_exists | True if 'IF NOT EXISTS' clause was specified. |
- Note
- Like implementations of other DDL/DML in MySQL, this function relies on the caller to close the thread tables. This is done in the end of dispatch_command().
◆ mysql_drop_function()
bool mysql_drop_function |
( |
THD * |
thd, |
|
|
const LEX_STRING * |
udf_name |
|
) |
| |
Drop a user defined function.
Atomicity: The operation to drop a user defined function is atomic/crash-safe. Changes to the Data-dictionary and writing event to binlog are part of the same transaction. All the changes are done as part of the same transaction or do not have any side effects on the operation failure. UDF hash is in sync with operation state. UDF hash do not contain any stale/incorrect data in case of failure. In case of crash, there won't be any discrepancy between the data-dictionary table and the binary log.
- Parameters
-
thd | THD context. |
udf_name | Name of the UDF function. |
◆ udf_deinit_globals()
void udf_deinit_globals |
( |
| ) |
|
Deinitialize the UDF subsystem.
This function does the following:
- Free the UDF hash.
- Free the memroot allocated.
- Destroy the RW mutex object.
◆ udf_hash_for_each()
◆ udf_hash_rlock()
void udf_hash_rlock |
( |
void |
| ) |
|
◆ udf_hash_size()
ulong udf_hash_size |
( |
void |
| ) |
|
◆ udf_hash_unlock()
void udf_hash_unlock |
( |
void |
| ) |
|
◆ udf_init_globals()
void udf_init_globals |
( |
| ) |
|
Initialize the UDF global structures.
This is done as a separate step so that the UDF registration service can work when initializing plugins, which happens before reading the UDF table.
◆ udf_read_functions_table()
void udf_read_functions_table |
( |
| ) |
|
◆ udf_unload_udfs()
Deinitialize the UDF subsystem.
This function closes the shared libraries.