• unknown's avatar
    Bug#12240 - Rows Examined in Slow Log showing incorrect number? · ddc5ae38
    unknown authored
    Examined rows are counted for every join part. The per-join-part
    counter was incremented over all iterations. The result variable
    was replaced at the end of every iteration. The final result was
    the number of examined rows by the join part that ended its
    execution as the last one. The numbers of other join parts was
    lost.
    
    Now we reset the per-join-part counter before every iteration and
    add it to the result variable at the end of the iteration. That
    way we get the sum of all iterations of all join parts.
    
    No test case. Testing this needs a look into the slow query log.
    I don't know of a way to do this portably with the test suite.
    
    
    sql/sql_select.cc:
      Bug#12240 - Rows Examined in Slow Log showing incorrect number?
      Fixed reseting and accumulation of examined rows counts.
    ddc5ae38
sql_select.cc 298 KB