Commit d0ee3b55 authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

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 141bc58a, null pointer was passed
instead of valid pointer.

The fix is to provide a valid lpNumberOfBytesWritten parameter.
parent 410585ca
......@@ -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);\
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment