From 402ff5523e9ffcffedbca6f18ffcfb1d8a72c310 Mon Sep 17 00:00:00 2001
From: unknown <mikael@zim.(none)>
Date: Sat, 11 Mar 2006 06:32:24 -0800
Subject: [PATCH] Ensure we discover also error in using subpartition parts in
 non-subpartitioned tables in ALTER TABLE ADD/REORGANIZE PARTITION

---
 sql/sql_partition.cc | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sql/sql_partition.cc b/sql/sql_partition.cc
index 3419aee4b26..5a6196d94fa 100644
--- a/sql/sql_partition.cc
+++ b/sql/sql_partition.cc
@@ -4736,8 +4736,7 @@ the generated partition syntax in a correct manner.
     if (alter_info->flags == ALTER_ADD_PARTITION ||
         alter_info->flags == ALTER_REORGANIZE_PARTITION)
     {
-      if (tab_part_info->is_sub_partitioned() &&
-          tab_part_info->use_default_subpartitions &&
+      if (tab_part_info->use_default_subpartitions &&
           !alt_part_info->use_default_subpartitions)
       {
         tab_part_info->use_default_subpartitions= FALSE;
-- 
2.30.9