• Georgi Kodinov's avatar
    Bug #55826: create table .. select crashes with when · 6bea77ae
    Georgi Kodinov authored
      KILL_BAD_DATA is returned
    
    Two problems discovered with the LEAST()/GREATEST() 
    functions:
    1. The check for a null value should happen even 
    after the second call to val_str() in the args. This is
    important because two subsequent calls to the same
    Item::val_str() may yield different results.
    Fixed by checking for NULL value before dereferencing
    the string result.
    
    2. While looping over the arguments and evaluating them 
    the loop should stop if there was an error evaluating so far
    or the statement was killed. Fixed by checking for error
    and bailing out.
    6bea77ae
item_func.cc 152 KB