• Monty's avatar
    Make trace.add() usage uniform · 766bae2b
    Monty authored
    - Before any multiple add() calls, always use (if trace_started()).
    - Add unlikely() around all tests of trace_started().
    - Change trace.add(); trace.add(); to trace.add().add();
    - When trace.add() goes over several line, use the following formating:
    trace.
     add(xxx).
     add(yyy).
     add(zzz);
    
    This format was choosen after a discussion between Sergei Petrunia and
    me as it looks similar indepedent if 'trace' is an object or a
    pointer. It also more suitable for an editors auto-indentation.
    
    Other things:
    
    Added DBUG_ASSERT(thd->trace_started()) to a few functions that should
    only be called if trace is enabled.
    
    "use_roworder_index_merge: true" changed to "use_sort_index_merge: false"
    As the original output was often not correct.
    Also fixed the related 'cause' to be correct.
    
    In best_access_path() print the cost (and number of rows) before
    checking if it the plan should be used. This removes the need to print
    the cost in two places.
    
    Changed a few "read_time" tags to "cost".
    766bae2b
opt_split.cc 43.8 KB