diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2015-12-02 18:19:43 +0100 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2015-12-02 18:19:43 +0100 |
commit | ba8e630d97af2b2ed3e527070f1cab05571911fd (patch) | |
tree | 1fb151b56f93cca58baa6a8e0828517ce891e5a8 /sql/mysql_install_db.cc | |
parent | 3bae880887b7191711e02f206e9b559819fa7b45 (diff) | |
download | mariadb-git-ba8e630d97af2b2ed3e527070f1cab05571911fd.tar.gz |
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.
Diffstat (limited to 'sql/mysql_install_db.cc')
-rw-r--r-- | sql/mysql_install_db.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/mysql_install_db.cc b/sql/mysql_install_db.cc index 50454f0f66a..9b4f45a9971 100644 --- a/sql/mysql_install_db.cc +++ b/sql/mysql_install_db.cc @@ -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"); |