51#define plugin_ref_to_int(A) A
52#define plugin_int_to_ref(A) A
54#define plugin_ref_to_int(A) (A ? A[0] : NULL)
55#define plugin_int_to_ref(A) &(A)
61#define PLUGIN_INIT_SKIP_DYNAMIC_LOADING 1
62#define PLUGIN_INIT_SKIP_PLUGIN_TABLE 2
63#define PLUGIN_INIT_SKIP_INITIALIZATION 4
64#define PLUGIN_INIT_DELAY_UNTIL_AFTER_UPGRADE 8
66#define MYSQL_ANY_PLUGIN -1
75#define PLUGIN_IS_FREED 1
76#define PLUGIN_IS_DELETED 2
77#define PLUGIN_IS_UNINITIALIZED 4
78#define PLUGIN_IS_READY 8
79#define PLUGIN_IS_DYING 16
80#define PLUGIN_IS_DISABLED 32
81#define PLUGIN_IS_WAITING_FOR_UPGRADE 64
175#define my_plugin_lock_by_name(A, B, C) plugin_lock_by_name(A, B, C)
176#define my_plugin_lock_by_name_ci(A, B, C) plugin_lock_by_name(A, B, C)
177#define my_plugin_lock(A, B) plugin_lock(A, B)
178#define my_plugin_lock_ci(A, B) plugin_lock(A, B)
192#define plugin_foreach(A, B, C, D) \
193 plugin_foreach_with_mask(A, B, C, PLUGIN_IS_READY, D)
195 int type,
uint state_mask,
void *arg);
197 int type,
uint state_mask,
void *arg);
Definition: sql_list.h:811
This class implements the INSTALL PLUGIN statement.
Definition: sql_plugin.h:97
bool execute(THD *thd) override
Install a new plugin by inserting a row into the mysql.plugin table, creating a cache entry and initi...
Definition: sql_plugin.cc:3688
enum_sql_command sql_command_code() const override
Return the command code for this statement.
Definition: sql_plugin.h:102
LEX_STRING m_ident
Definition: sql_plugin.h:119
LEX_CSTRING m_comment
Definition: sql_plugin.h:118
Sql_cmd_install_plugin(const LEX_CSTRING &comment, const LEX_STRING &ident)
Definition: sql_plugin.h:99
This class implements the UNINSTALL PLUGIN statement.
Definition: sql_plugin.h:126
Sql_cmd_uninstall_plugin(const LEX_CSTRING &comment)
Definition: sql_plugin.h:128
enum_sql_command sql_command_code() const override
Return the command code for this statement.
Definition: sql_plugin.h:131
LEX_CSTRING m_comment
Definition: sql_plugin.h:147
bool execute(THD *thd) override
Uninstall a plugin by removing a row from the mysql.plugin table, deleting a cache entry and deinitia...
Definition: sql_plugin.cc:3695
Representation of an SQL command.
Definition: sql_cmd.h:65
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:34
Definition: sql_list.h:698
static MEM_ROOT mem_root
Definition: client_plugin.cc:110
static int flags[50]
Definition: hp_test1.cc:40
#define comment
Definition: lexyy.cc:959
Common #defines and includes for file and socket I/O.
#define FN_REFLEN
Definition: my_io.h:83
enum_sql_command
Definition: my_sqlcommand.h:46
@ SQLCOM_INSTALL_PLUGIN
Definition: my_sqlcommand.h:162
@ SQLCOM_UNINSTALL_PLUGIN
Definition: my_sqlcommand.h:163
static int count
Definition: myisam_ftdump.cc:43
ABI for instrumented mutexes.
static char * path
Definition: mysqldump.cc:137
bool plugin_initialize_delayed_after_upgrade()
Initialize delayed plugins.
Definition: sql_plugin.cc:1710
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:43
bool length(const dd::Spatial_reference_system *srs, const Geometry *g1, double *length, bool *null) noexcept
Computes the length of linestrings and multilinestrings.
Definition: length.cc:76
Definition: options.cc:49
std::list< T, ut::allocator< T > > list
Specialization of list which uses ut_allocator.
Definition: ut0new.h:2879
required string type
Definition: replication_group_member_actions.proto:34
Representation of an SQL command.
bool plugin_early_load_one(int *argc, char **argv, const char *plugin)
Initialize one plugin.
Definition: sql_plugin.cc:2230
void plugin_unlock(THD *thd, plugin_ref plugin)
Definition: sql_plugin.cc:1254
void alloc_and_copy_thd_dynamic_variables(THD *thd, bool global_lock)
Allocate memory and copy dynamic variables from global system variables to per-thread system variable...
Definition: sql_plugin.cc:2916
void plugin_thdvar_init(THD *thd, bool enable_plugins)
Definition: sql_plugin.cc:3022
char * opt_plugin_dir_ptr
Definition: sql_plugin.cc:340
void plugin_thdvar_cleanup(THD *thd, bool enable_plugins)
Definition: sql_plugin.cc:3095
bool is_builtin_and_core_se_initialized()
Definition: sql_plugin.cc:1689
plugin_ref plugin_lock(THD *thd, plugin_ref *ptr)
Definition: sql_plugin.cc:975
int(* plugin_type_init)(struct st_plugin_int *)
Definition: sql_plugin.h:150
mysql_mutex_t LOCK_plugin
Serializes access to the global plugin memory list.
Definition: sql_plugin.cc:448
const LEX_CSTRING plugin_type_names[]
Definition: sql_plugin.cc:346
bool check_valid_path(const char *path, size_t length)
Check if the provided path is valid in the sense that it does cause a relative reference outside the ...
Definition: sql_plugin.cc:569
const char * global_plugin_typelib_names[]
Definition: sql_plugin.cc:330
bool plugin_register_dynamic_and_init_all(int *argc, char **argv, int init_flags)
Register and initialize the dynamic plugins.
Definition: sql_plugin.cc:1779
bool plugin_register_builtin_and_init_core_se(int *argc, char **argv)
Register the builtin plugins.
Definition: sql_plugin.cc:1556
bool() plugin_foreach_func(THD *thd, plugin_ref plugin, void *arg)
Definition: sql_plugin.h:191
void plugin_unlock_list(THD *thd, plugin_ref *list, size_t count)
Definition: sql_plugin.cc:1268
void add_plugin_options(std::vector< my_option > *options, MEM_ROOT *mem_root)
Definition: sql_plugin.cc:3656
char opt_plugin_dir[FN_REFLEN]
Definition: sql_plugin.cc:341
I_List< i_string > * opt_early_plugin_load_list_ptr
Definition: sql_plugin.cc:339
void plugin_thdvar_safe_update(THD *thd, SYS_VAR *var, char **dest, const char *value)
Set value for a thread local variable.
Definition: sql_plugin.cc:3157
void memcached_shutdown(void)
Definition: sql_plugin.cc:2039
bool end_transaction(THD *thd, bool error)
Definition: sql_plugin.cc:2203
plugin_ref plugin_lock_by_name(THD *thd, const LEX_CSTRING &name, int type)
Definition: sql_plugin.cc:985
bool plugin_is_ready(const LEX_CSTRING &name, int type)
Definition: sql_plugin.cc:925
bool plugin_register_early_plugins(int *argc, char **argv, int flags)
Register and initialize early plugins.
Definition: sql_plugin.cc:1501
mysql_mutex_t LOCK_plugin_delete
Definition: sql_plugin.cc:437
bool update_persisted_plugin_sysvars(const char *name)
Update read-write persisted plugin system variables.
Definition: sql_plugin.cc:1534
I_List< i_string > * opt_plugin_load_list_ptr
Definition: sql_plugin.cc:337
void plugin_shutdown(void)
Definition: sql_plugin.cc:2068
bool plugin_foreach_with_mask(THD *thd, plugin_foreach_func *func, int type, uint state_mask, void *arg)
Definition: sql_plugin.cc:2777
case opt name
Definition: sslopt-case.h:33
The MEM_ROOT is a simple arena, where allocations are carved out of larger blocks.
Definition: my_alloc.h:83
Definition: mysql_lex_string.h:40
Definition: mysql_lex_string.h:35
Definition: my_getopt.h:93
An instrumented mutex structure.
Definition: mysql_mutex_bits.h:50
Definition: sql_plugin.h:85
LEX_STRING dl
Definition: sql_plugin.h:86
void * handle
Definition: sql_plugin.h:87
int version
Definition: sql_plugin.h:89
struct st_mysql_plugin * plugins
Definition: sql_plugin.h:88
uint ref_count
Definition: sql_plugin.h:90
Definition: sql_plugin_ref.h:45
unsigned int uint
Definition: uca9-dump.cc:75