• unknown's avatar
    Bug #29878 Garbage data generation when executing SESSION_USER() on a slave. · d27bf14e
    unknown authored
    Item_func_user doesn't calculate anything in it's val_str() method,
    just returns saved str_value.
    Though Item::save_in_field method can destroy str_value, relying on
    val_str() return. As a result we get the garbage stored in field.
    
    We cannot use Item::save_in_field implementation for Item_func_user,
    reimplement it in simpler way.
    
    
    mysql-test/r/rpl_session_var.result:
      Bug #29878 Garbage data generation when executing SESSION_USER() on a slave.
      
      test result
    mysql-test/t/rpl_session_var.test:
      Bug #29878 Garbage data generation when executing SESSION_USER() on a slave.
      
      test case
    sql/item.cc:
      Bug #29878 Garbage data generation when executing SESSION_USER() on a slave.
      
      duplicating code moved to Item::save_str_in_field
    sql/item.h:
      Bug #29878 Garbage data generation when executing SESSION_USER() on a slave.
      
      duplicating code moved to Item::save_str_in_field
    sql/item_strfunc.h:
      Bug #29878 Garbage data generation when executing SESSION_USER() on a slave.
      
      Item_func_user::save_in_field implemented as simple storing str_value
    d27bf14e
item.cc 185 KB