summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <mhansson@dl145s.mysql.com>2007-10-09 15:25:27 +0200
committerunknown <mhansson@dl145s.mysql.com>2007-10-09 15:25:27 +0200
commit69ecde861acc7bcfde2580dc827db716f727b468 (patch)
tree4292e1961820710022a02f777072c70a3bca370a /mysql-test
parentf2d6508fb7d42ccfed9f05ec6a59ac21f3ec6737 (diff)
parentaddc2f4720718cf9c98a02c444d2769c3d77593e (diff)
downloadmariadb-git-69ecde861acc7bcfde2580dc827db716f727b468.tar.gz
Merge bk-internal:/home/bk/mysql-5.0-opt
into dl145s.mysql.com:/data0/mhansson/bug31160/my50-bug31160 sql/item_timefunc.h: Auto merged
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/func_sapdb.result2
-rw-r--r--mysql-test/r/func_time.result9
-rw-r--r--mysql-test/t/func_time.test10
3 files changed, 20 insertions, 1 deletions
diff --git a/mysql-test/r/func_sapdb.result b/mysql-test/r/func_sapdb.result
index dbae7e551e5..e2ed9c98adc 100644
--- a/mysql-test/r/func_sapdb.result
+++ b/mysql-test/r/func_sapdb.result
@@ -196,7 +196,7 @@ f2 datetime YES NULL
f3 time YES NULL
f4 time YES NULL
f5 time YES NULL
-f6 time NO 00:00:00
+f6 time YES NULL
f7 datetime YES NULL
f8 date YES NULL
f9 time YES NULL
diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result
index ee8b8c1e908..74859be4d04 100644
--- a/mysql-test/r/func_time.result
+++ b/mysql-test/r/func_time.result
@@ -1027,6 +1027,15 @@ fmtddate field2
Sep-4 12:00AM abcd
DROP TABLE testBug8868;
SET NAMES DEFAULT;
+CREATE TABLE t1 (
+a TIMESTAMP
+);
+INSERT INTO t1 VALUES (now()), (now());
+SELECT 1 FROM t1 ORDER BY MAKETIME(1, 1, a);
+1
+1
+1
+DROP TABLE t1;
(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%H') As H)
union
(select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%H') As H);
diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test
index 86c848983fa..c0a449ac3f4 100644
--- a/mysql-test/t/func_time.test
+++ b/mysql-test/t/func_time.test
@@ -545,6 +545,16 @@ DROP TABLE testBug8868;
SET NAMES DEFAULT;
+#
+# Bug #31160: MAKETIME() crashes server when returning NULL in ORDER BY using
+# filesort
+#
+CREATE TABLE t1 (
+ a TIMESTAMP
+);
+INSERT INTO t1 VALUES (now()), (now());
+SELECT 1 FROM t1 ORDER BY MAKETIME(1, 1, a);
+DROP TABLE t1;
#
# Bug #19844 time_format in Union truncates values