diff options
Diffstat (limited to 'sql/mysqld.cc')
-rw-r--r-- | sql/mysqld.cc | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 6bd8fdebf10..692af10052f 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -4994,8 +4994,6 @@ static int init_server_components() } #endif - DBUG_ASSERT(!opt_bin_log || opt_bin_logname); - if (opt_bin_log) { /* Reports an error and aborts, if the --log-bin's path @@ -5087,6 +5085,11 @@ static int init_server_components() { set_ports(); // this is also called in network_init() later but we need // to know mysqld_port now - lp:1071882 + /* + Plugin initialization (plugin_init()) hasn't happened yet, set + maria_hton to 0. + */ + maria_hton= 0; wsrep_init_startup(true); } } @@ -5856,7 +5859,14 @@ int mysqld_main(int argc, char **argv) (char*) "" : mysqld_unix_port), mysqld_port, MYSQL_COMPILATION_COMMENT); - fclose(stdin); + + // try to keep fd=0 busy + if (!freopen(IF_WIN("NUL","/dev/null"), "r", stdin)) + { + // fall back on failure + fclose(stdin); + } + #if defined(_WIN32) && !defined(EMBEDDED_LIBRARY) Service.SetRunning(); #endif |