• unknown's avatar
    Bug#34726: open_tables() crashes server if running with --debug · b6595704
    unknown authored
    The DBUG code emits the current value of the proc_info member of THD,
    which may be set to NULL.  It was wrong to dereference that value
    with the format string %s without verifying that it was valid.
    
    Now, insert an inline test that substitutes the string "(null)" for
    NULL pointers.
    
    
    sql/sql_class.cc:
      Dereferencing a NULL is illegal (though not fatal for %s on some 
      platforms), and we have no assurance that the caller didn't call us 
      with a valid string.
    b6595704
sql_class.cc 98.2 KB