From f113311d4b6ae6e43984df08b6d99e3de88fae85 Mon Sep 17 00:00:00 2001 From: Mattias Jonsson Date: Fri, 10 Oct 2008 20:12:38 +0200 Subject: Bug#39434: ALTER TABLE CHECK/OPTIMIZE/ANALYZE PARTITION work on non-partitioned table Problem was that partitioning specific commands was accepted for non partitioned tables and treated like ANALYZE/CHECK/OPTIMIZE/REPAIR TABLE, after bug-20129 was fixed, which changed the code path from mysql_alter_table to mysql_admin_table. Solution was to check if the table was partitioned before trying to execute the admin command --- sql/ha_partition.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'sql/ha_partition.h') diff --git a/sql/ha_partition.h b/sql/ha_partition.h index 685f057dfce..d36e993d399 100644 --- a/sql/ha_partition.h +++ b/sql/ha_partition.h @@ -988,8 +988,7 @@ public: virtual bool is_crashed() const; private: - int handle_opt_partitions(THD *thd, HA_CHECK_OPT *check_opt, - uint flags, bool all_parts); + int handle_opt_partitions(THD *thd, HA_CHECK_OPT *check_opt, uint flags); public: /* ------------------------------------------------------------------------- -- cgit v1.2.1