Windows : Fix server compile errors when compile with /Zc:strictStrings option
This commit is contained in:
parent
fc673a2c12
commit
d4baeca441
@ -106,7 +106,7 @@ static const char* sock= 0;
|
||||
static char *opt_plugindir= 0, *opt_default_auth= 0;
|
||||
|
||||
#ifdef HAVE_SMEM
|
||||
static char *shared_memory_base_name= 0;
|
||||
static const char *shared_memory_base_name= 0;
|
||||
#endif
|
||||
static char* user = 0;
|
||||
static char* pass = 0;
|
||||
|
@ -1078,10 +1078,9 @@ typedef ulong myf; /* Type of MyFlags in my_funcs */
|
||||
static inline char *dlerror(void)
|
||||
{
|
||||
static char win_errormsg[2048];
|
||||
if(FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
0, GetLastError(), 0, win_errormsg, 2048, NULL))
|
||||
return win_errormsg;
|
||||
return "";
|
||||
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,
|
||||
0, GetLastError(), 0, win_errormsg, 2048, NULL);
|
||||
return win_errormsg;
|
||||
}
|
||||
#define HAVE_DLOPEN 1
|
||||
#define HAVE_DLERROR 1
|
||||
|
@ -386,8 +386,8 @@ static int register_service()
|
||||
CloseServiceHandle(sc_manager);
|
||||
die("CreateService failed (%u)", GetLastError());
|
||||
}
|
||||
|
||||
SERVICE_DESCRIPTION sd= { "MariaDB database server" };
|
||||
char description[] = "MariaDB database server";
|
||||
SERVICE_DESCRIPTION sd= { description };
|
||||
ChangeServiceConfig2(sc_service, SERVICE_CONFIG_DESCRIPTION, &sd);
|
||||
CloseServiceHandle(sc_service);
|
||||
CloseServiceHandle(sc_manager);
|
||||
|
@ -1414,7 +1414,7 @@ ulong query_cache_min_res_unit= QUERY_CACHE_MIN_RESULT_DATA_SIZE;
|
||||
Query_cache query_cache;
|
||||
#endif
|
||||
#ifdef HAVE_SMEM
|
||||
char *shared_memory_base_name= default_shared_memory_base_name;
|
||||
const char *shared_memory_base_name= default_shared_memory_base_name;
|
||||
my_bool opt_enable_shared_memory;
|
||||
HANDLE smem_event_connect_request= 0;
|
||||
#endif
|
||||
|
@ -118,7 +118,8 @@ extern my_bool sp_automatic_privileges, opt_noacl;
|
||||
extern ulong use_stat_tables;
|
||||
extern my_bool opt_old_style_user_limits, trust_function_creators;
|
||||
extern uint opt_crash_binlog_innodb;
|
||||
extern char *shared_memory_base_name, *mysqld_unix_port;
|
||||
extern const char *shared_memory_base_name;
|
||||
extern char *mysqld_unix_port;
|
||||
extern my_bool opt_enable_shared_memory;
|
||||
extern ulong opt_replicate_events_marked_for_skip;
|
||||
extern char *default_tz_name;
|
||||
|
@ -508,7 +508,7 @@ BOOL NTService::IsService(LPCSTR ServiceName)
|
||||
}
|
||||
/* ------------------------------------------------------------------------
|
||||
-------------------------------------------------------------------------- */
|
||||
BOOL NTService::got_service_option(char **argv, char *service_option)
|
||||
BOOL NTService::got_service_option(char **argv, const char *service_option)
|
||||
{
|
||||
char *option;
|
||||
for (option= argv[1]; *option; option++)
|
||||
|
@ -61,7 +61,7 @@ class NTService
|
||||
BOOL SeekStatus(LPCSTR szInternName, int OperationType);
|
||||
BOOL Remove(LPCSTR szInternName);
|
||||
BOOL IsService(LPCSTR ServiceName);
|
||||
BOOL got_service_option(char **argv, char *service_option);
|
||||
BOOL got_service_option(char **argv, const char *service_option);
|
||||
BOOL is_super_user();
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user