summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2021-02-11 09:26:53 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2021-02-11 09:26:53 +0200
commitb19ec8848c9463b86d62601dffb67c75e3dfbd70 (patch)
tree203f6bf23338813575214c23a8fee5a99f7ca2fb /include
parentbfb4761ca04704d68dba51f76d7c9967f880a6ee (diff)
parentc7edbe5bb1222634adb0c45ca86c62fb544ce246 (diff)
downloadmariadb-git-b19ec8848c9463b86d62601dffb67c75e3dfbd70.tar.gz
Merge 10.5 into 10.6
Diffstat (limited to 'include')
-rw-r--r--include/my_getopt.h2
-rw-r--r--include/mysql.h.pp3
-rw-r--r--include/mysql/plugin.h11
-rw-r--r--include/typelib.h3
4 files changed, 16 insertions, 3 deletions
diff --git a/include/my_getopt.h b/include/my_getopt.h
index 642fb344d92..ffff706e015 100644
--- a/include/my_getopt.h
+++ b/include/my_getopt.h
@@ -89,7 +89,7 @@ struct my_option
void *app_type; /**< To be used by an application */
};
-typedef my_bool (*my_get_one_option)(const struct my_option *, char *, const char *);
+typedef my_bool (*my_get_one_option)(const struct my_option *, const char *, const char *);
/**
Used to retrieve a reference to the object (variable) that holds the value
diff --git a/include/mysql.h.pp b/include/mysql.h.pp
index e906e4e1a86..584276a7a08 100644
--- a/include/mysql.h.pp
+++ b/include/mysql.h.pp
@@ -270,7 +270,8 @@ typedef struct st_typelib {
const char **type_names;
unsigned int *type_lengths;
} TYPELIB;
-extern my_ulonglong find_typeset(char *x, TYPELIB *typelib,int *error_position);
+extern my_ulonglong find_typeset(const char *x, TYPELIB *typelib,
+ int *error_position);
extern int find_type_with_warning(const char *x, TYPELIB *typelib,
const char *option);
extern int find_type(const char *x, const TYPELIB *typelib, unsigned int flags);
diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h
index 07e7597fbd8..738ffc6c53f 100644
--- a/include/mysql/plugin.h
+++ b/include/mysql/plugin.h
@@ -313,6 +313,12 @@ typedef void (*mysql_var_update_func)(MYSQL_THD thd,
const type def_val; \
} MYSQL_SYSVAR_NAME(name)
+#define DECLARE_MYSQL_SYSVAR_CONST_BASIC(name, type) struct { \
+ MYSQL_PLUGIN_VAR_HEADER; \
+ const type *value; \
+ const type def_val; \
+} MYSQL_SYSVAR_NAME(name)
+
#define DECLARE_MYSQL_SYSVAR_SIMPLE(name, type) struct { \
MYSQL_PLUGIN_VAR_HEADER; \
type *value; type def_val; \
@@ -367,6 +373,11 @@ DECLARE_MYSQL_SYSVAR_BASIC(name, char *) = { \
PLUGIN_VAR_STR | ((opt) & PLUGIN_VAR_MASK), \
#name, comment, check, update, &varname, def}
+#define MYSQL_SYSVAR_CONST_STR(name, varname, opt, comment, check, update, def) \
+DECLARE_MYSQL_SYSVAR_CONST_BASIC(name, char *) = { \
+ PLUGIN_VAR_STR | ((opt) & PLUGIN_VAR_MASK), \
+ #name, comment, check, update, &varname, def}
+
#define MYSQL_SYSVAR_INT(name, varname, opt, comment, check, update, def, min, max, blk) \
DECLARE_MYSQL_SYSVAR_SIMPLE(name, int) = { \
PLUGIN_VAR_INT | ((opt) & PLUGIN_VAR_MASK), \
diff --git a/include/typelib.h b/include/typelib.h
index 23df737d307..dc315dd3bb8 100644
--- a/include/typelib.h
+++ b/include/typelib.h
@@ -27,7 +27,8 @@ typedef struct st_typelib { /* Different types saved here */
unsigned int *type_lengths;
} TYPELIB;
-extern my_ulonglong find_typeset(char *x, TYPELIB *typelib,int *error_position);
+extern my_ulonglong find_typeset(const char *x, TYPELIB *typelib,
+ int *error_position);
extern int find_type_with_warning(const char *x, TYPELIB *typelib,
const char *option);
#define FIND_TYPE_BASIC 0