• unknown's avatar
    Backport: · 698d98be
    unknown authored
    B-g#24795: SHOW PROFILE implementation
    
    Don't use memory roots to store profiling information, because
    memory roots make freeing the data a no-op, and thus long-running
    processes with profiling turned on the whole time could eventually 
    use all available memory.
    
    Instead, use regular heap allocation and deallocation calls to 
    manage profiling data.  Replace the leaky List usage with a similar-
    behaving structure named "Queue".
    
    
    sql/sql_profile.cc:
      Don't use C++ iterators on our simple Queue implementation.  They're
      not implemented and we don't really need them.
      
      Rip out idea of swapping out the thd's mem_root.
    sql/sql_profile.h:
      Rip out idea of needing a mem_root.
      
      Implement a Queue that looks and behaves very similarly to memroot-
      using List.
    698d98be
sql_profile.cc 22.4 KB