Commit e08a2359 authored by petr@mysql.com's avatar petr@mysql.com

Do not create log table handler if run in bootstrap mode.

This patch also fixes annoying complains on the log tables
absence, issued by the shell version of mysql-test-run.
parent 6e688cd9
...@@ -473,11 +473,17 @@ public: ...@@ -473,11 +473,17 @@ public:
bool flush_logs(THD *thd); bool flush_logs(THD *thd);
THD *get_general_log_thd() THD *get_general_log_thd()
{ {
return (THD *) table_log_handler->general_log_thd; if (table_log_handler)
return (THD *) table_log_handler->general_log_thd;
else
return NULL;
} }
THD *get_slow_log_thd() THD *get_slow_log_thd()
{ {
return (THD *) table_log_handler->slow_log_thd; if (table_log_handler)
return (THD *) table_log_handler->slow_log_thd;
else
return NULL;
} }
/* Perform basic logger cleanup. this will leave e.g. error log open. */ /* Perform basic logger cleanup. this will leave e.g. error log open. */
void cleanup_base(); void cleanup_base();
......
...@@ -3086,7 +3086,10 @@ static int init_server_components() ...@@ -3086,7 +3086,10 @@ static int init_server_components()
} }
#ifdef WITH_CSV_STORAGE_ENGINE #ifdef WITH_CSV_STORAGE_ENGINE
logger.init_log_tables(); if (opt_bootstrap)
opt_old_log_format= TRUE;
else
logger.init_log_tables();
if (opt_old_log_format || (have_csv_db != SHOW_OPTION_YES)) if (opt_old_log_format || (have_csv_db != SHOW_OPTION_YES))
logger.set_handlers(LEGACY, opt_slow_log ? LEGACY:NONE, logger.set_handlers(LEGACY, opt_slow_log ? LEGACY:NONE,
......
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