From a9ce138822b4c051ab2c78eb4ff160102dae38b0 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 8 Jun 2007 17:12:42 +0300 Subject: Bug #27816: Log tables ran with partitions crashes the server when logging is enabled. Currently the partition engine doesn't allow log tables to be partitioned. But this was not checked and the server crashed. Fixed by adding a check in ALTER TABLE to disable partitioning the log tables. While working on the cause of the problem improved the way the log thread structures are initialized before opening the log tables. mysql-test/r/partition.result: Bug #27816: test case mysql-test/t/partition.test: Bug #27816: test case sql/log.cc: Bug #27816: optional Improved initialization of the log threads before opening the log table. Remedies problems that arise from open_table() et. al. depending on a correctly initialized thd. Prerequisite for handling partitioned log tables : they call the parser while reading the .frm file. sql/sql_table.cc: Bug #27816: throw an error when paritioning the log tables : not supported by the partition engine. --- sql/log.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sql/log.cc') diff --git a/sql/log.cc b/sql/log.cc index 6ef1c1ea912..ac6ea92c61a 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -296,6 +296,8 @@ bool Log_to_csv_event_handler::open_log_table(uint log_table_type) table->db= log_thd->db; table->db_length= log_thd->db_length; + lex_start(log_thd); + log_thd->clear_error(); if (simple_open_n_lock_tables(log_thd, table) || table->table->file->extra(HA_EXTRA_MARK_AS_LOG_TABLE) || table->table->file->ha_rnd_init(0)) -- cgit v1.2.1