summaryrefslogtreecommitdiff
path: root/sql/log.cc
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@magare.gmz>2007-06-08 17:12:42 +0300
committerunknown <gkodinov/kgeorge@magare.gmz>2007-06-08 17:12:42 +0300
commita9ce138822b4c051ab2c78eb4ff160102dae38b0 (patch)
tree4ffac65699e65df4504f3fdcaf64d988271024fa /sql/log.cc
parent62e88b779cb3cd563c64952a33294024631eb937 (diff)
downloadmariadb-git-a9ce138822b4c051ab2c78eb4ff160102dae38b0.tar.gz
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.
Diffstat (limited to 'sql/log.cc')
-rw-r--r--sql/log.cc2
1 files changed, 2 insertions, 0 deletions
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))