summaryrefslogtreecommitdiff
path: root/sql/ha_partition.cc
diff options
context:
space:
mode:
authorMattias Jonsson <mattias.jonsson@sun.com>2009-10-08 15:36:43 +0200
committerMattias Jonsson <mattias.jonsson@sun.com>2009-10-08 15:36:43 +0200
commit87a4644db8715c1d04560f8c80a776d5a7ebfd9e (patch)
tree9383b1f3b7eae01a259d67f7ed7dd0b8e5743ef8 /sql/ha_partition.cc
parent7079338e0ed8f5ef52c77fd81ad23bbb8fd8c86a (diff)
downloadmariadb-git-87a4644db8715c1d04560f8c80a776d5a7ebfd9e.tar.gz
Bug#46922: crash when adding partitions and open_files_limit
is reached Problem was bad error handling, leaving some new temporary partitions locked and initialized and some not yet initialized and locked, leading to a crash when trying to unlock the not yet initialized and locked partitions Solution was to unlock the already locked partitions, and not include any of the new temporary partitions in later unlocks
Diffstat (limited to 'sql/ha_partition.cc')
-rw-r--r--sql/ha_partition.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc
index 5b053ab9cac..6b5350a82cd 100644
--- a/sql/ha_partition.cc
+++ b/sql/ha_partition.cc
@@ -1280,10 +1280,10 @@ void ha_partition::cleanup_new_partition(uint part_count)
m_file= m_added_file;
m_added_file= NULL;
+ external_lock(ha_thd(), F_UNLCK);
/* delete_table also needed, a bit more complex */
close();
- m_added_file= m_file;
m_file= save_m_file;
}
DBUG_VOID_RETURN;