summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNayuta Yanagisawa <nayuta.yanagisawa@hey.com>2022-02-15 16:18:55 +0900
committerNayuta Yanagisawa <nayuta.yanagisawa@hey.com>2022-02-18 13:10:20 +0900
commit66f55a018bb3a6cc3e68dd4578f487c18a2fa639 (patch)
tree434b3bd6364c6457ced69c5d34ff409626a56b6c /include
parent5b237e5965c613842a897516eebf0d4e9fe12f98 (diff)
downloadmariadb-git-66f55a018bb3a6cc3e68dd4578f487c18a2fa639.tar.gz
MDEV-27730 Add PLUGIN_VAR_DEPRECATED flag to plugin variables
The sys_var class has the deprecation_substitute member to mark the deprecated variables. As it's set, the server produces warnings when these variables are used. However, the plugin has no means to utilize that functionality. So, the PLUGIN_VAR_DEPRECATED flag is introduced to set the deprecation_substitute with the empty string. A non-empty string can make the warning more informative, but there's no nice way seen to specify it, and not that needed at the moment.
Diffstat (limited to 'include')
-rw-r--r--include/mysql/plugin.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h
index e084b6becec..360f633b7dd 100644
--- a/include/mysql/plugin.h
+++ b/include/mysql/plugin.h
@@ -229,6 +229,7 @@ typedef int (*mysql_show_var_func)(MYSQL_THD, struct st_mysql_show_var*, void *,
#define PLUGIN_VAR_NOCMDARG 0x1000 /* No argument for cmd line */
#define PLUGIN_VAR_RQCMDARG 0x0000 /* Argument required for cmd line */
#define PLUGIN_VAR_OPCMDARG 0x2000 /* Argument optional for cmd line */
+#define PLUGIN_VAR_DEPRECATED 0x4000 /* Server variable is deprecated */
#define PLUGIN_VAR_MEMALLOC 0x8000 /* String needs memory allocated */
struct st_mysql_sys_var;
@@ -282,7 +283,8 @@ typedef void (*mysql_var_update_func)(MYSQL_THD thd,
#define PLUGIN_VAR_MASK \
(PLUGIN_VAR_READONLY | PLUGIN_VAR_NOSYSVAR | \
PLUGIN_VAR_NOCMDOPT | PLUGIN_VAR_NOCMDARG | \
- PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_MEMALLOC)
+ PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_RQCMDARG | \
+ PLUGIN_VAR_DEPRECATED | PLUGIN_VAR_MEMALLOC)
#define MYSQL_PLUGIN_VAR_HEADER \
int flags; \