• gkodinov/kgeorge@macbook.gmz's avatar
    Bug #23184: SELECT causes server crash · 6cd1f7b2
    gkodinov/kgeorge@macbook.gmz authored
     Item::val_xxx() may be called by the server several times at execute time 
     for a single query. Calls to val_xxx() may be very expensive and sometimes
     (count(distinct), sum(distinct), avg(distinct)) not possible.
     To avoid that problem the results of calculation for these aggregate 
     functions are cached so that val_xxx() methods just return the calculated 
     value for the second and subsequent calls.
    6cd1f7b2
item_sum.cc 84.4 KB