• unknown's avatar
    Merge salvation.intern.azundris.com:/home/tnurnberg/21913/my41-21913 · 8ce43f8d
    unknown authored
    into  salvation.intern.azundris.com:/home/tnurnberg/21913/my50-21913
    
    21913: DATE_FORMAT() Crashes mysql server if I use it through mysql-connector-j driver.
    
    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."
    8ce43f8d
sql_string.cc 19.9 KB