From 25e32d83d6d5fdce25ba4ef68885ffbf9f7a934f Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 13 Jan 2006 14:42:46 +0100 Subject: fix for bug#15828 problem was not checking 2nd parameter of str_to_date against NULL mysql-test/r/date_formats.result: bk commit --- mysql-test/t/date_formats.test | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'mysql-test/t/date_formats.test') diff --git a/mysql-test/t/date_formats.test b/mysql-test/t/date_formats.test index 6d501865d2c..dd31f1509c0 100644 --- a/mysql-test/t/date_formats.test +++ b/mysql-test/t/date_formats.test @@ -268,4 +268,11 @@ insert into t1 (f1) values ("2005-01-01"); insert into t1 (f1) values ("2005-02-01"); select date_format(f1, "%m") as d1, date_format(f1, "%M") as d2 from t1 order by date_format(f1, "%M"); drop table t1; + +# +# Bug #15828 +# +select str_to_date( 1, NULL ); +select str_to_date( NULL, 1 ); + # End of 4.1 tests -- cgit v1.2.1 From e5f077f79a7872147a8858d353060ee08ffa5dcd Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 16 Jan 2006 15:46:37 +0100 Subject: date_formats.test: fix for bug #15828 after review doing val_str now before testing of null value secures the function for null values returned by dynamic functions - the fix before was incomplete andy covered constant null values mysql-test/t/date_formats.test: fix for bug #15828 after review doing val_str now before testing of null value secures the function for null values returned by dynamic functions - the fix before was incomplete andy covered constant null values --- mysql-test/t/date_formats.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mysql-test/t/date_formats.test') diff --git a/mysql-test/t/date_formats.test b/mysql-test/t/date_formats.test index dd31f1509c0..78b4482a94a 100644 --- a/mysql-test/t/date_formats.test +++ b/mysql-test/t/date_formats.test @@ -274,5 +274,5 @@ drop table t1; # select str_to_date( 1, NULL ); select str_to_date( NULL, 1 ); - +select str_to_date( 1, IF(1=1,NULL,NULL) ); # End of 4.1 tests -- cgit v1.2.1