~maria-captains/maria/5.3-test

Viewing all changes in revision 3259.

  • Committer: Sergey Petrunya
  • Date: 2011-10-31 11:07:43 UTC
  • Revision ID: psergey@askmonty.org-20111031110743-4gc6z08bd0t4bmhj
BUG#882994: Crash in QUICK_RANGE_SELECT::reset with derived_with_keys
- The bug was caused by the following scenario:
  = a quick select is created with get_quick_select_for_ref. The quick 
    select refers to temporary (derived) table. It saves table->file, which
    refers to a ha_heap object.
  = When temp table is populated, ha_heap reaches max. size and is converted
    to a ha_myisam.  However, quick->file remains pointing to where ha_heap 
    was. 
  = Attempt to use the quick select causes crash.
- Fixed by introducing QUICK_SELECT_I::replace_handler(). Note that it will 
  not work for index_merge quick selects. Which is fine, because these
  quick selects are never created for derived tables.

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: