summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru>2006-12-26 15:08:41 +0400
committerunknown <ramil/ram@mysql.com/ramil.myoffice.izhnet.ru>2006-12-26 15:08:41 +0400
commit33b6bab87177851b134da6b0c0596fdba2a906e8 (patch)
tree291b92310a0fa724b2ded79707e9dad6e56adc04 /mysql-test
parent0f462179dba195519661d91e49b76d65cb1ba618 (diff)
downloadmariadb-git-33b6bab87177851b134da6b0c0596fdba2a906e8.tar.gz
Fix for bug #23616: Week() changed behaviour between 5.0.22 and 5.0.24
Consider double values as legal date{time} function's arguments (i.e. allow dates in internal format YYYYMMDDHHMMSS.XXXXXX). mysql-test/r/func_sapdb.result: Fix for bug #23616: Week() changed behaviour between 5.0.22 and 5.0.24 - result adjusted. mysql-test/r/func_time.result: Fix for bug #23616: Week() changed behaviour between 5.0.22 and 5.0.24 - test result. mysql-test/t/func_time.test: Fix for bug #23616: Week() changed behaviour between 5.0.22 and 5.0.24 - test case. sql-common/my_time.c: Fix for bug #23616: Week() changed behaviour between 5.0.22 and 5.0.24 - consider '.' as an acceptable separator for dates like YYYYYMMDDHHMMSS.XXXXXX
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/func_sapdb.result4
-rw-r--r--mysql-test/r/func_time.result4
-rw-r--r--mysql-test/t/func_time.test7
3 files changed, 12 insertions, 3 deletions
diff --git a/mysql-test/r/func_sapdb.result b/mysql-test/r/func_sapdb.result
index 447cadb9898..7c46b966dab 100644
--- a/mysql-test/r/func_sapdb.result
+++ b/mysql-test/r/func_sapdb.result
@@ -229,9 +229,7 @@ a
10000
select microsecond(19971231235959.01) as a;
a
-0
-Warnings:
-Warning 1292 Truncated incorrect time value: '19971231235959.01'
+10000
select date_add("1997-12-31",INTERVAL "10.09" SECOND_MICROSECOND) as a;
a
1997-12-31 00:00:10.090000
diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result
index fdfb42c878d..fc218067d29 100644
--- a/mysql-test/r/func_time.result
+++ b/mysql-test/r/func_time.result
@@ -854,4 +854,8 @@ H
select last_day('0000-00-00');
last_day('0000-00-00')
NULL
+select isnull(week(now() + 0)), isnull(week(now() + 0.2)),
+week(20061108), week(20061108.01), week(20061108085411.000002);
+isnull(week(now() + 0)) isnull(week(now() + 0.2)) week(20061108) week(20061108.01) week(20061108085411.000002)
+0 0 45 45 45
End of 4.1 tests
diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test
index fa12c45db04..2fb5ea04a19 100644
--- a/mysql-test/t/func_time.test
+++ b/mysql-test/t/func_time.test
@@ -492,4 +492,11 @@ union
select last_day('0000-00-00');
+#
+# Bug 23616: datetime functions with double argumets
+#
+
+select isnull(week(now() + 0)), isnull(week(now() + 0.2)),
+ week(20061108), week(20061108.01), week(20061108085411.000002);
+
--echo End of 4.1 tests