diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2017-02-28 12:57:33 +0000 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2017-02-28 12:57:33 +0000 |
commit | d4baeca441b248de024719f556b681ce868501ae (patch) | |
tree | 611cfb341c9734bc85aa4a3f2de6322fc9b4c1cb | |
parent | fc673a2c121f524a7ed4101b8b9a0cedf8d6fd58 (diff) | |
download | mariadb-git-d4baeca441b248de024719f556b681ce868501ae.tar.gz |
Windows : Fix server compile errors when compile with /Zc:strictStrings option
-rw-r--r-- | client/mysqlbinlog.cc | 2 | ||||
-rw-r--r-- | include/my_global.h | 7 | ||||
-rw-r--r-- | sql/mysql_install_db.cc | 4 | ||||
-rw-r--r-- | sql/mysqld.cc | 2 | ||||
-rw-r--r-- | sql/mysqld.h | 3 | ||||
-rw-r--r-- | sql/nt_servc.cc | 2 | ||||
-rw-r--r-- | sql/nt_servc.h | 2 |
7 files changed, 11 insertions, 11 deletions
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc index 4be31421f9b..29355d013c7 100644 --- a/client/mysqlbinlog.cc +++ b/client/mysqlbinlog.cc @@ -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; diff --git a/include/my_global.h b/include/my_global.h index 007c9400ec0..a61fd765995 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -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 diff --git a/sql/mysql_install_db.cc b/sql/mysql_install_db.cc index c23a20ebac9..de799874a8f 100644 --- a/sql/mysql_install_db.cc +++ b/sql/mysql_install_db.cc @@ -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); diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 6e40168990f..a6b6cdfae9b 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -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 diff --git a/sql/mysqld.h b/sql/mysqld.h index 732f00c887a..e7394230fe4 100644 --- a/sql/mysqld.h +++ b/sql/mysqld.h @@ -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; diff --git a/sql/nt_servc.cc b/sql/nt_servc.cc index d6a8eac7ed5..e05e43a0a59 100644 --- a/sql/nt_servc.cc +++ b/sql/nt_servc.cc @@ -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++) diff --git a/sql/nt_servc.h b/sql/nt_servc.h index 949499d8d7f..6781fe0ddfa 100644 --- a/sql/nt_servc.h +++ b/sql/nt_servc.h @@ -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(); /* |