summaryrefslogtreecommitdiff
path: root/mysql-test/r/func_time.result
diff options
context:
space:
mode:
authorunknown <tnurnberg@salvation.intern.azundris.com>2006-09-04 07:01:15 +0200
committerunknown <tnurnberg@salvation.intern.azundris.com>2006-09-04 07:01:15 +0200
commit8ce43f8d23bf9533e4ff9f1dbd60611bbb0e27fc (patch)
treebcb6c9789802615a73170658c26a532ec0799ac2 /mysql-test/r/func_time.result
parent9e145670c41ee58bb4e707988a1b4c6f58dda0b6 (diff)
parent617189958bbb9cf8cf2b9722da39802aa8625b54 (diff)
downloadmariadb-git-8ce43f8d23bf9533e4ff9f1dbd60611bbb0e27fc.tar.gz
Merge salvation.intern.azundris.com:/home/tnurnberg/21913/my41-21913
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."
Diffstat (limited to 'mysql-test/r/func_time.result')
-rw-r--r--mysql-test/r/func_time.result12
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result
index db696f61fed..42a040e0613 100644
--- a/mysql-test/r/func_time.result
+++ b/mysql-test/r/func_time.result
@@ -960,3 +960,15 @@ id day id day
3 2005-07-01 3 2005-07-15
DROP TABLE t1,t2;
set time_zone= @@global.time_zone;
+SET NAMES latin1;
+SET character_set_results = NULL;
+SHOW VARIABLES LIKE 'character_set_results';
+Variable_name Value
+character_set_results
+CREATE TABLE testBug8868 (field1 DATE, field2 VARCHAR(32) CHARACTER SET BINARY);
+INSERT INTO testBug8868 VALUES ('2006-09-04', 'abcd');
+SELECT DATE_FORMAT(field1,'%b-%e %l:%i%p') as fmtddate, field2 FROM testBug8868;
+fmtddate field2
+Sep-4 12:00AM abcd
+DROP TABLE testBug8868;
+SET NAMES DEFAULT;