summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-03-27 10:03:28 +0100
committerSergei Golubchik <sergii@pisem.net>2013-03-27 10:03:28 +0100
commit6599fd3e9c23a8957a63146cbe6a0ffc4c292a3d (patch)
tree5a7e05e0a9abb5f5cc2672bc3d545ac3f5f7fa43 /mysql-test/r
parent102a7a2a763dc5f2da8dd1f9ca9a53664c5aad6a (diff)
parente308d7417bc4ceb1b3b72cac2642015b88f310ff (diff)
downloadmariadb-git-6599fd3e9c23a8957a63146cbe6a0ffc4c292a3d.tar.gz
5.3 merge
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/cast.result20
-rw-r--r--mysql-test/r/date_formats.result2
-rw-r--r--mysql-test/r/dyncol.result91
-rw-r--r--mysql-test/r/func_group.result7
-rw-r--r--mysql-test/r/func_group_innodb.result15
-rw-r--r--mysql-test/r/func_sapdb.result4
-rw-r--r--mysql-test/r/func_str.result25
-rw-r--r--mysql-test/r/func_time.result18
-rw-r--r--mysql-test/r/gis.result143
-rw-r--r--mysql-test/r/mdev316.result2
-rw-r--r--mysql-test/r/merge.result181
-rw-r--r--mysql-test/r/partition_pruning.result3
-rw-r--r--mysql-test/r/temporal_scale_4283.result12
-rw-r--r--mysql-test/r/type_date.result2
-rw-r--r--mysql-test/r/type_datetime.result17
15 files changed, 448 insertions, 94 deletions
diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result
index 23417b16698..31f1d57f916 100644
--- a/mysql-test/r/cast.result
+++ b/mysql-test/r/cast.result
@@ -268,37 +268,37 @@ cast(010203101112.121314 as datetime)
0001-02-03 10:11:12
select cast(120010203101112.121314 as datetime);
cast(120010203101112.121314 as datetime)
-NULL
+0000-00-00 00:00:00
Warnings:
Warning 1292 Incorrect datetime value: '120010203101112.121314'
select cast(cast(1.1 as decimal) as datetime);
cast(cast(1.1 as decimal) as datetime)
-NULL
+0000-00-00 00:00:00
Warnings:
Warning 1292 Incorrect datetime value: '1'
select cast(cast(-1.1 as decimal) as datetime);
cast(cast(-1.1 as decimal) as datetime)
-NULL
+0000-00-00 00:00:00
Warnings:
Warning 1292 Incorrect datetime value: '-1'
select cast('0' as date);
cast('0' as date)
-NULL
+0000-00-00
Warnings:
Warning 1292 Incorrect datetime value: '0'
select cast('' as date);
cast('' as date)
-NULL
+0000-00-00
Warnings:
Warning 1292 Incorrect datetime value: ''
select cast('0' as datetime);
cast('0' as datetime)
-NULL
+0000-00-00 00:00:00
Warnings:
Warning 1292 Incorrect datetime value: '0'
select cast('' as datetime);
cast('' as datetime)
-NULL
+0000-00-00 00:00:00
Warnings:
Warning 1292 Incorrect datetime value: ''
select cast('0' as time);
@@ -306,7 +306,7 @@ cast('0' as time)
00:00:00
select cast('' as time);
cast('' as time)
-NULL
+00:00:00
Warnings:
Warning 1292 Truncated incorrect time value: ''
select cast(NULL as DATE);
@@ -323,13 +323,13 @@ cast(NULL as BINARY)
NULL
select cast(cast(120010203101112.121314 as double) as datetime);
cast(cast(120010203101112.121314 as double) as datetime)
-NULL
+0000-00-00 00:00:00
select cast(cast(1.1 as double) as datetime);
cast(cast(1.1 as double) as datetime)
0000-00-00 00:00:01
select cast(cast(-1.1 as double) as datetime);
cast(cast(-1.1 as double) as datetime)
-NULL
+0000-00-00 00:00:00
explain extended select cast(10 as double(5,2));
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
diff --git a/mysql-test/r/date_formats.result b/mysql-test/r/date_formats.result
index 7f69fd1a5a4..3bbd25cbbcc 100644
--- a/mysql-test/r/date_formats.result
+++ b/mysql-test/r/date_formats.result
@@ -521,7 +521,7 @@ TIME_FORMAT("25:00:00", '%l %p')
1 AM
SELECT DATE_FORMAT('%Y-%m-%d %H:%i:%s', 1151414896);
DATE_FORMAT('%Y-%m-%d %H:%i:%s', 1151414896)
-NULL
+1151414896
Warnings:
Warning 1292 Incorrect datetime value: '%Y-%m-%d %H:%i:%s'
select str_to_date('04 /30/2004', '%m /%d/%Y');
diff --git a/mysql-test/r/dyncol.result b/mysql-test/r/dyncol.result
index 13543223ad8..2411f1070d9 100644
--- a/mysql-test/r/dyncol.result
+++ b/mysql-test/r/dyncol.result
@@ -182,13 +182,13 @@ select column_get(column_create(1, 1212 AS unsigned int), 1 as unsigned int);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1003 select cast(column_get(column_create(1,1212 AS unsigned int),1) as unsigned) AS `column_get(column_create(1, 1212 AS unsigned int), 1 as unsigned int)`
+Note 1003 select column_get(column_create(1,1212 AS unsigned int),1 as unsigned) AS `column_get(column_create(1, 1212 AS unsigned int), 1 as unsigned int)`
explain extended
select column_get(column_create(1, 1212 AS unsigned int), 1 as unsigned);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1003 select cast(column_get(column_create(1,1212 AS unsigned int),1) as unsigned) AS `column_get(column_create(1, 1212 AS unsigned int), 1 as unsigned)`
+Note 1003 select column_get(column_create(1,1212 AS unsigned int),1 as unsigned) AS `column_get(column_create(1, 1212 AS unsigned int), 1 as unsigned)`
select column_get(column_create(1, 1212 AS decimal), 1 as unsigned int);
column_get(column_create(1, 1212 AS decimal), 1 as unsigned int)
1212
@@ -261,13 +261,13 @@ select column_get(column_create(1, 1212 AS int), 1 as int);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1003 select cast(column_get(column_create(1,1212 AS int),1) as signed) AS `column_get(column_create(1, 1212 AS int), 1 as int)`
+Note 1003 select column_get(column_create(1,1212 AS int),1 as signed) AS `column_get(column_create(1, 1212 AS int), 1 as int)`
explain extended
select column_get(column_create(1, 1212 AS int), 1 as signed int);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1003 select cast(column_get(column_create(1,1212 AS int),1) as signed) AS `column_get(column_create(1, 1212 AS int), 1 as signed int)`
+Note 1003 select column_get(column_create(1,1212 AS int),1 as signed) AS `column_get(column_create(1, 1212 AS int), 1 as signed int)`
select column_get(column_create(1, -1212 AS int), 1 as int);
column_get(column_create(1, -1212 AS int), 1 as int)
-1212
@@ -368,7 +368,7 @@ select column_get(column_create(1, "1212" AS char charset utf8), 1 as char chars
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1003 select cast(column_get(column_create(1,'1212' AS char charset utf8 ),1) as char charset utf8) AS `column_get(column_create(1, "1212" AS char charset utf8), 1 as char charset utf8)`
+Note 1003 select column_get(column_create(1,'1212' AS char charset utf8 ),1 as char charset utf8) AS `column_get(column_create(1, "1212" AS char charset utf8), 1 as char charset utf8)`
select column_get(column_create(1, 1212 AS unsigned int), 1 as char charset utf8);
column_get(column_create(1, 1212 AS unsigned int), 1 as char charset utf8)
1212
@@ -428,7 +428,7 @@ select column_get(column_create(1, "1212" AS char charset utf8), 1 as char chars
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1003 select cast(column_get(column_create(1,'1212' AS char charset utf8 ),1) as char charset binary) AS `column_get(column_create(1, "1212" AS char charset utf8), 1 as char charset binary)`
+Note 1003 select column_get(column_create(1,'1212' AS char charset utf8 ),1 as char charset binary) AS `column_get(column_create(1, "1212" AS char charset utf8), 1 as char charset binary)`
#
# column get real
#
@@ -440,13 +440,13 @@ select column_get(column_create(1, 1212.12 AS double), 1 as double);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1003 select cast(column_get(column_create(1,1212.12 AS double),1) as double) AS `column_get(column_create(1, 1212.12 AS double), 1 as double)`
+Note 1003 select column_get(column_create(1,1212.12 AS double),1 as double) AS `column_get(column_create(1, 1212.12 AS double), 1 as double)`
explain extended
select column_get(column_create(1, 1212.12 AS double), 1 as double(6,2));
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1003 select cast(column_get(column_create(1,1212.12 AS double),1) as double(6,2)) AS `column_get(column_create(1, 1212.12 AS double), 1 as double(6,2))`
+Note 1003 select column_get(column_create(1,1212.12 AS double),1 as double(6,2)) AS `column_get(column_create(1, 1212.12 AS double), 1 as double(6,2))`
select column_get(column_create(1, 18446744073709551615 AS unsigned int), 1 as double);
column_get(column_create(1, 18446744073709551615 AS unsigned int), 1 as double)
1.8446744073709552e19
@@ -521,13 +521,13 @@ select column_get(column_create(1, 1212.12 AS double), 1 as decimal);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1003 select cast(column_get(column_create(1,1212.12 AS double),1) as decimal(10,0)) AS `column_get(column_create(1, 1212.12 AS double), 1 as decimal)`
+Note 1003 select column_get(column_create(1,1212.12 AS double),1 as decimal(10,0)) AS `column_get(column_create(1, 1212.12 AS double), 1 as decimal)`
explain extended
select column_get(column_create(1, 1212.12 AS double), 1 as decimal(6,2));
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
-Note 1003 select cast(column_get(column_create(1,1212.12 AS double),1) as decimal(6,2)) AS `column_get(column_create(1, 1212.12 AS double), 1 as decimal(6,2))`
+Note 1003 select column_get(column_create(1,1212.12 AS double),1 as decimal(6,2)) AS `column_get(column_create(1, 1212.12 AS double), 1 as decimal(6,2))`
select column_get(column_create(1, 18446744073709551615 AS unsigned int), 1 as decimal(20,0));
column_get(column_create(1, 18446744073709551615 AS unsigned int), 1 as decimal(20,0))
18446744073709551615
@@ -1335,3 +1335,74 @@ hex(COLUMN_CREATE(0, COLUMN_GET(COLUMN_CREATE(0, 0.0 as decimal), 0 as decimal))
select hex(COLUMN_CREATE(0, 0.0 as decimal));
hex(COLUMN_CREATE(0, 0.0 as decimal))
000100000004
+#
+# MDEV-4292: parse error when selecting on views using dynamic column
+#
+create table t1 (i int, d blob);
+create view v1 as select i, column_get(d, 1 as binary) as a from t1;
+select * from v1;
+i a
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i`,column_get(`t1`.`d`,1 as char charset binary) AS `a` from `t1` latin1 latin1_swedish_ci
+drop view v1;
+create view v1 as select i, column_get(d, 1 as int) as a from t1;
+select * from v1;
+i a
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i`,column_get(`t1`.`d`,1 as signed) AS `a` from `t1` latin1 latin1_swedish_ci
+drop view v1;
+create view v1 as select i, column_get(d, 1 as unsigned int) as a from t1;
+select * from v1;
+i a
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i`,column_get(`t1`.`d`,1 as unsigned) AS `a` from `t1` latin1 latin1_swedish_ci
+drop view v1;
+create view v1 as select i, column_get(d, 1 as date) as a from t1;
+select * from v1;
+i a
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i`,column_get(`t1`.`d`,1 as date) AS `a` from `t1` latin1 latin1_swedish_ci
+drop view v1;
+create view v1 as select i, column_get(d, 1 as time) as a from t1;
+select * from v1;
+i a
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i`,column_get(`t1`.`d`,1 as time) AS `a` from `t1` latin1 latin1_swedish_ci
+drop view v1;
+create view v1 as select i, column_get(d, 1 as datetime) as a from t1;
+select * from v1;
+i a
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i`,column_get(`t1`.`d`,1 as datetime) AS `a` from `t1` latin1 latin1_swedish_ci
+drop view v1;
+create view v1 as select i, column_get(d, 1 as decimal) as a from t1;
+select * from v1;
+i a
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i`,column_get(`t1`.`d`,1 as decimal(10,0)) AS `a` from `t1` latin1 latin1_swedish_ci
+drop view v1;
+create view v1 as select i, column_get(d, 1 as double) as a from t1;
+select * from v1;
+i a
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i`,column_get(`t1`.`d`,1 as double) AS `a` from `t1` latin1 latin1_swedish_ci
+drop view v1;
+create view v1 as select i, column_get(d, 1 as char) as a from t1;
+select * from v1;
+i a
+show create view v1;
+View Create View character_set_client collation_connection
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i`,column_get(`t1`.`d`,1 as char charset latin1) AS `a` from `t1` latin1 latin1_swedish_ci
+drop view v1;
+drop table t1;
+#
+# end of 5.3 tests
+#
diff --git a/mysql-test/r/func_group.result b/mysql-test/r/func_group.result
index f1884df2452..55afba245bd 100644
--- a/mysql-test/r/func_group.result
+++ b/mysql-test/r/func_group.result
@@ -2090,6 +2090,13 @@ set @@optimizer_switch=@save_optimizer_switch;
# Cleanup for BUG#46680
#
DROP TABLE IF EXISTS t1,t2,t3,empty1;
+create table t1 (i int, d date);
+insert into t1 values (1, '2008-10-02'), (2, '2010-12-12');
+select avg(export_set( 3, 'y', sha(i))), group_concat(d) from t1 group by d order by i;
+avg(export_set( 3, 'y', sha(i))) group_concat(d)
+0 2008-10-02
+0 2010-12-12
+drop table t1;
#
# Bug#52123 Assertion failed: aggregator == aggr->Aggrtype(),
# file .\item_sum.cc, line 587
diff --git a/mysql-test/r/func_group_innodb.result b/mysql-test/r/func_group_innodb.result
index 67ea44f187a..9489960d28c 100644
--- a/mysql-test/r/func_group_innodb.result
+++ b/mysql-test/r/func_group_innodb.result
@@ -217,7 +217,20 @@ SELECT member_id_to, COUNT(*) FROM t1 WHERE r_date =
member_id_to COUNT(*)
518491 2
DROP TABLE t1;
-# End of test BUG#12713907
+#
+# MDEV-4269: crash when grouping by values()
+#
+SELECT @@storage_engine INTO @old_engine;
+set storage_engine=innodb;
+create table y select 1 b;
+select 1 from y group by b;
+1
+1
+select 1 from y group by values(b);
+1
+1
+drop table y;
+SET storage_engine=@old_engine;
#
# Bug#13723054 CRASH WITH MIN/MAX AFTER QUICK_GROUP_MIN_MAX_SELECT::NEXT_MIN
#
diff --git a/mysql-test/r/func_sapdb.result b/mysql-test/r/func_sapdb.result
index fa3d37c08c2..1f20ddc6cbb 100644
--- a/mysql-test/r/func_sapdb.result
+++ b/mysql-test/r/func_sapdb.result
@@ -168,7 +168,7 @@ date("1997-12-31 23:59:59.000001")
1997-12-31
select date("1997-13-31 23:59:59.000001");
date("1997-13-31 23:59:59.000001")
-NULL
+0000-00-00
Warnings:
Warning 1292 Incorrect datetime value: '1997-13-31 23:59:59.000001'
select time("1997-12-31 23:59:59.000001");
@@ -176,7 +176,7 @@ time("1997-12-31 23:59:59.000001")
23:59:59.000001
select time("1997-12-31 25:59:59.000001");
time("1997-12-31 25:59:59.000001")
-NULL
+00:00:00
Warnings:
Warning 1292 Truncated incorrect time value: '1997-12-31 25:59:59.000001'
select microsecond("1997-12-31 23:59:59.000001");
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result
index 185f7182934..16c0854241f 100644
--- a/mysql-test/r/func_str.result
+++ b/mysql-test/r/func_str.result
@@ -2634,6 +2634,31 @@ SELECT * FROM t1;
a
aaaaaaaaaaaaaa
DROP TABLE t1;
+SELECT SUBSTRING('1', DAY(FROM_UNIXTIME(-1)));
+SUBSTRING('1', DAY(FROM_UNIXTIME(-1)))
+NULL
+SELECT LEFT('1', DAY(FROM_UNIXTIME(-1)));
+LEFT('1', DAY(FROM_UNIXTIME(-1)))
+NULL
+SELECT RIGHT('1', DAY(FROM_UNIXTIME(-1)));
+RIGHT('1', DAY(FROM_UNIXTIME(-1)))
+NULL
+SELECT REPEAT('1', DAY(FROM_UNIXTIME(-1)));
+REPEAT('1', DAY(FROM_UNIXTIME(-1)))
+NULL
+SELECT RPAD('hi', DAY(FROM_UNIXTIME(-1)),'?');
+RPAD('hi', DAY(FROM_UNIXTIME(-1)),'?')
+NULL
+SELECT LPAD('hi', DAY(FROM_UNIXTIME(-1)),'?');
+LPAD('hi', DAY(FROM_UNIXTIME(-1)),'?')
+NULL
+create table t1 (i int);
+insert into t1 values (null),(8);
+select group_concat( i ), make_set( i, 'a', 'b' ) field from t1 group by field;
+group_concat( i ) field
+NULL NULL
+8
+drop table t1;
End of 5.1 tests
Start of 5.4 tests
SELECT format(12345678901234567890.123, 3);
diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result
index a5491c9c839..38a547843ad 100644
--- a/mysql-test/r/func_time.result
+++ b/mysql-test/r/func_time.result
@@ -1781,7 +1781,7 @@ Warnings:
Warning 1441 Datetime function: time field overflow
select cast('131415.123e0' as time);
cast('131415.123e0' as time)
-NULL
+00:00:00
Warnings:
Warning 1292 Truncated incorrect time value: '131415.123e0'
select cast('2010-01-02 03:04:05' as datetime) between null and '2010-01-02 03:04:04';
@@ -1801,12 +1801,12 @@ unix_timestamp(null)
NULL
select truncate(date('2010-40-10'), 6);
truncate(date('2010-40-10'), 6)
-NULL
+0.000000
Warnings:
Warning 1292 Incorrect datetime value: '2010-40-10'
select extract(month from '2010-40-50');
extract(month from '2010-40-50')
-NULL
+0
Warnings:
Warning 1292 Incorrect datetime value: '2010-40-50'
select subtime('0000-00-10 10:10:10', '30 10:00:00');
@@ -1924,3 +1924,15 @@ microsecond('12:00:00.123456') microsecond('2009-12-31 23:59:59.000010')
123456 10
select now(258);
ERROR 42000: Too big precision 258 specified for 'now'. Maximum is 6.
+SELECT 1 FROM DUAL WHERE YEAR(TIMEDIFF(NULL, '12:12:12'));
+1
+SELECT 1 FROM DUAL WHERE MONTH(TIMEDIFF(NULL, '12:12:12'));
+1
+SELECT 1 FROM DUAL WHERE DAYOFMONTH(TIMEDIFF(NULL, '12:12:12'));
+1
+SELECT 1 FROM DUAL WHERE HOUR(TIMEDIFF(NULL, '12:12:12'));
+1
+SELECT 1 FROM DUAL WHERE MINUTE(TIMEDIFF(NULL, '12:12:12'));
+1
+SELECT 1 FROM DUAL WHERE SECOND(TIMEDIFF(NULL, '12:12:12'));
+1
diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result
index 906ed3f9338..eb9f1a57c32 100644
--- a/mysql-test/r/gis.result
+++ b/mysql-test/r/gis.result
@@ -406,20 +406,20 @@ FROM gis_geometrycollection g1, gis_geometrycollection g2 ORDER BY first, second
first second w c o e d t i r
120 120 1 1 0 1 0 1 1 0
120 121 0 0 1 0 0 0 1 0
-120 122 0 1 NULL 0 NULL 0 NULL 0
-120 123 0 1 NULL 0 NULL 0 NULL 0
+120 122 NULL NULL NULL NULL NULL NULL NULL NULL
+120 123 NULL NULL NULL NULL NULL NULL NULL NULL
121 120 0 0 1 0 0 0 1 0
121 121 1 1 0 1 0 1 1 0
-121 122 0 1 NULL 0 NULL 0 NULL 0
-121 123 0 1 NULL 0 NULL 0 NULL 0
-122 120 1 0 NULL 0 NULL 0 NULL 0
-122 121 1 0 NULL 0 NULL 0 NULL 0
-122 122 1 1 NULL 1 NULL 0 NULL 0
-122 123 1 1 NULL 1 NULL 0 NULL 0
-123 120 1 0 NULL 0 NULL 0 NULL 0
-123 121 1 0 NULL 0 NULL 0 NULL 0
-123 122 1 1 NULL 1 NULL 0 NULL 0
-123 123 1 1 NULL 1 NULL 0 NULL 0
+121 122 NULL NULL NULL NULL NULL NULL NULL NULL
+121 123 NULL NULL NULL NULL NULL NULL NULL NULL
+122 120 NULL NULL NULL NULL NULL NULL NULL NULL
+122 121 NULL NULL NULL NULL NULL NULL NULL NULL
+122 122 NULL NULL NULL NULL NULL NULL NULL NULL
+122 123 NULL NULL NULL NULL NULL NULL NULL NULL
+123 120 NULL NULL NULL NULL NULL NULL NULL NULL
+123 121 NULL NULL NULL NULL NULL NULL NULL NULL
+123 122 NULL NULL NULL NULL NULL NULL NULL NULL
+123 123 NULL NULL NULL NULL NULL NULL NULL NULL
explain extended SELECT g1.fid as first, g2.fid as second,
Within(g1.g, g2.g) as w, Contains(g1.g, g2.g) as c, Overlaps(g1.g, g2.g) as o,
Equals(g1.g, g2.g) as e, Disjoint(g1.g, g2.g) as d, Touches(g1.g, g2.g) as t,
@@ -1063,6 +1063,84 @@ create table t1(a char(32) not null) engine=myisam;
create spatial index i on t1 (a);
ERROR HY000: Incorrect arguments to SPATIAL INDEX
drop table t1;
+CREATE TABLE t0 (a BINARY(32) NOT NULL);
+CREATE SPATIAL INDEX i on t0 (a);
+ERROR HY000: Incorrect arguments to SPATIAL INDEX
+INSERT INTO t0 VALUES (1);
+CREATE TABLE t1(
+col0 BINARY NOT NULL,
+col2 TIMESTAMP,
+SPATIAL INDEX i1 (col0)
+) ENGINE=MyISAM;
+ERROR HY000: Incorrect arguments to SPATIAL INDEX
+CREATE TABLE t1 (
+col0 BINARY NOT NULL,
+col2 TIMESTAMP
+) ENGINE=MyISAM;
+CREATE SPATIAL INDEX idx0 ON t1(col0);
+ERROR HY000: Incorrect arguments to SPATIAL INDEX
+ALTER TABLE t1 ADD SPATIAL INDEX i1 (col0);
+ERROR HY000: Incorrect arguments to SPATIAL INDEX
+CREATE TABLE t2 (
+col0 INTEGER NOT NULL,
+col1 POINT,
+col2 POINT
+);
+CREATE SPATIAL INDEX idx0 ON t2 (col1, col2);
+ERROR HY000: Incorrect arguments to SPATIAL INDEX
+CREATE TABLE t3 (
+col0 INTEGER NOT NULL,
+col1 POINT,
+col2 LINESTRING,
+SPATIAL INDEX i1 (col1, col2)
+);
+ERROR HY000: Incorrect arguments to SPATIAL INDEX
+DROP TABLE t0, t1, t2;
+#
+# BUG#12414917 - ISCLOSED() CRASHES ON 64-BIT BUILDS
+#
+SELECT ISCLOSED(CONVERT(CONCAT(' ', 0x2), BINARY(20)));
+ISCLOSED(CONVERT(CONCAT(' ', 0x2), BINARY(20)))
+NULL
+#
+# BUG#12537203 - CRASH WHEN SUBSELECTING GLOBAL VARIABLES IN
+# GEOMETRY FUNCTION ARGUMENTS
+#
+SELECT GEOMETRYCOLLECTION((SELECT @@OLD));
+ERROR 22007: Illegal non geometric '' value found during parsing
+#
+# MDEV-4252 geometry query crashes server
+#
+select astext(0x0100000000030000000100000000000010);
+astext(0x0100000000030000000100000000000010)
+NULL
+select astext(st_centroid(0x0100000000030000000100000000000010));
+astext(st_centroid(0x0100000000030000000100000000000010))
+NULL
+select astext(st_exteriorring(0x0100000000030000000100000000000010));
+astext(st_exteriorring(0x0100000000030000000100000000000010))
+NULL
+select envelope(0x0100000000030000000100000000000010);
+envelope(0x0100000000030000000100000000000010)
+NULL
+select geometryn(0x0100000000070000000100000001030000000200000000000000ffff0000, 1);
+geometryn(0x0100000000070000000100000001030000000200000000000000ffff0000, 1)
+NULL
+select geometryn(0x0100000000070000000100000001030000000200000000000000ffffff0f, 1);
+geometryn(0x0100000000070000000100000001030000000200000000000000ffffff0f, 1)
+NULL
+#
+# MDEV-4296 Assertion `n_linear_rings > 0' fails in Gis_polygon::centroid_xy
+#
+SELECT Centroid( AsBinary( LineString(Point(0,0), Point(0,0), Point(0,0) )));
+Centroid( AsBinary( LineString(Point(0,0), Point(0,0), Point(0,0) )))
+NULL
+#
+# MDEV-4295 Server crashes in get_point on a query with Area, AsBinary, MultiPoint
+#
+SELECT Area(AsBinary(MultiPoint(Point(0,9), Point(0,1), Point(2,2))));
+Area(AsBinary(MultiPoint(Point(0,9), Point(0,1), Point(2,2))))
+NULL
End of 5.1 tests
select ST_AREA(ST_GEOMCOLLFROMTEXT(' GEOMETRYCOLLECTION(LINESTRING(100 100, 31 10, 77 80), POLYGON((0 0,4 7,1 1,0 0)), POINT(20 20))'));
ST_AREA(ST_GEOMCOLLFROMTEXT(' GEOMETRYCOLLECTION(LINESTRING(100 100, 31 10, 77 80), POLYGON((0 0,4 7,1 1,0 0)), POINT(20 20))'))
@@ -1428,6 +1506,7 @@ WHERE ST_Contains(ST_Buffer(bridges.position, 15.0), buildings.footprint) = 1;
count(*)
1
DROP DATABASE gis_ogs;
+USE test;
#
# BUG #1043845 st_distance() results are incorrect depending on variable order
#
@@ -1451,20 +1530,23 @@ geomfromtext('LINESTRING(-95.9673005697771 36.13509598461,
-95.9673057475387 36.1344478941074,
-95.9673063519371 36.
0.008148695928146028
-USE test;
#
-# BUG#12414917 - ISCLOSED() CRASHES ON 64-BIT BUILDS
+# MDEV-4310 geometry function equals hangs forever.
#
-SELECT ISCLOSED(CONVERT(CONCAT(' ', 0x2), BINARY(20)));
-ISCLOSED(CONVERT(CONCAT(' ', 0x2), BINARY(20)))
+create table t1(a geometry not null)engine=myisam;
+insert into t1 values(geomfromtext("POINT(0 0)"));
+insert into t1 values(geomfromtext("POINT(0 9.2233720368548e18)"));
+insert into t1 values(geomfromtext("POINT(0 9.2233720368548e18)"));
+select equals(`a`,convert(`a` using utf8)) from `t1`;
+equals(`a`,convert(`a` using utf8))
+1
NULL
-#
-# BUG#12537203 - CRASH WHEN SUBSELECTING GLOBAL VARIABLES IN
-# GEOMETRY FUNCTION ARGUMENTS
-#
-SELECT GEOMETRYCOLLECTION((SELECT @@OLD));
-ERROR 22007: Illegal non geometric '' value found during parsing
-End of 5.1 tests
+NULL
+Warnings:
+Warning 1300 Invalid utf8 character string: 'E043'
+Warning 1300 Invalid utf8 character string: 'E043'
+drop table t1;
+End of 5.3 tests
#
# Bug#11908153: CRASH AND/OR VALGRIND ERRORS IN FIELD_BLOB::GET_KEY_IMAGE
#
@@ -1498,19 +1580,4 @@ create table t1 (pt point);
insert into t1 values(Geomfromtext('POLYGON((1 1, 2 2, 2 1, 1 1))'));
ERROR 22007: Incorrect POINT value: 'POLYGON' for column 'pt' at row 1
drop table t1;
-#
-# TODO-424 geometry query crashes server
-#
-select astext(0x0100000000030000000100000000000010);
-astext(0x0100000000030000000100000000000010)
-NULL
-select st_area(0x0100000000030000000100000000000010);
-st_area(0x0100000000030000000100000000000010)
-NULL
-select astext(st_exteriorring(0x0100000000030000000100000000000010));
-astext(st_exteriorring(0x0100000000030000000100000000000010))
-NULL
-select astext(st_centroid(0x0100000000030000000100000000000010));
-astext(st_centroid(0x0100000000030000000100000000000010))
-NULL
End of 5.5 tests
diff --git a/mysql-test/r/mdev316.result b/mysql-test/r/mdev316.result
index 43082769872..78272549e81 100644
--- a/mysql-test/r/mdev316.result
+++ b/mysql-test/r/mdev316.result
@@ -16,7 +16,7 @@ cast(convert(0x0030 using ucs2) as decimal(5.2)) cast(concat(convert(0x0030 usin
0 0
select cast(convert(_ucs2 0x0030 using latin1) as date), cast(concat(convert(_ucs2 0x0030 using latin1)) as date);
cast(convert(_ucs2 0x0030 using latin1) as date) cast(concat(convert(_ucs2 0x0030 using latin1)) as date)
-NULL NULL
+0000-00-00 0000-00-00
Warnings:
Warning 1292 Incorrect datetime value: '0'
Warning 1292 Incorrect datetime value: '0'
diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result
index b5c85555ed8..de376dc187d 100644
--- a/mysql-test/r/merge.result
+++ b/mysql-test/r/merge.result
@@ -580,25 +580,25 @@ select max(b) from t1 where a = 2;
max(b)
1
drop table t3,t1,t2;
-CREATE TABLE t1 (c1 INT NOT NULL);
-CREATE TABLE t2 (c1 INT NOT NULL);
-INSERT INTO t1 VALUES (1);
-INSERT INTO t2 VALUES (2);
-CREATE TEMPORARY TABLE t3 (c1 INT NOT NULL) ENGINE=MRG_MYISAM UNION=(t1,t2);
-SELECT * FROM t3;
-c1
+create table t1 (a int not null);
+create table t2 (a int not null);
+insert into t1 values (1);
+insert into t2 values (2);
+create temporary table t3 (a int not null) ENGINE=MERGE UNION=(t1,t2);
+select * from t3;
+a
1
2
-CREATE TEMPORARY TABLE t4 (c1 INT NOT NULL);
-CREATE TEMPORARY TABLE t5 (c1 INT NOT NULL);
-INSERT INTO t4 VALUES (4);
-INSERT INTO t5 VALUES (5);
-CREATE TEMPORARY TABLE t6 (c1 INT NOT NULL) ENGINE=MRG_MYISAM UNION=(t4,t5);
-SELECT * FROM t6;
-c1
-4
-5
-DROP TABLE t6, t3, t1, t2, t4, t5;
+create temporary table t4 (a int not null);
+create temporary table t5 (a int not null);
+insert into t4 values (1);
+insert into t5 values (2);
+create temporary table t6 (a int not null) ENGINE=MERGE UNION=(t4,t5);
+select * from t6;
+a
+1
+2
+drop table t6, t3, t1, t2, t4, t5;
create temporary table t1 (a int not null);
create temporary table t2 (a int not null);
insert into t1 values (1);
@@ -996,11 +996,6 @@ m1 CREATE TABLE `m1` (
`a` int(11) DEFAULT NULL
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1, m1;
-CREATE TABLE t1(a INT, KEY(a)) ENGINE=merge;
-SELECT MAX(a) FROM t1;
-MAX(a)
-NULL
-DROP TABLE t1;
CREATE TABLE t1(a INT);
CREATE TABLE t2(a VARCHAR(10));
CREATE TABLE m1(a INT) ENGINE=MERGE UNION=(t1, t2);
@@ -1935,9 +1930,9 @@ ALTER TABLE t2 UNION=(t3,t1);
SELECT * FROM t2;
ERROR HY000: Table 't3' is differently defined or of non-MyISAM type or doesn't exist
DROP TABLE t1, t2, t3;
-CREATE TABLE t1 (c1 INT) ENGINE=MyISAM;
-CREATE TABLE t2 (c1 INT) ENGINE=MyISAM;
-CREATE TABLE t3 (c1 INT) ENGINE=MRG_MYISAM UNION=(t1,t2);
+CREATE TABLE t1 (c1 INT) ENGINE= MyISAM;
+CREATE TABLE t2 (c1 INT) ENGINE= MyISAM;
+CREATE TABLE t3 (c1 INT) ENGINE= MRG_MYISAM UNION= (t1, t2);
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (2);
SELECT * FROM t3;
@@ -2400,6 +2395,142 @@ Table Op Msg_type Msg_text
test.m1 repair note The storage engine for the table doesn't support repair
DROP TABLE m1, t1;
End of 5.1 tests
+#
+# MDEV-4277: Crash inside mi_killed_in_mariadb() with myisammrg
+#
+create table t1 (a int);
+insert into t1 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t2 ( i int ) engine=myisam;
+insert into t2 values (1),(2);
+create table t3 (a int, b int, filler char(100), key(a), key(b)) engine=myisam;
+create table t4 like t3;
+insert into t3
+select A.a+10*B.a+100*C.a,
+A.a+10*B.a+100*C.a,
+'filler-data-FILLER-DATA-qqq'
+from t1 A, t1 B, t1 C where C.a < 5;
+insert into t4
+select A.a+10*B.a+100*C.a,
+A.a+10*B.a+100*C.a,
+'filler-data-FILLER-DATA-qqq'
+from t1 A, t1 B, t1 C where C.a >= 5;
+create table t5 like t3;
+alter table t5 engine=merge;
+alter table t5 union(t3, t4);
+update t5 set b=999, a=999 where b>950;
+explain
+select * from t2, t5 where t5.a=999 and t5.b=999;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 2
+1 SIMPLE t5 index_merge a,b a,b 5,5 NULL 6 Using intersect(a,b); Using where; Using join buffer (flat, BNL join)
+select * from t2, t5 where t5.a=999 and t5.b=999;
+i a b filler
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+1 999 999 filler-data-FILLER-DATA-qqq
+2 999 999 filler-data-FILLER-DATA-qqq
+drop table t5;
+drop table t1,t2,t3,t4;
+End of 5.3 tests
+CREATE TABLE t1(a INT, KEY(a)) ENGINE=merge;
+SELECT MAX(a) FROM t1;
+MAX(a)
+NULL
+DROP TABLE t1;
#
# An additional test case for Bug#27430 Crash in subquery code
# when in PS and table DDL changed after PREPARE
diff --git a/mysql-test/r/partition_pruning.result b/mysql-test/r/partition_pruning.result
index ec7fd798d4c..f4d473c00d5 100644
--- a/mysql-test/r/partition_pruning.result
+++ b/mysql-test/r/partition_pruning.result
@@ -2235,9 +2235,10 @@ INSERT INTO t1 VALUES (1, '2009-01-01'), (2, NULL);
# test with an invalid date, which lead to item->null_value is set.
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE b < CAST('2009-04-99' AS DATETIME);
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
+1 SIMPLE t1 p20090401 ALL NULL NULL NULL NULL 2 Using where
Warnings:
Warning 1292 Incorrect datetime value: '2009-04-99'
+Warning 1292 Incorrect datetime value: '2009-04-99'
DROP TABLE t1;
CREATE TABLE t1
(a INT NOT NULL AUTO_INCREMENT,
diff --git a/mysql-test/r/temporal_scale_4283.result b/mysql-test/r/temporal_scale_4283.result
new file mode 100644
index 00000000000..685a6192a97
--- /dev/null
+++ b/mysql-test/r/temporal_scale_4283.result
@@ -0,0 +1,12 @@
+create table t1 (a int);
+insert into t1 values (4),(8);
+select distinct 100 mod timestampadd( week, a, '2002-05-20' ) from t1;
+100 mod timestampadd( week, a, '2002-05-20' )
+100
+drop table t1;
+create table t1 (i int);
+insert into t1 values (2),(4);
+select distinct convert_tz( '2001-03-21', 'utc', 'met' ) mod i from t1;
+convert_tz( '2001-03-21', 'utc', 'met' ) mod i
+0
+drop table t1;
diff --git a/mysql-test/r/type_date.result b/mysql-test/r/type_date.result
index 8a85cd53b2a..2d4a290751f 100644
--- a/mysql-test/r/type_date.result
+++ b/mysql-test/r/type_date.result
@@ -136,7 +136,7 @@ select @d:=1311;
1311
select year(@d), month(@d), day(@d), cast(@d as date);
year(@d) month(@d) day(@d) cast(@d as date)
-NULL NULL NULL NULL
+0 0 0 0000-00-00
Warnings:
Warning 1292 Incorrect datetime value: '1311'
Warning 1292 Incorrect datetime value: '1311'
diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result
index 811fbacaf59..05cdcf7e256 100644
--- a/mysql-test/r/type_datetime.result
+++ b/mysql-test/r/type_datetime.result
@@ -573,7 +573,7 @@ CAST('NULL' AS DATE) < CAST('2008-01-01' AS DATE) n7,
CAST('2008-01-01' AS DATE) < CAST('NULL' AS DATE) n8,
CAST('NULL' AS DATE) < CAST('NULL' AS DATE) n9;
n1 n2 n3 n4 n5 n6 n7 n8 n9
-0 0 1 NULL NULL NULL NULL NULL NULL
+0 0 1 1 1 0 1 0 0
Warnings:
Warning 1292 Incorrect datetime value: 'NULL'
Warning 1292 Incorrect datetime value: 'NULL'
@@ -585,6 +585,8 @@ Warning 1292 Incorrect datetime value: 'NULL'
Warning 1292 Incorrect datetime value: 'NULL'
Warning 1292 Incorrect datetime value: 'NULL'
Warning 1292 Incorrect datetime value: 'NULL'
+Warning 1292 Incorrect datetime value: 'NULL'
+Warning 1292 Incorrect datetime value: 'NULL'
End of 5.0 tests
set @org_mode=@@sql_mode;
create table t1 (da date default '1962-03-03 23:33:34', dt datetime default '1962-03-03');
@@ -651,6 +653,19 @@ SELECT * FROM t1;
dt1
DROP TABLE t1;
End of 5.1 tests
+create table t1 (d date, t time) engine=myisam;
+insert into t1 values ('2000-12-03','22:55:23'),('2008-05-03','10:19:31');
+select case when d = '2012-12-12' then d else t end as cond, group_concat( d ) from t1 group by cond;
+cond group_concat( d )
+0000-00-00 00:00:00 2000-12-03
+0000-00-00 00:00:00 2008-05-03
+Warnings:
+Warning 1292 Incorrect datetime value: '22:55:23'
+Warning 1292 Incorrect datetime value: '10:19:31'
+Warning 1292 Incorrect datetime value: '22:55:23'
+Warning 1292 Incorrect datetime value: '10:19:31'
+drop table t1;
+End of 5.3 tests
#
# Start of 5.5 tests
#