Skip to content

Commit 04af01a

Browse files
author
Ivan Švaljek
committed
Merge branch 'mysql-5.7' into mysql-8.0
2 parents e21ba59 + 07a000e commit 04af01a

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

include/mysql/plugin.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -185,12 +185,14 @@ struct MYSQL_XID {
185185
#define PLUGIN_VAR_NOPERSIST \
186186
0x10000 /* SET PERSIST_ONLY is prohibited \
187187
for read only variables */
188+
188189
/**
189190
There can be some variables which needs to be set before plugin is loaded but
190191
not after plugin is loaded. ex: GR specific variables. Below flag must be set
191192
for these kind of variables.
192193
*/
193194
#define PLUGIN_VAR_PERSIST_AS_READ_ONLY 0x20000
195+
#define PLUGIN_VAR_INVISIBLE 0x40000 /* Variable should not be shown */
194196

195197
struct SYS_VAR;
196198
struct st_mysql_value;
@@ -240,7 +242,7 @@ typedef void (*mysql_var_update_func)(MYSQL_THD thd, SYS_VAR *var,
240242
(PLUGIN_VAR_READONLY | PLUGIN_VAR_NOSYSVAR | PLUGIN_VAR_NOCMDOPT | \
241243
PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_RQCMDARG | \
242244
PLUGIN_VAR_MEMALLOC | PLUGIN_VAR_NODEFAULT | PLUGIN_VAR_NOPERSIST | \
243-
PLUGIN_VAR_PERSIST_AS_READ_ONLY)
245+
PLUGIN_VAR_PERSIST_AS_READ_ONLY | PLUGIN_VAR_INVISIBLE)
244246

245247
#define MYSQL_PLUGIN_VAR_HEADER \
246248
int flags; \

sql/sql_plugin_var.h

+1
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,7 @@ class sys_var_pluginvar : public sys_var {
235235
chain, name_arg, plugin_var_arg->comment,
236236
(plugin_var_arg->flags & PLUGIN_VAR_THDLOCAL ? SESSION : GLOBAL) |
237237
(plugin_var_arg->flags & PLUGIN_VAR_READONLY ? READONLY : 0) |
238+
(plugin_var_arg->flags & PLUGIN_VAR_INVISIBLE ? INVISIBLE : 0) |
238239
(plugin_var_arg->flags & PLUGIN_VAR_PERSIST_AS_READ_ONLY
239240
? PERSIST_AS_READ_ONLY
240241
: 0),

0 commit comments

Comments
 (0)