summaryrefslogtreecommitdiff
path: root/sql/log.h
diff options
context:
space:
mode:
authorunknown <petr@mysql.com>2006-01-30 02:24:47 +0300
committerunknown <petr@mysql.com>2006-01-30 02:24:47 +0300
commit70471e6ae2ea44063876c9990c247b1ddfb08e6f (patch)
tree07ee094184e47fdb29a235417c9d7c119af51bb7 /sql/log.h
parentd4c61055ed8a7b25de19238edf64e0c3ee318128 (diff)
downloadmariadb-git-70471e6ae2ea44063876c9990c247b1ddfb08e6f.tar.gz
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. sql/log.h: check for the table log handler presence, as now it could be absent in some cases. Namely, during bootstrap. sql/mysqld.cc: do not create log table handler, if run in bootstrap mode.
Diffstat (limited to 'sql/log.h')
-rw-r--r--sql/log.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/sql/log.h b/sql/log.h
index 5695f23bbad..9868fe23292 100644
--- a/sql/log.h
+++ b/sql/log.h
@@ -473,11 +473,17 @@ public:
bool flush_logs(THD *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()
{
- 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. */
void cleanup_base();