diff options
author | unknown <svoj@mysql.com/june.mysql.com> | 2007-06-25 14:42:35 +0500 |
---|---|---|
committer | unknown <svoj@mysql.com/june.mysql.com> | 2007-06-25 14:42:35 +0500 |
commit | b2de7a6ee6fa37805d9066ed92ca831499902d12 (patch) | |
tree | 27d754bc09faba122c4eba465e6e89602906fd2f /sql | |
parent | 231c90036ebc7f8d40db692e6fbe40ec7ea8cf06 (diff) | |
download | mariadb-git-b2de7a6ee6fa37805d9066ed92ca831499902d12.tar.gz |
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.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/ha_partition.cc | 3 |
1 files changed, 2 insertions, 1 deletions
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); } |