MDEV-34714 perror-win test failure on localized Windows

Let perror produce OS error messages in English
This commit is contained in:
Vladislav Vaintroub 2024-08-06 14:35:39 +02:00
parent 4a67bd5105
commit e997bf58fb

View file

@ -206,7 +206,8 @@ static my_bool print_win_error_msg(DWORD error, my_bool verbose)
char *s;
if (FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM,
NULL, error, 0, (char *)&s, 0,
NULL, error, MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US),
(char *) &s, 0,
NULL))
{
char* end = s + strlen(s) - 1;