summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2017-10-02 22:35:13 +0400
committerAlexander Barkov <bar@mariadb.org>2017-10-02 22:35:13 +0400
commit8ae8cd63485eb063de0b70ea6f3acf7102a61fef (patch)
tree70fa448baa769b6c8c331063a61bf929ad61c976 /include
parent6857cb57fe7090f131b272f31485b7a478a0b324 (diff)
parent387bdf07ae0973bc3e4dc3f5064d2a29c64bb769 (diff)
downloadmariadb-git-8ae8cd63485eb063de0b70ea6f3acf7102a61fef.tar.gz
Merge remote-tracking branch 'origin/10.2' into bb-10.2-ext
Diffstat (limited to 'include')
-rw-r--r--include/my_compiler.h2
-rw-r--r--include/mysql/plugin_audit.h.pp26
-rw-r--r--include/mysql/plugin_auth.h.pp26
-rw-r--r--include/mysql/plugin_encryption.h.pp26
-rw-r--r--include/mysql/plugin_ftparser.h.pp26
-rw-r--r--include/mysql/plugin_password_validation.h.pp26
-rw-r--r--include/mysql/service_thd_alloc.h20
-rw-r--r--include/mysql_async.h4
-rw-r--r--include/service_versions.h2
9 files changed, 79 insertions, 79 deletions
diff --git a/include/my_compiler.h b/include/my_compiler.h
index 97e6f9ae106..997c474b129 100644
--- a/include/my_compiler.h
+++ b/include/my_compiler.h
@@ -161,7 +161,7 @@ marked as unlikely by the branch prediction mechanism. optimize a
rarely invoked function for size instead for speed. */
# define ATTRIBUTE_COLD __attribute__((cold))
# endif
-#elif defined _WIN32
+#elif defined _MSC_VER
# define ATTRIBUTE_NORETURN __declspec(noreturn)
#else
# define ATTRIBUTE_NORETURN /* empty */
diff --git a/include/mysql/plugin_audit.h.pp b/include/mysql/plugin_audit.h.pp
index 43e64c06bf1..a46d9e65c0d 100644
--- a/include/mysql/plugin_audit.h.pp
+++ b/include/mysql/plugin_audit.h.pp
@@ -167,9 +167,9 @@ int my_random_bytes(unsigned char* buf, int num);
unsigned int my_aes_get_size(enum my_aes_mode mode, unsigned int source_length);
unsigned int my_aes_ctx_size(enum my_aes_mode mode);
extern struct my_print_error_service_st {
- void(*my_error_func)(unsigned int nr, unsigned long MyFlags, ...);
- void(*my_printf_error_func)(unsigned int nr, const char *fmt, unsigned long MyFlags,...);
- void(*my_printv_error_func)(unsigned int error, const char *format, unsigned long MyFlags, va_list ap);
+ void (*my_error_func)(unsigned int nr, unsigned long MyFlags, ...);
+ void (*my_printf_error_func)(unsigned int nr, const char *fmt, unsigned long MyFlags,...);
+ void (*my_printv_error_func)(unsigned int error, const char *format, unsigned long MyFlags, va_list ap);
} *my_print_error_service;
extern void my_error(unsigned int nr, unsigned long MyFlags, ...);
extern void my_printf_error(unsigned int my_err, const char *format, unsigned long MyFlags, ...);
@@ -278,23 +278,23 @@ struct st_mysql_const_lex_string
};
typedef struct st_mysql_const_lex_string MYSQL_CONST_LEX_STRING;
extern struct thd_alloc_service_st {
- void *(*thd_alloc_func)(void*, unsigned int);
- void *(*thd_calloc_func)(void*, unsigned int);
+ void *(*thd_alloc_func)(void*, size_t);
+ void *(*thd_calloc_func)(void*, size_t);
char *(*thd_strdup_func)(void*, const char *);
- char *(*thd_strmake_func)(void*, const char *, unsigned int);
- void *(*thd_memdup_func)(void*, const void*, unsigned int);
+ char *(*thd_strmake_func)(void*, const char *, size_t);
+ void *(*thd_memdup_func)(void*, const void*, size_t);
MYSQL_CONST_LEX_STRING *(*thd_make_lex_string_func)(void*,
MYSQL_CONST_LEX_STRING *,
- const char *, unsigned int, int);
+ const char *, size_t, int);
} *thd_alloc_service;
-void *thd_alloc(void* thd, unsigned int size);
-void *thd_calloc(void* thd, unsigned int size);
+void *thd_alloc(void* thd, size_t size);
+void *thd_calloc(void* thd, size_t size);
char *thd_strdup(void* thd, const char *str);
-char *thd_strmake(void* thd, const char *str, unsigned int size);
-void *thd_memdup(void* thd, const void* str, unsigned int size);
+char *thd_strmake(void* thd, const char *str, size_t size);
+void *thd_memdup(void* thd, const void* str, size_t size);
MYSQL_CONST_LEX_STRING
*thd_make_lex_string(void* thd, MYSQL_CONST_LEX_STRING *lex_str,
- const char *str, unsigned int size,
+ const char *str, size_t size,
int allocate_lex_string);
extern struct thd_autoinc_service_st {
void (*thd_get_autoinc_func)(const void* thd,
diff --git a/include/mysql/plugin_auth.h.pp b/include/mysql/plugin_auth.h.pp
index 3ee1f70ca80..7c8500e29db 100644
--- a/include/mysql/plugin_auth.h.pp
+++ b/include/mysql/plugin_auth.h.pp
@@ -167,9 +167,9 @@ int my_random_bytes(unsigned char* buf, int num);
unsigned int my_aes_get_size(enum my_aes_mode mode, unsigned int source_length);
unsigned int my_aes_ctx_size(enum my_aes_mode mode);
extern struct my_print_error_service_st {
- void(*my_error_func)(unsigned int nr, unsigned long MyFlags, ...);
- void(*my_printf_error_func)(unsigned int nr, const char *fmt, unsigned long MyFlags,...);
- void(*my_printv_error_func)(unsigned int error, const char *format, unsigned long MyFlags, va_list ap);
+ void (*my_error_func)(unsigned int nr, unsigned long MyFlags, ...);
+ void (*my_printf_error_func)(unsigned int nr, const char *fmt, unsigned long MyFlags,...);
+ void (*my_printv_error_func)(unsigned int error, const char *format, unsigned long MyFlags, va_list ap);
} *my_print_error_service;
extern void my_error(unsigned int nr, unsigned long MyFlags, ...);
extern void my_printf_error(unsigned int my_err, const char *format, unsigned long MyFlags, ...);
@@ -278,23 +278,23 @@ struct st_mysql_const_lex_string
};
typedef struct st_mysql_const_lex_string MYSQL_CONST_LEX_STRING;
extern struct thd_alloc_service_st {
- void *(*thd_alloc_func)(void*, unsigned int);
- void *(*thd_calloc_func)(void*, unsigned int);
+ void *(*thd_alloc_func)(void*, size_t);
+ void *(*thd_calloc_func)(void*, size_t);
char *(*thd_strdup_func)(void*, const char *);
- char *(*thd_strmake_func)(void*, const char *, unsigned int);
- void *(*thd_memdup_func)(void*, const void*, unsigned int);
+ char *(*thd_strmake_func)(void*, const char *, size_t);
+ void *(*thd_memdup_func)(void*, const void*, size_t);
MYSQL_CONST_LEX_STRING *(*thd_make_lex_string_func)(void*,
MYSQL_CONST_LEX_STRING *,
- const char *, unsigned int, int);
+ const char *, size_t, int);
} *thd_alloc_service;
-void *thd_alloc(void* thd, unsigned int size);
-void *thd_calloc(void* thd, unsigned int size);
+void *thd_alloc(void* thd, size_t size);
+void *thd_calloc(void* thd, size_t size);
char *thd_strdup(void* thd, const char *str);
-char *thd_strmake(void* thd, const char *str, unsigned int size);
-void *thd_memdup(void* thd, const void* str, unsigned int size);
+char *thd_strmake(void* thd, const char *str, size_t size);
+void *thd_memdup(void* thd, const void* str, size_t size);
MYSQL_CONST_LEX_STRING
*thd_make_lex_string(void* thd, MYSQL_CONST_LEX_STRING *lex_str,
- const char *str, unsigned int size,
+ const char *str, size_t size,
int allocate_lex_string);
extern struct thd_autoinc_service_st {
void (*thd_get_autoinc_func)(const void* thd,
diff --git a/include/mysql/plugin_encryption.h.pp b/include/mysql/plugin_encryption.h.pp
index 4791846f4f2..4829e42df18 100644
--- a/include/mysql/plugin_encryption.h.pp
+++ b/include/mysql/plugin_encryption.h.pp
@@ -167,9 +167,9 @@ int my_random_bytes(unsigned char* buf, int num);
unsigned int my_aes_get_size(enum my_aes_mode mode, unsigned int source_length);
unsigned int my_aes_ctx_size(enum my_aes_mode mode);
extern struct my_print_error_service_st {
- void(*my_error_func)(unsigned int nr, unsigned long MyFlags, ...);
- void(*my_printf_error_func)(unsigned int nr, const char *fmt, unsigned long MyFlags,...);
- void(*my_printv_error_func)(unsigned int error, const char *format, unsigned long MyFlags, va_list ap);
+ void (*my_error_func)(unsigned int nr, unsigned long MyFlags, ...);
+ void (*my_printf_error_func)(unsigned int nr, const char *fmt, unsigned long MyFlags,...);
+ void (*my_printv_error_func)(unsigned int error, const char *format, unsigned long MyFlags, va_list ap);
} *my_print_error_service;
extern void my_error(unsigned int nr, unsigned long MyFlags, ...);
extern void my_printf_error(unsigned int my_err, const char *format, unsigned long MyFlags, ...);
@@ -278,23 +278,23 @@ struct st_mysql_const_lex_string
};
typedef struct st_mysql_const_lex_string MYSQL_CONST_LEX_STRING;
extern struct thd_alloc_service_st {
- void *(*thd_alloc_func)(void*, unsigned int);
- void *(*thd_calloc_func)(void*, unsigned int);
+ void *(*thd_alloc_func)(void*, size_t);
+ void *(*thd_calloc_func)(void*, size_t);
char *(*thd_strdup_func)(void*, const char *);
- char *(*thd_strmake_func)(void*, const char *, unsigned int);
- void *(*thd_memdup_func)(void*, const void*, unsigned int);
+ char *(*thd_strmake_func)(void*, const char *, size_t);
+ void *(*thd_memdup_func)(void*, const void*, size_t);
MYSQL_CONST_LEX_STRING *(*thd_make_lex_string_func)(void*,
MYSQL_CONST_LEX_STRING *,
- const char *, unsigned int, int);
+ const char *, size_t, int);
} *thd_alloc_service;
-void *thd_alloc(void* thd, unsigned int size);
-void *thd_calloc(void* thd, unsigned int size);
+void *thd_alloc(void* thd, size_t size);
+void *thd_calloc(void* thd, size_t size);
char *thd_strdup(void* thd, const char *str);
-char *thd_strmake(void* thd, const char *str, unsigned int size);
-void *thd_memdup(void* thd, const void* str, unsigned int size);
+char *thd_strmake(void* thd, const char *str, size_t size);
+void *thd_memdup(void* thd, const void* str, size_t size);
MYSQL_CONST_LEX_STRING
*thd_make_lex_string(void* thd, MYSQL_CONST_LEX_STRING *lex_str,
- const char *str, unsigned int size,
+ const char *str, size_t size,
int allocate_lex_string);
extern struct thd_autoinc_service_st {
void (*thd_get_autoinc_func)(const void* thd,
diff --git a/include/mysql/plugin_ftparser.h.pp b/include/mysql/plugin_ftparser.h.pp
index 8fde9918fbc..49185b79479 100644
--- a/include/mysql/plugin_ftparser.h.pp
+++ b/include/mysql/plugin_ftparser.h.pp
@@ -167,9 +167,9 @@ int my_random_bytes(unsigned char* buf, int num);
unsigned int my_aes_get_size(enum my_aes_mode mode, unsigned int source_length);
unsigned int my_aes_ctx_size(enum my_aes_mode mode);
extern struct my_print_error_service_st {
- void(*my_error_func)(unsigned int nr, unsigned long MyFlags, ...);
- void(*my_printf_error_func)(unsigned int nr, const char *fmt, unsigned long MyFlags,...);
- void(*my_printv_error_func)(unsigned int error, const char *format, unsigned long MyFlags, va_list ap);
+ void (*my_error_func)(unsigned int nr, unsigned long MyFlags, ...);
+ void (*my_printf_error_func)(unsigned int nr, const char *fmt, unsigned long MyFlags,...);
+ void (*my_printv_error_func)(unsigned int error, const char *format, unsigned long MyFlags, va_list ap);
} *my_print_error_service;
extern void my_error(unsigned int nr, unsigned long MyFlags, ...);
extern void my_printf_error(unsigned int my_err, const char *format, unsigned long MyFlags, ...);
@@ -278,23 +278,23 @@ struct st_mysql_const_lex_string
};
typedef struct st_mysql_const_lex_string MYSQL_CONST_LEX_STRING;
extern struct thd_alloc_service_st {
- void *(*thd_alloc_func)(void*, unsigned int);
- void *(*thd_calloc_func)(void*, unsigned int);
+ void *(*thd_alloc_func)(void*, size_t);
+ void *(*thd_calloc_func)(void*, size_t);
char *(*thd_strdup_func)(void*, const char *);
- char *(*thd_strmake_func)(void*, const char *, unsigned int);
- void *(*thd_memdup_func)(void*, const void*, unsigned int);
+ char *(*thd_strmake_func)(void*, const char *, size_t);
+ void *(*thd_memdup_func)(void*, const void*, size_t);
MYSQL_CONST_LEX_STRING *(*thd_make_lex_string_func)(void*,
MYSQL_CONST_LEX_STRING *,
- const char *, unsigned int, int);
+ const char *, size_t, int);
} *thd_alloc_service;
-void *thd_alloc(void* thd, unsigned int size);
-void *thd_calloc(void* thd, unsigned int size);
+void *thd_alloc(void* thd, size_t size);
+void *thd_calloc(void* thd, size_t size);
char *thd_strdup(void* thd, const char *str);
-char *thd_strmake(void* thd, const char *str, unsigned int size);
-void *thd_memdup(void* thd, const void* str, unsigned int size);
+char *thd_strmake(void* thd, const char *str, size_t size);
+void *thd_memdup(void* thd, const void* str, size_t size);
MYSQL_CONST_LEX_STRING
*thd_make_lex_string(void* thd, MYSQL_CONST_LEX_STRING *lex_str,
- const char *str, unsigned int size,
+ const char *str, size_t size,
int allocate_lex_string);
extern struct thd_autoinc_service_st {
void (*thd_get_autoinc_func)(const void* thd,
diff --git a/include/mysql/plugin_password_validation.h.pp b/include/mysql/plugin_password_validation.h.pp
index 9d7717f4b32..88c98bc3205 100644
--- a/include/mysql/plugin_password_validation.h.pp
+++ b/include/mysql/plugin_password_validation.h.pp
@@ -167,9 +167,9 @@ int my_random_bytes(unsigned char* buf, int num);
unsigned int my_aes_get_size(enum my_aes_mode mode, unsigned int source_length);
unsigned int my_aes_ctx_size(enum my_aes_mode mode);
extern struct my_print_error_service_st {
- void(*my_error_func)(unsigned int nr, unsigned long MyFlags, ...);
- void(*my_printf_error_func)(unsigned int nr, const char *fmt, unsigned long MyFlags,...);
- void(*my_printv_error_func)(unsigned int error, const char *format, unsigned long MyFlags, va_list ap);
+ void (*my_error_func)(unsigned int nr, unsigned long MyFlags, ...);
+ void (*my_printf_error_func)(unsigned int nr, const char *fmt, unsigned long MyFlags,...);
+ void (*my_printv_error_func)(unsigned int error, const char *format, unsigned long MyFlags, va_list ap);
} *my_print_error_service;
extern void my_error(unsigned int nr, unsigned long MyFlags, ...);
extern void my_printf_error(unsigned int my_err, const char *format, unsigned long MyFlags, ...);
@@ -278,23 +278,23 @@ struct st_mysql_const_lex_string
};
typedef struct st_mysql_const_lex_string MYSQL_CONST_LEX_STRING;
extern struct thd_alloc_service_st {
- void *(*thd_alloc_func)(void*, unsigned int);
- void *(*thd_calloc_func)(void*, unsigned int);
+ void *(*thd_alloc_func)(void*, size_t);
+ void *(*thd_calloc_func)(void*, size_t);
char *(*thd_strdup_func)(void*, const char *);
- char *(*thd_strmake_func)(void*, const char *, unsigned int);
- void *(*thd_memdup_func)(void*, const void*, unsigned int);
+ char *(*thd_strmake_func)(void*, const char *, size_t);
+ void *(*thd_memdup_func)(void*, const void*, size_t);
MYSQL_CONST_LEX_STRING *(*thd_make_lex_string_func)(void*,
MYSQL_CONST_LEX_STRING *,
- const char *, unsigned int, int);
+ const char *, size_t, int);
} *thd_alloc_service;
-void *thd_alloc(void* thd, unsigned int size);
-void *thd_calloc(void* thd, unsigned int size);
+void *thd_alloc(void* thd, size_t size);
+void *thd_calloc(void* thd, size_t size);
char *thd_strdup(void* thd, const char *str);
-char *thd_strmake(void* thd, const char *str, unsigned int size);
-void *thd_memdup(void* thd, const void* str, unsigned int size);
+char *thd_strmake(void* thd, const char *str, size_t size);
+void *thd_memdup(void* thd, const void* str, size_t size);
MYSQL_CONST_LEX_STRING
*thd_make_lex_string(void* thd, MYSQL_CONST_LEX_STRING *lex_str,
- const char *str, unsigned int size,
+ const char *str, size_t size,
int allocate_lex_string);
extern struct thd_autoinc_service_st {
void (*thd_get_autoinc_func)(const void* thd,
diff --git a/include/mysql/service_thd_alloc.h b/include/mysql/service_thd_alloc.h
index 8d6ed8e4190..4897fcbea9c 100644
--- a/include/mysql/service_thd_alloc.h
+++ b/include/mysql/service_thd_alloc.h
@@ -50,14 +50,14 @@ struct st_mysql_const_lex_string
typedef struct st_mysql_const_lex_string MYSQL_CONST_LEX_STRING;
extern struct thd_alloc_service_st {
- void *(*thd_alloc_func)(MYSQL_THD, unsigned int);
- void *(*thd_calloc_func)(MYSQL_THD, unsigned int);
+ void *(*thd_alloc_func)(MYSQL_THD, size_t);
+ void *(*thd_calloc_func)(MYSQL_THD, size_t);
char *(*thd_strdup_func)(MYSQL_THD, const char *);
- char *(*thd_strmake_func)(MYSQL_THD, const char *, unsigned int);
- void *(*thd_memdup_func)(MYSQL_THD, const void*, unsigned int);
+ char *(*thd_strmake_func)(MYSQL_THD, const char *, size_t);
+ void *(*thd_memdup_func)(MYSQL_THD, const void*, size_t);
MYSQL_CONST_LEX_STRING *(*thd_make_lex_string_func)(MYSQL_THD,
MYSQL_CONST_LEX_STRING *,
- const char *, unsigned int, int);
+ const char *, size_t, int);
} *thd_alloc_service;
#ifdef MYSQL_DYNAMIC_PLUGIN
@@ -92,11 +92,11 @@ extern struct thd_alloc_service_st {
@see alloc_root()
*/
-void *thd_alloc(MYSQL_THD thd, unsigned int size);
+void *thd_alloc(MYSQL_THD thd, size_t size);
/**
@see thd_alloc()
*/
-void *thd_calloc(MYSQL_THD thd, unsigned int size);
+void *thd_calloc(MYSQL_THD thd, size_t size);
/**
@see thd_alloc()
*/
@@ -104,11 +104,11 @@ char *thd_strdup(MYSQL_THD thd, const char *str);
/**
@see thd_alloc()
*/
-char *thd_strmake(MYSQL_THD thd, const char *str, unsigned int size);
+char *thd_strmake(MYSQL_THD thd, const char *str, size_t size);
/**
@see thd_alloc()
*/
-void *thd_memdup(MYSQL_THD thd, const void* str, unsigned int size);
+void *thd_memdup(MYSQL_THD thd, const void* str, size_t size);
/**
Create a LEX_STRING in this connection's local memory pool
@@ -125,7 +125,7 @@ void *thd_memdup(MYSQL_THD thd, const void* str, unsigned int size);
*/
MYSQL_CONST_LEX_STRING
*thd_make_lex_string(MYSQL_THD thd, MYSQL_CONST_LEX_STRING *lex_str,
- const char *str, unsigned int size,
+ const char *str, size_t size,
int allocate_lex_string);
#endif
diff --git a/include/mysql_async.h b/include/mysql_async.h
index 04b975211db..32c1116dc58 100644
--- a/include/mysql_async.h
+++ b/include/mysql_async.h
@@ -21,9 +21,9 @@
extern int my_connect_async(struct mysql_async_context *b, my_socket fd,
const struct sockaddr *name, uint namelen,
int vio_timeout);
-extern ssize_t my_recv_async(struct mysql_async_context *b, int fd,
+extern ssize_t my_recv_async(struct mysql_async_context *b, my_socket fd,
unsigned char *buf, size_t size, int timeout);
-extern ssize_t my_send_async(struct mysql_async_context *b, int fd,
+extern ssize_t my_send_async(struct mysql_async_context *b, my_socket fd,
const unsigned char *buf, size_t size,
int timeout);
extern my_bool my_io_wait_async(struct mysql_async_context *b,
diff --git a/include/service_versions.h b/include/service_versions.h
index da7a2101f76..582b3912355 100644
--- a/include/service_versions.h
+++ b/include/service_versions.h
@@ -34,7 +34,7 @@
#define VERSION_my_sha2 0x0100
#define VERSION_my_snprintf 0x0100
#define VERSION_progress_report 0x0100
-#define VERSION_thd_alloc 0x0100
+#define VERSION_thd_alloc 0x0200
#define VERSION_thd_autoinc 0x0100
#define VERSION_thd_error_context 0x0200
#define VERSION_thd_rnd 0x0100