summaryrefslogtreecommitdiff
path: root/sql/winmain.cc
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2021-11-19 14:03:51 +0100
committerSergei Golubchik <serg@mariadb.org>2021-12-15 19:13:57 +0100
commitea0a5cb0a4efbca1fc35885599e07baf10dc3e9e (patch)
tree8282d58bf98178b764b6f6f09c594670a4091e5a /sql/winmain.cc
parent99e5ae3b1a68ad1029f06aa3d2a5078d78cf19e5 (diff)
downloadmariadb-git-ea0a5cb0a4efbca1fc35885599e07baf10dc3e9e.tar.gz
MDEV-27092 Windows - services that have non-ASCII characters do not work with activeCodePage=UTF8
CreateServiceA, OpenServiceA, and couple of other functions do not work correctly with non-ASCII character, in the special case where application has defined activeCodePage=UTF8. Workaround by redefining affected ANSI functions to own wrapper, which works by converting narrow(ANSI) to wide, then calling wide function. Deprecate original ANSI service functions, via declspec, so that we can catch their use.
Diffstat (limited to 'sql/winmain.cc')
-rw-r--r--sql/winmain.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/winmain.cc b/sql/winmain.cc
index f999767cb27..bdad409065d 100644
--- a/sql/winmain.cc
+++ b/sql/winmain.cc
@@ -55,6 +55,7 @@
#include <windows.h>
#include <string>
#include <cassert>
+#include <winservice.h>
static SERVICE_STATUS svc_status{SERVICE_WIN32_OWN_PROCESS};
static SERVICE_STATUS_HANDLE svc_status_handle;