• unknown's avatar
    Bug#21913: DATE_FORMAT() Crashes mysql server if I use it through mysql-connector-j driver. · eefe3430
    unknown authored
    Variable character_set_results can legally be NULL (for "no conversion.")
    This could result in a NULL deref that crashed the server.  Fixed.
    
    (Although ran some additional precursory tests to see whether I could break
    anything else, but no breakage so far.)
    
    
    mysql-test/r/func_time.result:
      Bug#21913: DATE_FORMAT() Crashes mysql server if I use it through mysql-connector-j driver.
      
      Prove DATE_FORMAT() no longer crashes the server when character_set_results is
      NULL (which is a legal value and means, "no conversion").
    mysql-test/t/func_time.test:
      Bug#21913: DATE_FORMAT() Crashes mysql server if I use it through mysql-connector-j driver.
      
      Prove DATE_FORMAT() no longer crashes the server when character_set_results is
      NULL (which is a legal value and means, "no conversion").
    sql/sql_string.cc:
      Bug#21913: DATE_FORMAT() Crashes mysql server if I use it through mysql-connector-j driver.
      
      Avoid NULL deref in my_charset_same() -- if !to_cs, we won't need to compare
      because it is magic for, "no conversion."
    eefe3430
func_time.test 19.3 KB