Created
December 29, 2018 06:29
-
-
Save greenlion/d7bbc560d8681863f8f4c89474ef5f3e to your computer and use it in GitHub Desktop.
user var service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "mysql/service_my_plugin_user_var.h" | |
SERVICE_VERSION *user_var_service= (void*)VERSION_user_var;; | |
bool get_var(THD* thd, const String name, String* value) { | |
return false; | |
} | |
bool set_var(THD* thd, const String name, const String value) my_plugin_user_var_service->set_var(thd, name, value) { | |
return false; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef MYSQL_SERVICE_USER_VAR_INCLUDED | |
#include "sql/sql_class.h" | |
#include "sql/item.h" | |
#include "sql/item_func.h" | |
#include "service_versions.h" | |
/** | |
@file | |
*exhaustive* description of the interface you provide. | |
This file is the main user documentation of the new service | |
*/ | |
#ifdef __cplusplus | |
extern "C" { | |
#endif | |
extern struct my_plugin_user_var_service_st { | |
bool (*get_var)(THD* thd, const String name, String* value); | |
bool (*set_var)(THD* thd, const String name, const String value); | |
} *my_plugin_user_var_service; | |
#ifdef MYSQL_DYNAMIC_PLUGIN | |
#define get_var(THD* thd, const String name, String* value) my_plugin_user_var_service->get_var(thd, name, value) | |
#define set_var(THD* thd, const String name, const String value) my_plugin_user_var_service->set_var(thd, name, value) | |
#else | |
#endif | |
#ifdef __cplusplus | |
} | |
#endif | |
#define MYSQL_SERVICE_USER_VAR_INCLUDED | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment