Commit b2de7a6e authored by unknown's avatar unknown

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.
parent 231c9003
...@@ -3117,7 +3117,7 @@ int ha_partition::rnd_next(uchar *buf) ...@@ -3117,7 +3117,7 @@ int ha_partition::rnd_next(uchar *buf)
continue; // Probably MyISAM continue; // Probably MyISAM
if (result != HA_ERR_END_OF_FILE) if (result != HA_ERR_END_OF_FILE)
break; // Return error goto end_dont_reset_start_part; // Return error
/* End current partition */ /* End current partition */
late_extra_no_cache(part_id); late_extra_no_cache(part_id);
...@@ -3143,6 +3143,7 @@ int ha_partition::rnd_next(uchar *buf) ...@@ -3143,6 +3143,7 @@ int ha_partition::rnd_next(uchar *buf)
end: end:
m_part_spec.start_part= NO_CURRENT_PART_ID; m_part_spec.start_part= NO_CURRENT_PART_ID;
end_dont_reset_start_part:
table->status= STATUS_NOT_FOUND; table->status= STATUS_NOT_FOUND;
DBUG_RETURN(result); DBUG_RETURN(result);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment