summaryrefslogtreecommitdiff
path: root/sql/ha_partition.cc
diff options
context:
space:
mode:
authorunknown <mikael/pappa@dator5.(none)>2006-08-08 08:52:51 -0400
committerunknown <mikael/pappa@dator5.(none)>2006-08-08 08:52:51 -0400
commit2bf914b40e56e51757af6bd99dc6b24d2d00b3da (patch)
tree85931e220bc8936b370fcc37cbaf2a1b5cae33b5 /sql/ha_partition.cc
parent5e2babfe624b2390c4530282d3abad0e761d89bd (diff)
downloadmariadb-git-2bf914b40e56e51757af6bd99dc6b24d2d00b3da.tar.gz
BUG#21143: mysqld hangs when using wrong number of subpartitions
Rewrote if-statement a bit shorter Added check for subpartitions in REORGANIZE partitions to be of same number as in base table. mysql-test/r/partition_mgm.result: New test case mysql-test/t/partition_mgm.test: New test case sql/ha_partition.cc: Fixed stuff I should done long ago (monty comments) sql/sql_partition.cc: Rewrote if-statement a bit shorter Added check for subpartitions in REORGANIZE partitions to be of same number as in base table.
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r--sql/ha_partition.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index 615c4bfb1bf..60e838bc243 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -5145,13 +5145,12 @@ void ha_partition::print_error(int error, myf errflag)
DBUG_ENTER("ha_partition::print_error");
/* Should probably look for my own errors first */
- /* monty: needs to be called for the last used partition ! */
DBUG_PRINT("enter", ("error: %d", error));
if (error == HA_ERR_NO_PARTITION_FOUND)
m_part_info->print_no_partition_found(table);
else
- m_file[0]->print_error(error, errflag);
+ m_file[m_last_part]->print_error(error, errflag);
DBUG_VOID_RETURN;
}
@@ -5161,8 +5160,7 @@ bool ha_partition::get_error_message(int error, String *buf)
DBUG_ENTER("ha_partition::get_error_message");
/* Should probably look for my own errors first */
- /* monty: needs to be called for the last used partition ! */
- DBUG_RETURN(m_file[0]->get_error_message(error, buf));
+ DBUG_RETURN(m_file[m_last_part]->get_error_message(error, buf));
}