Bug#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."
Showing
Please register or sign in to comment