1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-19427 mysql_upgrade_service throws exception upgrading from 10.0 to 10.3

The crash happens when writing into log file.
The reason is likely that the call to WriteFile() was missing a valid
parameter for lpNumberOfBytesWritten. This seems only to happen on ancient
version of Windows.

Since the fix to MDEV-16430 in 141bc58ac9, null pointer was passed
instead of valid pointer.

The fix is to provide a valid lpNumberOfBytesWritten parameter.
This commit is contained in:
Vladislav Vaintroub
2019-05-09 16:55:08 +02:00
parent 410585ca63
commit d0ee3b5500

View File

@ -148,8 +148,9 @@ static void die(const char *fmt, ...)
#define WRITE_LOG(fmt,...) {\
char log_buf[1024]; \
DWORD nbytes; \
snprintf(log_buf,sizeof(log_buf), fmt, __VA_ARGS__);\
WriteFile(logfile_handle,log_buf, strlen(log_buf), 0 , 0);\
WriteFile(logfile_handle,log_buf, strlen(log_buf), &nbytes , 0);\
}
/*