• cmiller@zippy.cornsilk.net's avatar
    Rewrite profiler code to be easier to maintain and less buggy. · f12087af
    cmiller@zippy.cornsilk.net authored
    Between 5.0 and 5.1, the step of incrementing the global query id
    changed, which broke how the profiler noticed when a new query had
    started.  That reset the state list and caused all but the last 
    five (or so) states to be thrown away.
    
    Now, don't watch for query_id changes in the lower level.
    
    Add a bogus state change at the end of profiling so that the last 
    real state change is timed.
    
    Emit source reference for the start of the span of time instead of
    the end of it.
    f12087af
sql_profile.cc 21.7 KB