From 717d6054f516baa35e14ac11f0a06c630b9e9fd9 Mon Sep 17 00:00:00 2001 From: "Tatiana A. Nurnberg" Date: Fri, 31 Jul 2009 14:38:18 +0200 Subject: Bug#40281, partitioning the general log table crashes the server We disallow the partitioning of a log table. You could however partition a table first, and then point logging to it. This is not only against the docs, it also crashes the server. We catch this case now. mysql-test/r/partition.result: results for 40281 mysql-test/t/partition.test: test for 40281: show that trying to log to partitioned table fails rather to crash the server sql/ha_partition.cc: Signal that we no longer support logging to partitioned tables, as per the docs. sql/sql_partition.cc: Some commands like "USE ..." have no select, yet we may try to parse partition info after their execution if user set a partitioned table as log target. This shouldn't lead to a NULL-deref/crash. --- sql/ha_partition.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sql/ha_partition.cc') diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 67bc3156260..97ecd70d6f8 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -5381,6 +5381,13 @@ int ha_partition::extra(enum ha_extra_function operation) /* Currently only NDB use the *_CANNOT_BATCH */ break; } + /* + http://dev.mysql.com/doc/refman/5.1/en/partitioning-limitations.html + says we no longer support logging to partitioned tables, so we fail + here. + */ + case HA_EXTRA_MARK_AS_LOG_TABLE: + DBUG_RETURN(ER_UNSUPORTED_LOG_ENGINE); default: { /* Temporary crash to discover what is wrong */ -- cgit v1.2.1