• unknown's avatar
    fixed Bug #4358 Problem with HAVING clause that uses alias · 73eaa848
    unknown authored
           from the select list and TEXT field 
    
    make setup_copy_fields to insert Item_copy_string for blobs in 
    the beginning of the copy_funcs (push_back instead of push_front)
    
    the thing is that Item_copy_string::copy for function can call 
    Item_copy_string::val_int for blob via Item_ref.
    But if Item_copy_string::copy for blob isn't called before, 
    it's value will be wrong.
    
    So all the Item_copy_string::copy for blobs should be called before 
    Item_copy_string::copy for functions.
    
    
    mysql-test/r/having.result:
      added test case for
      Bug #4358 Problem with HAVING clause that uses
                  alias from the select list and TEXT field
    mysql-test/t/having.test:
      added test case for
      Bug #4358 Problem with HAVING clause that uses
                  alias from the select list and TEXT field
    sql/sql_select.cc:
      make setup_copy_fields to insert Item_copy_string for blobs in 
      the beginning of the copy_funcs (push_back instead of push_front)
      
      the thing is that Item_copy_string::copy for function can call 
      Item_copy_string::val_int for blob via Item_ref.
      But if Item_copy_string::copy for blob isn't called before, 
      it's value will be wrong.
      
      So all the Item_copy_string::copy for blobs should be called before 
      Item_copy_string::copy for functions.
      
      fixed 
      Bug #4358 Problem with HAVING clause that
                 uses alias from the select list and TEXT field
    73eaa848
sql_select.cc 216 KB