summaryrefslogtreecommitdiff
path: root/sql/ha_partition.cc
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
commit4f221ad2128adbe19e5b4304262d693bfc14cb98 (patch)
treee5275999faa9ec64043fd511b0c718efca828e11 /sql/ha_partition.cc
parentb03d4e9e634fa16b79d265be2c3a12e1baec3098 (diff)
parent4ed7328238e0657f0c9e460bdbc6fea0f086ab60 (diff)
downloadmariadb-git-4f221ad2128adbe19e5b4304262d693bfc14cb98.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/ha_partition.cc')
-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