From 74daa97adff7e26360d43cbe8a0410639671887f Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 10 Sep 2021 13:03:48 +0200 Subject: [PATCH] a plugin shouldn't need any other includes besised plugin_xxx.h --- plugin/test_sql_service/test_sql_service.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/plugin/test_sql_service/test_sql_service.c b/plugin/test_sql_service/test_sql_service.c index 8fef013c526..0e5b38df922 100644 --- a/plugin/test_sql_service/test_sql_service.c +++ b/plugin/test_sql_service/test_sql_service.c @@ -16,12 +16,8 @@ #define PLUGIN_VERSION 0x200 -#include -#include -#include #include -#include - +#define STRING_WITH_LEN(X) (X), ((size_t) (sizeof(X) - 1)) /* Status variables for SHOW STATUS */ static long test_passed= 0; @@ -35,7 +31,7 @@ static struct st_mysql_show_var test_sql_status[]= {0,0,0} }; -static my_bool do_test= TRUE; +static my_bool do_test= 1; static int run_test(MYSQL_THD thd, struct st_mysql_sys_var *var, void *save, struct st_mysql_value *value); static int run_sql_local(MYSQL_THD thd, struct st_mysql_sys_var *var, void *save, @@ -49,17 +45,17 @@ static void noop_update(MYSQL_THD thd, struct st_mysql_sys_var *var, static MYSQL_SYSVAR_BOOL(run_test, do_test, PLUGIN_VAR_OPCMDARG, "Perform the test now.", - run_test, NULL, FALSE); + run_test, NULL, 0); static MYSQL_SYSVAR_STR(execute_sql_local, sql_text_local, PLUGIN_VAR_OPCMDARG, "Create the new local connection, execute SQL statement with it.", - run_sql_local, noop_update, FALSE); + run_sql_local, noop_update, 0); static MYSQL_SYSVAR_STR(execute_sql_global, sql_text_global, PLUGIN_VAR_OPCMDARG, "Execute SQL statement using the global connection.", - run_sql_global, noop_update, FALSE); + run_sql_global, noop_update, 0); static struct st_mysql_sys_var* test_sql_vars[]= {