From: Date: January 16 2006 3:46pm Subject: bk commit into 4.1 tree (gvb:1.2484) BUG#15828 List-Archive: http://lists.mysql.com/commits/1150 X-Bug: 15828 Message-Id: <20060116144650.8B852C212@phoenix> Below is the list of changes that have just been committed into a local 4.1 repository of gvb. When gvb does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet 1.2484 06/01/16 15:46:37 gvb@phoenix.(none) +3 -0 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 sql/item_timefunc.cc 1.97 06/01/16 15:44:53 gvb@phoenix.(none) +1 -1 mysql-test/r/date_formats.result 1.18 06/01/16 15:44:52 gvb@phoenix.(none) +3 -0 mysql-test/t/date_formats.test 1.15 06/01/16 15:39:11 gvb@phoenix.(none) +1 -1 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 # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: gvb # Host: phoenix.(none) # Root: /data/mysql-4.1-BK --- 1.96/sql/item_timefunc.cc 2006-01-14 16:06:22 +01:00 +++ 1.97/sql/item_timefunc.cc 2006-01-16 15:44:53 +01:00 @@ -2750,9 +2750,9 @@ cached_field_type= MYSQL_TYPE_STRING; max_length= MAX_DATETIME_FULL_WIDTH*MY_CHARSET_BIN_MB_MAXLEN; cached_timestamp_type= MYSQL_TIMESTAMP_NONE; + format= args[1]->val_str(&format_str); if (!args[1]->null_value && (const_item= args[1]->const_item())) { - format= args[1]->val_str(&format_str); cached_format_type= get_date_time_result_type(format->ptr(), format->length()); switch (cached_format_type) { --- 1.17/mysql-test/r/date_formats.result 2006-01-13 14:40:46 +01:00 +++ 1.18/mysql-test/r/date_formats.result 2006-01-16 15:44:52 +01:00 @@ -470,3 +470,6 @@ select str_to_date( NULL, 1 ); str_to_date( NULL, 1 ) NULL +select str_to_date( 1, IF(1=1,NULL,NULL) ); +str_to_date( 1, IF(1=1,NULL,NULL) ) +NULL --- 1.14/mysql-test/t/date_formats.test 2006-01-13 14:39:39 +01:00 +++ 1.15/mysql-test/t/date_formats.test 2006-01-16 15:39:11 +01:00 @@ -274,5 +274,5 @@ # 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