• unknown's avatar
    Unreported minor bug: We start numbering query IDs at zero, which · 2879da7f
    unknown authored
    is a special case in "SHOW PROFILE FOR QUERY n".  No one can get
    the zero item (which is always the statement that turns on profiling),
    because zero represents the final item, internally.
    
    Now, order the queries starting at one.
    
    
    mysql-test/r/profiling.result:
      Renumber the query IDs.
    sql/sql_profile.cc:
      Start the profile_id_counter at 1, to overstep the special-case 
      value of zero.
      
      Unrelated, but looks similar: don't use -1 to initialize an unsigned 
      integer field.  That causes warnings in some environments.
    2879da7f
sql_profile.cc 23.8 KB