• Staale Smedseng's avatar
    Bug #32223 SETting max_allowed_packet variable · 4fbd8db9
    Staale Smedseng authored
          
    Inconsistent behavior of session variable max_allowed_packet 
    (and net_buffer_length); only assignment to the global variable 
    has any effect, without this being obvious to the user.
          
    The patch for Bug#22891 is backported to 5.0, making the two
    session variables read-only. As this is a backport to GA 
    software, the error used when trying to assign to the read-
    only variable is ER_UNKNOWN_ERROR. The error message is the 
    same as in 5.1+.
    
    mysql-test/t/variables.test:
      Tests are changed to account for the new semantics, and assignment to the read-only variables is added to test 
      the emission of the correct error message.
    sql/set_var.cc:
      Both max_allowed_packet and net_buffer_length are changed 
      to be of type sys_var_thd_ulong_session_readonly. ER_UNKNOWN_ERROR is used to indicate an attempt to assign 
      to an instance of a read-only variable.
    sql/set_var.h:
      Class sys_var_thd_ulong_session_readonly is added.
    4fbd8db9
func_compress.test 3.17 KB