Commit ba8e630d authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Disable buffering when writing to mysqld's stdin.

Due to a bug in Visual Studio 2015 runtime, some newlines get lost
which makes the bootstrapping fail (which also makes MSI installer
non-functional).

This does not have a visible effect on packages we produce so far,
because we do not use VS2015 yet for building them.
parent 3bae8808
......@@ -563,6 +563,10 @@ static int create_db_instance()
if (!in)
goto end;
if (setvbuf(in, NULL, _IONBF, 0))
{
verbose("WARNING: Cannot disable buffering on mysqld's stdin");
}
if (fwrite("use mysql;\n",11,1, in) != 1)
{
verbose("ERROR: Cannot write to mysqld's stdin");
......
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