• unknown's avatar
    Fix for BUG#4177: · febda72f
    unknown authored
     * Make index merge quick selects code allow perform several scans.
     * Delay additional handler objects creation till row retrieval is started.
    
    
    include/queues.h:
      Added trivial queue_remove_all macro
    mysql-test/r/index_merge.result:
      Testcase for BUG#4177
    mysql-test/t/index_merge.test:
      Testcase for BUG#4177
    sql/opt_range.cc:
      Fix for BUG#4177: 
       * For any quick select, row retrieval can be performed several times. Now all index_merge quick selects code handles such cases properly.
       * In QUICK_INDEX_MERGE_SELECT we use one handler object for all merged scans, and it was possible that in 
          destructor several cleanup functions were called 
       * Additionally
        - Removed redundant QUICK_INDEX_MERGE_SELECT members.
        - Now QUICK_ROR_*_SELECTs create additional handler objects only when row retrieval is started
          So if join optimizer chooses other access method, we don't create/delete handlers.
    febda72f
index_merge.result 18.9 KB