From b2de7a6ee6fa37805d9066ed92ca831499902d12 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 25 Jun 2007 14:42:35 +0500 Subject: BUG#28026 - Falcon: crash if partitions and select for update Assertion failure may happen with falcon + partition + select for update. This may affect other engines as well. Though assertion failure is fixed with this patch, falcon still deadlocks when running falcon_bug_28026.test. sql/ha_partition.cc: In case rnd_next fails, we must call ha_rnd_end. This is done conditionally (NO_CURRENT_PART_ID != m_part_spec.start_part) in ha_partition::ha_rnd_end. Thus we may not reset m_part_spec.start_part in case rnd is not ended. --- sql/ha_partition.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sql') diff --git a/sql/ha_partition.cc b/sql/ha_partition.cc index 0c4f3cf708f..37e42f7a850 100644 --- a/sql/ha_partition.cc +++ b/sql/ha_partition.cc @@ -3117,7 +3117,7 @@ int ha_partition::rnd_next(uchar *buf) continue; // Probably MyISAM if (result != HA_ERR_END_OF_FILE) - break; // Return error + goto end_dont_reset_start_part; // Return error /* End current partition */ late_extra_no_cache(part_id); @@ -3143,6 +3143,7 @@ int ha_partition::rnd_next(uchar *buf) end: m_part_spec.start_part= NO_CURRENT_PART_ID; +end_dont_reset_start_part: table->status= STATUS_NOT_FOUND; DBUG_RETURN(result); } -- cgit v1.2.1