summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/ctype_uca.result20
-rw-r--r--mysql-test/r/view.result36
2 files changed, 56 insertions, 0 deletions
diff --git a/mysql-test/r/ctype_uca.result b/mysql-test/r/ctype_uca.result
index 2f7cb7156a4..08d87fa292d 100644
--- a/mysql-test/r/ctype_uca.result
+++ b/mysql-test/r/ctype_uca.result
@@ -13728,3 +13728,23 @@ SET NAMES utf8;
#
# End of MariaDB-10.1 tests
#
+#
+# Start of MariaDB-10.2 tests
+#
+#
+# MDEV-9407 Illegal mix of collation when using GROUP_CONCAT in a VIEW
+#
+SET NAMES utf8;
+CREATE TABLE t1 (col1 VARCHAR(12) CHARACTER SET utf8 COLLATE utf8_unicode_ci);
+INSERT INTO t1 VALUES ('a'),('b');
+CREATE VIEW v1 AS SELECT group_concat('f') AS col1;
+SELECT col1 FROM v1 UNION SELECT col1 FROM t1;
+col1
+f
+a
+b
+DROP VIEW v1;
+DROP TABLE t1;
+#
+# End of MariaDB-10.2 tests
+#
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index dec85fbcd4b..01a06fad00d 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -5878,3 +5878,39 @@ DROP TABLE t1;
#
# End of 10.1 tests
#
+#
+# Start of 10.2 tests
+#
+#
+# MDEV-9408 CREATE TABLE SELECT MAX(int_column) creates different columns for table vs view
+#
+CREATE TABLE t1 (
+id int(11) NOT NULL PRIMARY KEY,
+country varchar(32),
+code int(11) default NULL
+);
+INSERT INTO t1 VALUES (1,'ITALY',100),(2,'ITALY',200),(3,'FRANCE',100), (4,'ITALY',100);
+CREATE VIEW v1 AS SELECT * FROM t1;
+CREATE TABLE t2 AS
+SELECT code, COUNT(DISTINCT country), MAX(id) FROM t1 GROUP BY code ORDER BY MAX(id);
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `code` int(11) DEFAULT NULL,
+ `COUNT(DISTINCT country)` bigint(21) NOT NULL,
+ `MAX(id)` int(11)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+CREATE TABLE t3 AS
+SELECT code, COUNT(DISTINCT country), MAX(id) FROM v1 GROUP BY code ORDER BY MAX(id);
+SHOW CREATE TABLE t3;
+Table Create Table
+t3 CREATE TABLE `t3` (
+ `code` int(11) DEFAULT NULL,
+ `COUNT(DISTINCT country)` bigint(21) NOT NULL,
+ `MAX(id)` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP VIEW v1;
+DROP TABLE t1,t2,t3;
+#
+# End of 10.2 tests
+#