summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <mikael/pappa@dator5.(none)>2006-09-08 06:29:35 -0400
committerunknown <mikael/pappa@dator5.(none)>2006-09-08 06:29:35 -0400
commit24f9f35eb62f82130bf3463550b74100e93bf5f7 (patch)
treee5275999faa9ec64043fd511b0c718efca828e11 /sql
parent0fbd21584ddece7e61c3124ffbaf8b474779062b (diff)
parentf364dcd413f4a27e5712ff8c4575f3479204eea5 (diff)
downloadmariadb-git-24f9f35eb62f82130bf3463550b74100e93bf5f7.tar.gz
Merge dator5.(none):/home/pappa/clean-mysql-5.1
into dator5.(none):/home/pappa/bug21210 sql/ha_partition.cc: Auto merged
Diffstat (limited to 'sql')
-rw-r--r--sql/ha_partition.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index bd8d604ef0d..43e0e089504 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -1360,6 +1360,7 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info,
i= 0;
part_count= 0;
orig_count= 0;
+ first= TRUE;
part_it.rewind();
do
{
@@ -1387,9 +1388,16 @@ int ha_partition::change_partitions(HA_CREATE_INFO *create_info,
DBUG_RETURN(ER_OUTOFMEMORY);
}
} while (++j < no_subparts);
+ if (part_elem->part_state == PART_CHANGED)
+ orig_count+= no_subparts;
+ else if (temp_partitions && first)
+ {
+ orig_count+= (no_subparts * temp_partitions);
+ first= FALSE;
+ }
}
} while (++i < no_parts);
-
+ first= FALSE;
/*
Step 5:
Create the new partitions and also open, lock and call external_lock