MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / check_plugin_enabled

Function check_plugin_enabled

sql-common/client.c:2935–2950  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2933my_bool libmysql_cleartext_plugin_enabled= 0;
2934
2935static my_bool check_plugin_enabled(MYSQL *mysql, auth_plugin_t *plugin)
2936{
2937 if (plugin == &clear_password_client_plugin &&
2938 (!libmysql_cleartext_plugin_enabled &&
2939 (!mysql->options.extension ||
2940 !mysql->options.extension->enable_cleartext_plugin)))
2941 {
2942 set_mysql_extended_error(mysql, CR_AUTH_PLUGIN_CANNOT_LOAD,
2943 unknown_sqlstate,
2944 ER(CR_AUTH_PLUGIN_CANNOT_LOAD),
2945 clear_password_client_plugin.name,
2946 "plugin not enabled");
2947 return TRUE;
2948 }
2949 return FALSE;
2950}
2951
2952
2953/**

Callers 1

run_plugin_authFunction · 0.85

Calls 1

set_mysql_extended_errorFunction · 0.85

Tested by

no test coverage detected