summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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/service_versions.h2
-rw-r--r--sql/sql_class.cc10
-rw-r--r--storage/innobase/handler/ha_innodb.cc16
9 files changed, 89 insertions, 89 deletions
diff --git a/include/mysql/plugin_audit.h.pp b/include/mysql/plugin_audit.h.pp
index 03f6f0caba0..410781669ba 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, ...);
@@ -271,21 +271,21 @@ struct st_mysql_lex_string
};
typedef struct st_mysql_lex_string MYSQL_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_LEX_STRING *(*thd_make_lex_string_func)(void*, MYSQL_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_LEX_STRING *thd_make_lex_string(void* thd, MYSQL_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 07cdb1b5f52..62061f74274 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, ...);
@@ -271,21 +271,21 @@ struct st_mysql_lex_string
};
typedef struct st_mysql_lex_string MYSQL_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_LEX_STRING *(*thd_make_lex_string_func)(void*, MYSQL_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_LEX_STRING *thd_make_lex_string(void* thd, MYSQL_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 7275f0a982e..1277147e55f 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, ...);
@@ -271,21 +271,21 @@ struct st_mysql_lex_string
};
typedef struct st_mysql_lex_string MYSQL_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_LEX_STRING *(*thd_make_lex_string_func)(void*, MYSQL_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_LEX_STRING *thd_make_lex_string(void* thd, MYSQL_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 eee69281afe..85c6700227f 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, ...);
@@ -271,21 +271,21 @@ struct st_mysql_lex_string
};
typedef struct st_mysql_lex_string MYSQL_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_LEX_STRING *(*thd_make_lex_string_func)(void*, MYSQL_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_LEX_STRING *thd_make_lex_string(void* thd, MYSQL_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 adb0afc734d..25eb5425e52 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, ...);
@@ -271,21 +271,21 @@ struct st_mysql_lex_string
};
typedef struct st_mysql_lex_string MYSQL_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_LEX_STRING *(*thd_make_lex_string_func)(void*, MYSQL_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_LEX_STRING *thd_make_lex_string(void* thd, MYSQL_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 e92f81b52c3..aa275c57dfc 100644
--- a/include/mysql/service_thd_alloc.h
+++ b/include/mysql/service_thd_alloc.h
@@ -43,13 +43,13 @@ struct st_mysql_lex_string
typedef struct st_mysql_lex_string MYSQL_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_LEX_STRING *(*thd_make_lex_string_func)(MYSQL_THD, MYSQL_LEX_STRING *,
- const char *, unsigned int, int);
+ const char *, size_t, int);
} *thd_alloc_service;
#ifdef MYSQL_DYNAMIC_PLUGIN
@@ -84,11 +84,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()
*/
@@ -96,11 +96,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
@@ -116,7 +116,7 @@ void *thd_memdup(MYSQL_THD thd, const void* str, unsigned int size);
@see thd_alloc()
*/
MYSQL_LEX_STRING *thd_make_lex_string(MYSQL_THD thd, MYSQL_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/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
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 4d2cd46fda1..d090372bb1e 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -1156,13 +1156,13 @@ Sql_condition* THD::raise_condition(uint sql_errno,
}
extern "C"
-void *thd_alloc(MYSQL_THD thd, unsigned int size)
+void *thd_alloc(MYSQL_THD thd, size_t size)
{
return thd->alloc(size);
}
extern "C"
-void *thd_calloc(MYSQL_THD thd, unsigned int size)
+void *thd_calloc(MYSQL_THD thd, size_t size)
{
return thd->calloc(size);
}
@@ -1174,14 +1174,14 @@ char *thd_strdup(MYSQL_THD thd, const char *str)
}
extern "C"
-char *thd_strmake(MYSQL_THD thd, const char *str, unsigned int size)
+char *thd_strmake(MYSQL_THD thd, const char *str, size_t size)
{
return thd->strmake(str, size);
}
extern "C"
LEX_STRING *thd_make_lex_string(THD *thd, LEX_STRING *lex_str,
- const char *str, unsigned int size,
+ const char *str, size_t size,
int allocate_lex_string)
{
return allocate_lex_string ? thd->make_lex_string(str, size)
@@ -1189,7 +1189,7 @@ LEX_STRING *thd_make_lex_string(THD *thd, LEX_STRING *lex_str,
}
extern "C"
-void *thd_memdup(MYSQL_THD thd, const void* str, unsigned int size)
+void *thd_memdup(MYSQL_THD thd, const void* str, size_t size)
{
return thd->memdup(str, size);
}
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index f6b065e96b1..2ebdd259e93 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -15591,7 +15591,7 @@ get_foreign_key_info(
ptr = dict_remove_db_name(foreign->id);
f_key_info.foreign_id = thd_make_lex_string(
- thd, 0, ptr, (uint) strlen(ptr), 1);
+ thd, 0, ptr, strlen(ptr), 1);
/* Name format: database name, '/', table name, '\0' */
@@ -15603,13 +15603,13 @@ get_foreign_key_info(
len = filename_to_tablename(tmp_buff, name_buff, sizeof(name_buff));
f_key_info.referenced_db = thd_make_lex_string(
- thd, 0, name_buff, static_cast<unsigned int>(len), 1);
+ thd, 0, name_buff, len, 1);
/* Referenced (parent) table name */
ptr = dict_remove_db_name(foreign->referenced_table_name);
len = filename_to_tablename(ptr, name_buff, sizeof(name_buff));
f_key_info.referenced_table = thd_make_lex_string(
- thd, 0, name_buff, static_cast<unsigned int>(len), 1);
+ thd, 0, name_buff, len, 1);
/* Dependent (child) database name */
len = dict_get_db_name_len(foreign->foreign_table_name);
@@ -15619,22 +15619,22 @@ get_foreign_key_info(
len = filename_to_tablename(tmp_buff, name_buff, sizeof(name_buff));
f_key_info.foreign_db = thd_make_lex_string(
- thd, 0, name_buff, static_cast<unsigned int>(len), 1);
+ thd, 0, name_buff, len, 1);
/* Dependent (child) table name */
ptr = dict_remove_db_name(foreign->foreign_table_name);
len = filename_to_tablename(ptr, name_buff, sizeof(name_buff));
f_key_info.foreign_table = thd_make_lex_string(
- thd, 0, name_buff, static_cast<unsigned int>(len), 1);
+ thd, 0, name_buff, len, 1);
do {
ptr = foreign->foreign_col_names[i];
name = thd_make_lex_string(thd, name, ptr,
- (uint) strlen(ptr), 1);
+ strlen(ptr), 1);
f_key_info.foreign_fields.push_back(name);
ptr = foreign->referenced_col_names[i];
name = thd_make_lex_string(thd, name, ptr,
- (uint) strlen(ptr), 1);
+ strlen(ptr), 1);
f_key_info.referenced_fields.push_back(name);
} while (++i < foreign->n_fields);
@@ -15691,7 +15691,7 @@ get_foreign_key_info(
thd,
f_key_info.referenced_key_name,
foreign->referenced_index->name,
- (uint) strlen(foreign->referenced_index->name),
+ strlen(foreign->referenced_index->name),
1);
} else {
referenced_key_name = NULL;