summaryrefslogtreecommitdiff
path: root/mysql-test/main
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-04-21 11:33:59 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2022-04-21 11:33:59 +0300
commit394784095eeedb3a2915249fe14a9d2e1f91a23a (patch)
tree0a2e7ad98bfa382744d87c6af6eb91f4bfc3858d /mysql-test/main
parentd7189fbcb4dadf23d615a5f3a26aba1d4e37178f (diff)
parent4730314a70119ae5857edffe2d1bec86960ef22b (diff)
downloadmariadb-git-394784095eeedb3a2915249fe14a9d2e1f91a23a.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'mysql-test/main')
-rw-r--r--mysql-test/main/brackets.result26
-rw-r--r--mysql-test/main/cte_nonrecursive.result14
-rw-r--r--mysql-test/main/cte_recursive.result8
-rw-r--r--mysql-test/main/ctype_collate.result17
-rw-r--r--mysql-test/main/ctype_collate.test17
-rw-r--r--mysql-test/main/ctype_utf32_innodb.result34
-rw-r--r--mysql-test/main/ctype_utf32_innodb.test35
-rw-r--r--mysql-test/main/derived_cond_pushdown.result6
-rw-r--r--mysql-test/main/explain_json.result2
-rw-r--r--mysql-test/main/intersect.result2
-rw-r--r--mysql-test/main/lock_view.result2
-rw-r--r--mysql-test/main/select.result46
-rw-r--r--mysql-test/main/select.test46
-rw-r--r--mysql-test/main/select_jcl6.result46
-rw-r--r--mysql-test/main/select_pkeycache.result46
-rw-r--r--mysql-test/main/show.result12
-rw-r--r--mysql-test/main/show.test11
-rw-r--r--mysql-test/main/show_check.result4
-rw-r--r--mysql-test/main/sp-i_s_columns.result34
-rw-r--r--mysql-test/main/sp-i_s_columns.test49
-rw-r--r--mysql-test/main/table_value_constr.result24
-rw-r--r--mysql-test/main/view.result4
22 files changed, 421 insertions, 64 deletions
diff --git a/mysql-test/main/brackets.result b/mysql-test/main/brackets.result
index c221d64fd17..17516af3d3f 100644
--- a/mysql-test/main/brackets.result
+++ b/mysql-test/main/brackets.result
@@ -4131,7 +4131,7 @@ create view v1 as
(select * from t2 order by a limit 2) order by b desc;
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 `__3`.`a` AS `a`,`__3`.`b` AS `b` from (select `test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b` from `test`.`t2` order by `test`.`t2`.`a` limit 2) `__3` order by `__3`.`b` desc latin1 latin1_swedish_ci
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `__3`.`a` AS `a`,`__3`.`b` AS `b` from (select `t2`.`a` AS `a`,`t2`.`b` AS `b` from `t2` order by `t2`.`a` limit 2) `__3` order by `__3`.`b` desc latin1 latin1_swedish_ci
select * from v1;
a b
2 20
@@ -4230,7 +4230,7 @@ union
select a from t1 where a=7;
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 `__5`.`a` AS `a` from (select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` <= 3 except select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` >= 3) `__5` union select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 7 latin1 latin1_swedish_ci
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `__5`.`a` AS `a` from (select `t1`.`a` AS `a` from `t1` where `t1`.`a` <= 3 except select `t1`.`a` AS `a` from `t1` where `t1`.`a` >= 3) `__5` union select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 7 latin1 latin1_swedish_ci
select * from v1;
a
1
@@ -4257,7 +4257,7 @@ union
( select a from t1 where a=4 ) ) );
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 `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 1 union select `__7`.`a` AS `a` from (select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 3 union select `__6`.`a` AS `a` from (select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 2 union (select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 4)) `__6`) `__7` latin1 latin1_swedish_ci
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 1 union select `__7`.`a` AS `a` from (select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 3 union select `__6`.`a` AS `a` from (select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 2 union (select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 4)) `__6`) `__7` latin1 latin1_swedish_ci
select * from v1;
a
1
@@ -4275,7 +4275,7 @@ union
select a from t1 where a=1;
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 `__7`.`a` AS `a` from (select `__5`.`a` AS `a` from (select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` >= 2 union select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 1 order by `a` desc limit 2) `__5` union select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 3 order by `a` limit 2) `__7` union select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 1 latin1 latin1_swedish_ci
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `__7`.`a` AS `a` from (select `__5`.`a` AS `a` from (select `t1`.`a` AS `a` from `t1` where `t1`.`a` >= 2 union select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 1 order by `a` desc limit 2) `__5` union select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 3 order by `a` limit 2) `__7` union select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 1 latin1 latin1_swedish_ci
select * from v1;
a
3
@@ -4384,7 +4384,7 @@ union
select a from t1 where a=2 order by a desc limit 3;
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 `__5`.`a` AS `a` from (select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 1 union values (3),(4),(2) order by 1 desc) `__5` union select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 2 order by `a` desc limit 3 latin1 latin1_swedish_ci
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `__5`.`a` AS `a` from (select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 1 union values (3),(4),(2) order by 1 desc) `__5` union select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 2 order by `a` desc limit 3 latin1 latin1_swedish_ci
select * from v1;
a
4
@@ -4397,7 +4397,7 @@ with t as (select * from t1 where a <=3)
select * from t;
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 with t as (select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` <= 3)select `t`.`a` AS `a` from `t` latin1 latin1_swedish_ci
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as (select `t1`.`a` AS `a` from `t1` where `t1`.`a` <= 3)select `t`.`a` AS `a` from `t` latin1 latin1_swedish_ci
select * from v1;
a
3
@@ -4413,7 +4413,7 @@ order by a desc limit 3 )
select a from t1 where a=4 union select a from t where a=7;
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 with t as (select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 3 union select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` > 3 order by `a` desc limit 3)select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 4 union select `t`.`a` AS `a` from `t` where `t`.`a` = 7 latin1 latin1_swedish_ci
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as (select `t1`.`a` AS `a` from `t1` where `t1`.`a` < 3 union select `t1`.`a` AS `a` from `t1` where `t1`.`a` > 3 order by `a` desc limit 3)select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 4 union select `t`.`a` AS `a` from `t` where `t`.`a` = 7 latin1 latin1_swedish_ci
select * from v1;
a
4
@@ -4429,7 +4429,7 @@ order by a desc limit 3 )
(select a from t1 where a=4 union select a from t where a=7 order by a desc);
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 with t as ((select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 3) union (select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` > 3) order by `a` desc limit 3)select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 4 union select `t`.`a` AS `a` from `t` where `t`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as ((select `t1`.`a` AS `a` from `t1` where `t1`.`a` < 3) union (select `t1`.`a` AS `a` from `t1` where `t1`.`a` > 3) order by `a` desc limit 3)select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 4 union select `t`.`a` AS `a` from `t` where `t`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
select * from v1;
a
7
@@ -4444,7 +4444,7 @@ order by a desc limit 3 )
(select a from t where a=4 union select a from t where a=7 order by a desc);
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 with t as ((select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 3) union (select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` > 3) order by `a` desc limit 3)select `t`.`a` AS `a` from `t` where `t`.`a` = 4 union select `t`.`a` AS `a` from `t` where `t`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as ((select `t1`.`a` AS `a` from `t1` where `t1`.`a` < 3) union (select `t1`.`a` AS `a` from `t1` where `t1`.`a` > 3) order by `a` desc limit 3)select `t`.`a` AS `a` from `t` where `t`.`a` = 4 union select `t`.`a` AS `a` from `t` where `t`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
select * from v1;
a
7
@@ -4469,7 +4469,7 @@ order by 1 desc limit 3 )
select a from t1 where a=4 union select a from t where a=7 order by a desc;
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 with t(a) as (values (2),(1) union (values (4),(7)) order by 1 desc limit 3)select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 4 union select `t`.`a` AS `a` from `t` where `t`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t(a) as (values (2),(1) union (values (4),(7)) order by 1 desc limit 3)select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 4 union select `t`.`a` AS `a` from `t` where `t`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
select * from v1;
a
7
@@ -4484,7 +4484,7 @@ order by 1 desc limit 3 )
select a from t1 where a=1 union select a from t where a=7 order by a desc;
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 with t(a) as ((values (2),(1)) union (values (4),(7) order by 1 desc) order by 1 desc limit 3)select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 1 union select `t`.`a` AS `a` from `t` where `t`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t(a) as ((values (2),(1)) union (values (4),(7) order by 1 desc) order by 1 desc limit 3)select `t1`.`a` AS `a` from `t1` where `t1`.`a` = 1 union select `t`.`a` AS `a` from `t` where `t`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
select * from v1;
a
7
@@ -4496,7 +4496,7 @@ s as (select * from t1 where a > 3)
select a from t where a=1 union select a from s where a=7 order by a desc;
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 with t as (select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 3), s as (select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` > 3)select `t`.`a` AS `a` from `t` where `t`.`a` = 1 union select `s`.`a` AS `a` from `s` where `s`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as (select `t1`.`a` AS `a` from `t1` where `t1`.`a` < 3), s as (select `t1`.`a` AS `a` from `t1` where `t1`.`a` > 3)select `t`.`a` AS `a` from `t` where `t`.`a` = 1 union select `s`.`a` AS `a` from `s` where `s`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
select * from v1;
a
7
@@ -4508,7 +4508,7 @@ s as (select * from t where a > 3)
select a from t where a=1 union select a from s where a=7 order by a desc;
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 with t as (select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 3), s as (select `t`.`a` AS `a` from `t` where `t`.`a` > 3)select `t`.`a` AS `a` from `t` where `t`.`a` = 1 union select `s`.`a` AS `a` from `s` where `s`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as (select `t1`.`a` AS `a` from `t1` where `t1`.`a` < 3), s as (select `t`.`a` AS `a` from `t` where `t`.`a` > 3)select `t`.`a` AS `a` from `t` where `t`.`a` = 1 union select `s`.`a` AS `a` from `s` where `s`.`a` = 7 order by `a` desc latin1 latin1_swedish_ci
select * from v1;
a
1
diff --git a/mysql-test/main/cte_nonrecursive.result b/mysql-test/main/cte_nonrecursive.result
index b1401baed6f..f6cb180f4a5 100644
--- a/mysql-test/main/cte_nonrecursive.result
+++ b/mysql-test/main/cte_nonrecursive.result
@@ -571,7 +571,7 @@ with t as (select a from t1 where b >= 'c')
select * from t2,t where t2.c=t.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 with t as (select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`b` >= 'c')select `test`.`t2`.`c` AS `c`,`t`.`a` AS `a` from (`test`.`t2` join `t`) where `test`.`t2`.`c` = `t`.`a` latin1 latin1_swedish_ci
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as (select `t1`.`a` AS `a` from `t1` where `t1`.`b` >= 'c')select `t2`.`c` AS `c`,`t`.`a` AS `a` from (`t2` join `t`) where `t2`.`c` = `t`.`a` latin1 latin1_swedish_ci
select * from v1;
c a
4 4
@@ -588,7 +588,7 @@ with t as (select a, count(*) from t1 where b >= 'c' group by a)
select * from t2,t where t2.c=t.a;
show create view v2;
View Create View character_set_client collation_connection
-v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS with t as (select `test`.`t1`.`a` AS `a`,count(0) AS `count(*)` from `test`.`t1` where `test`.`t1`.`b` >= 'c' group by `test`.`t1`.`a`)select `test`.`t2`.`c` AS `c`,`t`.`a` AS `a`,`t`.`count(*)` AS `count(*)` from (`test`.`t2` join `t`) where `test`.`t2`.`c` = `t`.`a` latin1 latin1_swedish_ci
+v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS with t as (select `t1`.`a` AS `a`,count(0) AS `count(*)` from `t1` where `t1`.`b` >= 'c' group by `t1`.`a`)select `t2`.`c` AS `c`,`t`.`a` AS `a`,`t`.`count(*)` AS `count(*)` from (`t2` join `t`) where `t2`.`c` = `t`.`a` latin1 latin1_swedish_ci
select * from v2;
c a count(*)
4 4 2
@@ -606,7 +606,7 @@ with t(c) as (select a from t1 where b >= 'c')
select * from t r1 where r1.c=4;
show create view v3;
View Create View character_set_client collation_connection
-v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS with t(c) as (select `test`.`t1`.`a` AS `c` from `test`.`t1` where `test`.`t1`.`b` >= 'c')select `r1`.`c` AS `c` from `t` `r1` where `r1`.`c` = 4 latin1 latin1_swedish_ci
+v3 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v3` AS with t(c) as (select `t1`.`a` AS `c` from `t1` where `t1`.`b` >= 'c')select `r1`.`c` AS `c` from `t` `r1` where `r1`.`c` = 4 latin1 latin1_swedish_ci
select * from v3;
c
4
@@ -618,7 +618,7 @@ with t(c) as (select a from t1 where b >= 'c')
select * from t r1, t r2 where r1.c=r2.c and r2.c=4;
show create view v4;
View Create View character_set_client collation_connection
-v4 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v4` AS with t(c) as (select `test`.`t1`.`a` AS `c` from `test`.`t1` where `test`.`t1`.`b` >= 'c')select `r1`.`c` AS `c`,`r2`.`c` AS `d` from (`t` `r1` join `t` `r2`) where `r1`.`c` = `r2`.`c` and `r2`.`c` = 4 latin1 latin1_swedish_ci
+v4 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v4` AS with t(c) as (select `t1`.`a` AS `c` from `t1` where `t1`.`b` >= 'c')select `r1`.`c` AS `c`,`r2`.`c` AS `d` from (`t` `r1` join `t` `r2`) where `r1`.`c` = `r2`.`c` and `r2`.`c` = 4 latin1 latin1_swedish_ci
select * from v4;
c d
4 4
@@ -1021,10 +1021,10 @@ select a from t1;
show table status;
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 with t as (select `s`.`a` AS `a` from (select `test`.`t1`.`a` AS `a` from `test`.`t1`) `s`), r as (select `t`.`a` AS `a` from (`test`.`t2` join `t`) where `test`.`t2`.`b` = `t`.`a`)select `r`.`a` AS `a` from `r` latin1 latin1_swedish_ci
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with t as (select `s`.`a` AS `a` from (select `t1`.`a` AS `a` from `t1`) `s`), r as (select `t`.`a` AS `a` from (`t2` join `t`) where `t2`.`b` = `t`.`a`)select `r`.`a` AS `a` from `r` latin1 latin1_swedish_ci
show create view v2;
View Create View character_set_client collation_connection
-v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS with t as (select `s`.`a` AS `a` from (select `test`.`t1`.`a` AS `a` from `test`.`t1`) `s`), r as (select `t`.`a` AS `a` from (`test`.`t2` join `t`) where `test`.`t2`.`b` = `t`.`a`)select `test`.`t1`.`a` AS `a` from `test`.`t1` latin1 latin1_swedish_ci
+v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS with t as (select `s`.`a` AS `a` from (select `t1`.`a` AS `a` from `t1`) `s`), r as (select `t`.`a` AS `a` from (`t2` join `t`) where `t2`.`b` = `t`.`a`)select `t1`.`a` AS `a` from `t1` latin1 latin1_swedish_ci
select * from v1;
a
2
@@ -1349,7 +1349,7 @@ r.r_regionkey in
select r_regionkey from t where r_name <> "ASIA");
show create view v;
View Create View character_set_client collation_connection
-v CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v` AS select `n`.`n_nationkey` AS `n_nationkey`,`n`.`n_name` AS `n_name`,`n`.`n_regionkey` AS `n_regionkey`,`r`.`r_regionkey` AS `r_regionkey`,`r`.`r_name` AS `r_name` from (`test`.`nation` `n` join `test`.`region` `r`) where `n`.`n_regionkey` = `r`.`r_regionkey` and `r`.`r_regionkey` in (with t as (select `test`.`region`.`r_regionkey` AS `r_regionkey`,`test`.`region`.`r_name` AS `r_name` from `test`.`region` where `test`.`region`.`r_regionkey` <= 3)select `t`.`r_regionkey` from `t` where `t`.`r_name` <> 'ASIA') latin1 latin1_swedish_ci
+v CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v` AS select `n`.`n_nationkey` AS `n_nationkey`,`n`.`n_name` AS `n_name`,`n`.`n_regionkey` AS `n_regionkey`,`r`.`r_regionkey` AS `r_regionkey`,`r`.`r_name` AS `r_name` from (`nation` `n` join `region` `r`) where `n`.`n_regionkey` = `r`.`r_regionkey` and `r`.`r_regionkey` in (with t as (select `region`.`r_regionkey` AS `r_regionkey`,`region`.`r_name` AS `r_name` from `region` where `region`.`r_regionkey` <= 3)select `t`.`r_regionkey` from `t` where `t`.`r_name` <> 'ASIA') latin1 latin1_swedish_ci
select * from v;
n_nationkey n_name n_regionkey r_regionkey r_name
0 ALGERIA 0 0 AFRICA
diff --git a/mysql-test/main/cte_recursive.result b/mysql-test/main/cte_recursive.result
index 72d8d5cc00e..1eba49b6c29 100644
--- a/mysql-test/main/cte_recursive.result
+++ b/mysql-test/main/cte_recursive.result
@@ -818,7 +818,7 @@ where p.id = a.father or p.id = a.mother
select * from ancestors;
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 with recursive ancestors as (select `test`.`folks`.`id` AS `id`,`test`.`folks`.`name` AS `name`,`test`.`folks`.`dob` AS `dob`,`test`.`folks`.`father` AS `father`,`test`.`folks`.`mother` AS `mother` from `test`.`folks` where `test`.`folks`.`name` = 'Me' and `test`.`folks`.`dob` = '2000-01-01' union select `p`.`id` AS `id`,`p`.`name` AS `name`,`p`.`dob` AS `dob`,`p`.`father` AS `father`,`p`.`mother` AS `mother` from (`test`.`folks` `p` join `ancestors` `a`) where `p`.`id` = `a`.`father` or `p`.`id` = `a`.`mother`)select `ancestors`.`id` AS `id`,`ancestors`.`name` AS `name`,`ancestors`.`dob` AS `dob`,`ancestors`.`father` AS `father`,`ancestors`.`mother` AS `mother` from `ancestors` latin1 latin1_swedish_ci
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS with recursive ancestors as (select `folks`.`id` AS `id`,`folks`.`name` AS `name`,`folks`.`dob` AS `dob`,`folks`.`father` AS `father`,`folks`.`mother` AS `mother` from `folks` where `folks`.`name` = 'Me' and `folks`.`dob` = '2000-01-01' union select `p`.`id` AS `id`,`p`.`name` AS `name`,`p`.`dob` AS `dob`,`p`.`father` AS `father`,`p`.`mother` AS `mother` from (`folks` `p` join `ancestors` `a`) where `p`.`id` = `a`.`father` or `p`.`id` = `a`.`mother`)select `ancestors`.`id` AS `id`,`ancestors`.`name` AS `name`,`ancestors`.`dob` AS `dob`,`ancestors`.`father` AS `father`,`ancestors`.`mother` AS `mother` from `ancestors` latin1 latin1_swedish_ci
select * from v1;
id name dob father mother
100 Me 2000-01-01 20 30
@@ -849,7 +849,7 @@ where p.id = ma.mother
select * from ancestors;
show create view v2;
View Create View character_set_client collation_connection
-v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS with recursive ancestors as (select `test`.`folks`.`id` AS `id`,`test`.`folks`.`name` AS `name`,`test`.`folks`.`dob` AS `dob`,`test`.`folks`.`father` AS `father`,`test`.`folks`.`mother` AS `mother` from `test`.`folks` where `test`.`folks`.`name` = 'Me' union select `p`.`id` AS `id`,`p`.`name` AS `name`,`p`.`dob` AS `dob`,`p`.`father` AS `father`,`p`.`mother` AS `mother` from (`test`.`folks` `p` join `ancestors` `fa`) where `p`.`id` = `fa`.`father` union select `p`.`id` AS `id`,`p`.`name` AS `name`,`p`.`dob` AS `dob`,`p`.`father` AS `father`,`p`.`mother` AS `mother` from (`test`.`folks` `p` join `ancestors` `ma`) where `p`.`id` = `ma`.`mother`)select `ancestors`.`id` AS `id`,`ancestors`.`name` AS `name`,`ancestors`.`dob` AS `dob`,`ancestors`.`father` AS `father`,`ancestors`.`mother` AS `mother` from `ancestors` latin1 latin1_swedish_ci
+v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS with recursive ancestors as (select `folks`.`id` AS `id`,`folks`.`name` AS `name`,`folks`.`dob` AS `dob`,`folks`.`father` AS `father`,`folks`.`mother` AS `mother` from `folks` where `folks`.`name` = 'Me' union select `p`.`id` AS `id`,`p`.`name` AS `name`,`p`.`dob` AS `dob`,`p`.`father` AS `father`,`p`.`mother` AS `mother` from (`folks` `p` join `ancestors` `fa`) where `p`.`id` = `fa`.`father` union select `p`.`id` AS `id`,`p`.`name` AS `name`,`p`.`dob` AS `dob`,`p`.`father` AS `father`,`p`.`mother` AS `mother` from (`folks` `p` join `ancestors` `ma`) where `p`.`id` = `ma`.`mother`)select `ancestors`.`id` AS `id`,`ancestors`.`name` AS `name`,`ancestors`.`dob` AS `dob`,`ancestors`.`father` AS `father`,`ancestors`.`mother` AS `mother` from `ancestors` latin1 latin1_swedish_ci
select * from v2;
id name dob father mother
100 Me 2000-01-01 20 30
@@ -4050,10 +4050,6 @@ ANALYZE
{
"query_block": {
"union_result": {
- "table_name": "<union1,4>",
- "access_type": "ALL",
- "r_loops": 0,
- "r_rows": null,
"query_specifications": [
{
"query_block": {
diff --git a/mysql-test/main/ctype_collate.result b/mysql-test/main/ctype_collate.result
index 93bf07908b5..62a92ac9d92 100644
--- a/mysql-test/main/ctype_collate.result
+++ b/mysql-test/main/ctype_collate.result
@@ -756,3 +756,20 @@ hex(b)
61
drop table t1;
+#
+# Start of 10.2 tests
+#
+#
+# MDEV-27690 Crash on `CHARACTER SET csname COLLATE DEFAULT` in column definition
+#
+CREATE TABLE t1 (a CHAR(10) CHARACTER SET latin1 COLLATE DEFAULT);
+DROP TABLE t1;
+SELECT CAST('a' AS CHAR(10) CHARACTER SET latin1 COLLATE DEFAULT);
+CAST('a' AS CHAR(10) CHARACTER SET latin1 COLLATE DEFAULT)
+a
+SELECT COLUMN_GET(COLUMN_CREATE(0, 'string'),0 AS CHAR CHARACTER SET latin1 COLLATE DEFAULT) AS c1;
+c1
+string
+#
+# End of 10.2 tests
+#
diff --git a/mysql-test/main/ctype_collate.test b/mysql-test/main/ctype_collate.test
index 6704395a0a1..ce8559732ee 100644
--- a/mysql-test/main/ctype_collate.test
+++ b/mysql-test/main/ctype_collate.test
@@ -339,3 +339,20 @@ select hex(b) from t1 where b<'zzz' order by b;
drop table t1;
+--echo #
+--echo # Start of 10.2 tests
+--echo #
+
+--echo #
+--echo # MDEV-27690 Crash on `CHARACTER SET csname COLLATE DEFAULT` in column definition
+--echo #
+
+CREATE TABLE t1 (a CHAR(10) CHARACTER SET latin1 COLLATE DEFAULT);
+DROP TABLE t1;
+SELECT CAST('a' AS CHAR(10) CHARACTER SET latin1 COLLATE DEFAULT);
+SELECT COLUMN_GET(COLUMN_CREATE(0, 'string'),0 AS CHAR CHARACTER SET latin1 COLLATE DEFAULT) AS c1;
+
+
+--echo #
+--echo # End of 10.2 tests
+--echo #
diff --git a/mysql-test/main/ctype_utf32_innodb.result b/mysql-test/main/ctype_utf32_innodb.result
new file mode 100644
index 00000000000..82b7348cabb
--- /dev/null
+++ b/mysql-test/main/ctype_utf32_innodb.result
@@ -0,0 +1,34 @@
+#
+# Start of 10.3 tests
+#
+#
+# MDEV-28062 Assertion `(length % 4) == 0' failed in my_lengthsp_utf32 on INSERT..SELECT
+#
+SET sql_mode='';
+CREATE TABLE t1 (
+HOST CHAR DEFAULT '%',
+USER CHAR DEFAULT '%',
+ROLE CHAR DEFAULT '%',
+ENABLED ENUM ('a','a') DEFAULT 'a',
+HISTORY ENUM ('a','a') DEFAULT 'a'
+) COLLATE=utf32_general_ci ENGINE=InnoDB;
+Warnings:
+Note 1291 Column 'ENABLED' has duplicated value 'a' in ENUM
+Note 1291 Column 'HISTORY' has duplicated value 'a' in ENUM
+INSERT INTO t1 SELECT * FROM t1;
+DROP TABLE t1;
+CREATE TABLE t1 (
+HOST CHAR DEFAULT '%',
+USER CHAR DEFAULT '%',
+ROLE CHAR DEFAULT '%',
+ENABLED ENUM ('a','a') DEFAULT 'a',
+HISTORY ENUM ('a','a') DEFAULT 'a'
+) COLLATE=utf32_general_ci ENGINE=MyISAM;
+Warnings:
+Note 1291 Column 'ENABLED' has duplicated value 'a' in ENUM
+Note 1291 Column 'HISTORY' has duplicated value 'a' in ENUM
+INSERT INTO t1 SELECT * FROM t1;
+DROP TABLE t1;
+#
+# End of 10.3 tests
+#
diff --git a/mysql-test/main/ctype_utf32_innodb.test b/mysql-test/main/ctype_utf32_innodb.test
new file mode 100644
index 00000000000..1663b5adafb
--- /dev/null
+++ b/mysql-test/main/ctype_utf32_innodb.test
@@ -0,0 +1,35 @@
+--source include/have_innodb.inc
+
+--echo #
+--echo # Start of 10.3 tests
+--echo #
+
+--echo #
+--echo # MDEV-28062 Assertion `(length % 4) == 0' failed in my_lengthsp_utf32 on INSERT..SELECT
+--echo #
+
+SET sql_mode='';
+
+CREATE TABLE t1 (
+ HOST CHAR DEFAULT '%',
+ USER CHAR DEFAULT '%',
+ ROLE CHAR DEFAULT '%',
+ ENABLED ENUM ('a','a') DEFAULT 'a',
+ HISTORY ENUM ('a','a') DEFAULT 'a'
+) COLLATE=utf32_general_ci ENGINE=InnoDB;
+INSERT INTO t1 SELECT * FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (
+ HOST CHAR DEFAULT '%',
+ USER CHAR DEFAULT '%',
+ ROLE CHAR DEFAULT '%',
+ ENABLED ENUM ('a','a') DEFAULT 'a',
+ HISTORY ENUM ('a','a') DEFAULT 'a'
+) COLLATE=utf32_general_ci ENGINE=MyISAM;
+INSERT INTO t1 SELECT * FROM t1;
+DROP TABLE t1;
+
+--echo #
+--echo # End of 10.3 tests
+--echo #
diff --git a/mysql-test/main/derived_cond_pushdown.result b/mysql-test/main/derived_cond_pushdown.result
index bb6d8ee5a87..2c2d959a953 100644
--- a/mysql-test/main/derived_cond_pushdown.result
+++ b/mysql-test/main/derived_cond_pushdown.result
@@ -10722,8 +10722,6 @@ EXPLAIN
"materialized": {
"query_block": {
"union_result": {
- "table_name": "<union2,3>",
- "access_type": "ALL",
"query_specifications": [
{
"query_block": {
@@ -14753,8 +14751,6 @@ EXPLAIN
"materialized": {
"query_block": {
"union_result": {
- "table_name": "<union2,3>",
- "access_type": "ALL",
"query_specifications": [
{
"query_block": {
@@ -14975,8 +14971,6 @@ EXPLAIN
"materialized": {
"query_block": {
"union_result": {
- "table_name": "<union2,3,4>",
- "access_type": "ALL",
"query_specifications": [
{
"query_block": {
diff --git a/mysql-test/main/explain_json.result b/mysql-test/main/explain_json.result
index b918e7614af..17f83fe5362 100644
--- a/mysql-test/main/explain_json.result
+++ b/mysql-test/main/explain_json.result
@@ -247,8 +247,6 @@ EXPLAIN
{
"query_block": {
"union_result": {
- "table_name": "<union1,2>",
- "access_type": "ALL",
"query_specifications": [
{
"query_block": {
diff --git a/mysql-test/main/intersect.result b/mysql-test/main/intersect.result
index 5990fcce110..d4d92d74587 100644
--- a/mysql-test/main/intersect.result
+++ b/mysql-test/main/intersect.result
@@ -724,7 +724,7 @@ a b
drop procedure p1;
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 `test`.`t1`.`a` AS `a`,`test`.`t1`.`b` AS `b` from `test`.`t1`) union select `__6`.`c` AS `c`,`__6`.`d` AS `d` from ((select `test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`t2`) intersect (select `test`.`t3`.`e` AS `e`,`test`.`t3`.`f` AS `f` from `test`.`t3`)) `__6` union (select 4 AS `4`,4 AS `4`) latin1 latin1_swedish_ci
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS (select `t1`.`a` AS `a`,`t1`.`b` AS `b` from `t1`) union select `__6`.`c` AS `c`,`__6`.`d` AS `d` from ((select `t2`.`c` AS `c`,`t2`.`d` AS `d` from `t2`) intersect (select `t3`.`e` AS `e`,`t3`.`f` AS `f` from `t3`)) `__6` union (select 4 AS `4`,4 AS `4`) latin1 latin1_swedish_ci
drop view v1;
drop tables t1,t2,t3;
#
diff --git a/mysql-test/main/lock_view.result b/mysql-test/main/lock_view.result
index 364c2cddf60..48c45dcf23d 100644
--- a/mysql-test/main/lock_view.result
+++ b/mysql-test/main/lock_view.result
@@ -256,7 +256,7 @@ SET character_set_client = @saved_cs_client;
/*!50001 SET collation_connection = latin1_swedish_ci */;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`u1`@`localhost` SQL SECURITY DEFINER */
-/*!50001 VIEW `v1` AS select `dt`.`id` AS `id` from (select `test`.`t1`.`id` AS `id` from `test`.`t1`) `dt` */;
+/*!50001 VIEW `v1` AS select `dt`.`id` AS `id` from (select `t1`.`id` AS `id` from `t1`) `dt` */;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
diff --git a/mysql-test/main/select.result b/mysql-test/main/select.result
index 0f84ed684da..69b8a2ac544 100644
--- a/mysql-test/main/select.result
+++ b/mysql-test/main/select.result
@@ -5593,4 +5593,50 @@ select (SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@undefined));
(SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@undefined))
NULL
drop table t1;
+#
+# Bug MDEV-24262 Server crashes in st_join_table::cleanup upon
+# erroneous GROUP_CONCAT
+#
+CREATE TABLE t1 (a INT, b INT);
+INSERT INTO t1 VALUES (1,10),(2,20);
+SELECT b, GROUP_CONCAT(b ORDER BY 2), MIN(a) AS f FROM t1 GROUP BY b ORDER BY f;
+ERROR 42S22: Unknown column '2' in 'order clause'
+DROP TABLE t1;
+#
+# Bug MDEV-24560 SIGSEGV in st_join_table::cleanup + server and client
+# hang + cross-mysqld-interaction + double free or corruption (!prev)
+#
+CREATE TABLE t1 (c INT);
+SET SESSION sql_buffer_result=1;
+SELECT GROUP_CONCAT(c ORDER BY 2) FROM t1;
+GROUP_CONCAT(c ORDER BY 2)
+NULL
+SELECT GROUP_CONCAT(c ORDER BY 0) FROM t1;
+GROUP_CONCAT(c ORDER BY 0)
+NULL
+DROP TABLE t1;
+CREATE TABLE t1 (grp INT,c CHAR);
+SET sql_buffer_result=1;
+SELECT grp,GROUP_CONCAT(c ORDER BY 2) FROM t1 GROUP BY grp;
+grp GROUP_CONCAT(c ORDER BY 2)
+DROP TABLE t1;
+#
+# Bug MDEV-28077 "Wrong create options" with "big_tables" option enabled
+#
+CREATE TABLE t1(a VARCHAR(16383) CHARACTER SET UTF32, KEY k(a));
+Warnings:
+Note 1071 Specified key was too long; max key length is 1000 bytes
+INSERT INTO t1 VALUES ('abc'), ('def'), ('FFF'), ('abc'), ('FFF');
+SET SESSION big_tables=ON;
+SELECT DISTINCT COUNT(DISTINCT a) FROM t1;
+COUNT(DISTINCT a)
+3
+PREPARE stmt FROM 'SELECT DISTINCT COUNT(DISTINCT a) FROM t1';
+EXECUTE stmt;
+COUNT(DISTINCT a)
+3
+EXECUTE stmt;
+COUNT(DISTINCT a)
+3
+DROP TABLE t1;
End of 10.0 tests
diff --git a/mysql-test/main/select.test b/mysql-test/main/select.test
index 43984810c66..407108e6206 100644
--- a/mysql-test/main/select.test
+++ b/mysql-test/main/select.test
@@ -4675,4 +4675,50 @@ select (SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@undefined));
drop table t1;
+--echo #
+--echo # Bug MDEV-24262 Server crashes in st_join_table::cleanup upon
+--echo # erroneous GROUP_CONCAT
+--echo #
+
+CREATE TABLE t1 (a INT, b INT);
+INSERT INTO t1 VALUES (1,10),(2,20);
+--error ER_BAD_FIELD_ERROR
+SELECT b, GROUP_CONCAT(b ORDER BY 2), MIN(a) AS f FROM t1 GROUP BY b ORDER BY f;
+
+DROP TABLE t1;
+
+--echo #
+--echo # Bug MDEV-24560 SIGSEGV in st_join_table::cleanup + server and client
+--echo # hang + cross-mysqld-interaction + double free or corruption (!prev)
+--echo #
+
+CREATE TABLE t1 (c INT);
+SET SESSION sql_buffer_result=1;
+SELECT GROUP_CONCAT(c ORDER BY 2) FROM t1;
+SELECT GROUP_CONCAT(c ORDER BY 0) FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (grp INT,c CHAR);
+SET sql_buffer_result=1;
+SELECT grp,GROUP_CONCAT(c ORDER BY 2) FROM t1 GROUP BY grp;
+DROP TABLE t1;
+
+--echo #
+--echo # Bug MDEV-28077 "Wrong create options" with "big_tables" option enabled
+--echo #
+CREATE TABLE t1(a VARCHAR(16383) CHARACTER SET UTF32, KEY k(a));
+INSERT INTO t1 VALUES ('abc'), ('def'), ('FFF'), ('abc'), ('FFF');
+
+# big_tables are deprecated after some version
+--disable_warnings
+SET SESSION big_tables=ON;
+SELECT DISTINCT COUNT(DISTINCT a) FROM t1;
+
+PREPARE stmt FROM 'SELECT DISTINCT COUNT(DISTINCT a) FROM t1';
+EXECUTE stmt;
+EXECUTE stmt;
+
+--enable_warnings
+DROP TABLE t1;
+
--echo End of 10.0 tests
diff --git a/mysql-test/main/select_jcl6.result b/mysql-test/main/select_jcl6.result
index 7276814114f..2436ca66686 100644
--- a/mysql-test/main/select_jcl6.result
+++ b/mysql-test/main/select_jcl6.result
@@ -5604,6 +5604,52 @@ select (SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@undefined));
(SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@undefined))
NULL
drop table t1;
+#
+# Bug MDEV-24262 Server crashes in st_join_table::cleanup upon
+# erroneous GROUP_CONCAT
+#
+CREATE TABLE t1 (a INT, b INT);
+INSERT INTO t1 VALUES (1,10),(2,20);
+SELECT b, GROUP_CONCAT(b ORDER BY 2), MIN(a) AS f FROM t1 GROUP BY b ORDER BY f;
+ERROR 42S22: Unknown column '2' in 'order clause'
+DROP TABLE t1;
+#
+# Bug MDEV-24560 SIGSEGV in st_join_table::cleanup + server and client
+# hang + cross-mysqld-interaction + double free or corruption (!prev)
+#
+CREATE TABLE t1 (c INT);
+SET SESSION sql_buffer_result=1;
+SELECT GROUP_CONCAT(c ORDER BY 2) FROM t1;
+GROUP_CONCAT(c ORDER BY 2)
+NULL
+SELECT GROUP_CONCAT(c ORDER BY 0) FROM t1;
+GROUP_CONCAT(c ORDER BY 0)
+NULL
+DROP TABLE t1;
+CREATE TABLE t1 (grp INT,c CHAR);
+SET sql_buffer_result=1;
+SELECT grp,GROUP_CONCAT(c ORDER BY 2) FROM t1 GROUP BY grp;
+grp GROUP_CONCAT(c ORDER BY 2)
+DROP TABLE t1;
+#
+# Bug MDEV-28077 "Wrong create options" with "big_tables" option enabled
+#
+CREATE TABLE t1(a VARCHAR(16383) CHARACTER SET UTF32, KEY k(a));
+Warnings:
+Note 1071 Specified key was too long; max key length is 1000 bytes
+INSERT INTO t1 VALUES ('abc'), ('def'), ('FFF'), ('abc'), ('FFF');
+SET SESSION big_tables=ON;
+SELECT DISTINCT COUNT(DISTINCT a) FROM t1;
+COUNT(DISTINCT a)
+3
+PREPARE stmt FROM 'SELECT DISTINCT COUNT(DISTINCT a) FROM t1';
+EXECUTE stmt;
+COUNT(DISTINCT a)
+3
+EXECUTE stmt;
+COUNT(DISTINCT a)
+3
+DROP TABLE t1;
End of 10.0 tests
set join_cache_level=default;
set @@optimizer_switch=@save_optimizer_switch_jcl6;
diff --git a/mysql-test/main/select_pkeycache.result b/mysql-test/main/select_pkeycache.result
index 0f84ed684da..69b8a2ac544 100644
--- a/mysql-test/main/select_pkeycache.result
+++ b/mysql-test/main/select_pkeycache.result
@@ -5593,4 +5593,50 @@ select (SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@undefined));
(SELECT name FROM t1 WHERE name='tom' AND pw=PASSWORD(@undefined))
NULL
drop table t1;
+#
+# Bug MDEV-24262 Server crashes in st_join_table::cleanup upon
+# erroneous GROUP_CONCAT
+#
+CREATE TABLE t1 (a INT, b INT);
+INSERT INTO t1 VALUES (1,10),(2,20);
+SELECT b, GROUP_CONCAT(b ORDER BY 2), MIN(a) AS f FROM t1 GROUP BY b ORDER BY f;
+ERROR 42S22: Unknown column '2' in 'order clause'
+DROP TABLE t1;
+#
+# Bug MDEV-24560 SIGSEGV in st_join_table::cleanup + server and client
+# hang + cross-mysqld-interaction + double free or corruption (!prev)
+#
+CREATE TABLE t1 (c INT);
+SET SESSION sql_buffer_result=1;
+SELECT GROUP_CONCAT(c ORDER BY 2) FROM t1;
+GROUP_CONCAT(c ORDER BY 2)
+NULL
+SELECT GROUP_CONCAT(c ORDER BY 0) FROM t1;
+GROUP_CONCAT(c ORDER BY 0)
+NULL
+DROP TABLE t1;
+CREATE TABLE t1 (grp INT,c CHAR);
+SET sql_buffer_result=1;
+SELECT grp,GROUP_CONCAT(c ORDER BY 2) FROM t1 GROUP BY grp;
+grp GROUP_CONCAT(c ORDER BY 2)
+DROP TABLE t1;
+#
+# Bug MDEV-28077 "Wrong create options" with "big_tables" option enabled
+#
+CREATE TABLE t1(a VARCHAR(16383) CHARACTER SET UTF32, KEY k(a));
+Warnings:
+Note 1071 Specified key was too long; max key length is 1000 bytes
+INSERT INTO t1 VALUES ('abc'), ('def'), ('FFF'), ('abc'), ('FFF');
+SET SESSION big_tables=ON;
+SELECT DISTINCT COUNT(DISTINCT a) FROM t1;
+COUNT(DISTINCT a)
+3
+PREPARE stmt FROM 'SELECT DISTINCT COUNT(DISTINCT a) FROM t1';
+EXECUTE stmt;
+COUNT(DISTINCT a)
+3
+EXECUTE stmt;
+COUNT(DISTINCT a)
+3
+DROP TABLE t1;
End of 10.0 tests
diff --git a/mysql-test/main/show.result b/mysql-test/main/show.result
index 4a9e2738346..e453ee90c7e 100644
--- a/mysql-test/main/show.result
+++ b/mysql-test/main/show.result
@@ -53,3 +53,15 @@ drop table t1;
#
# End of 10.2 tests
#
+#
+# MDEV-28253 Mysqldump - INVISIBLE column error
+#
+create table t1 (a int, b datetime invisible on update now() without system versioning) with system versioning;
+desc t1;
+Field Type Null Key Default Extra
+a int(11) YES NULL
+b datetime YES NULL on update current_timestamp(), INVISIBLE, WITHOUT SYSTEM VERSIONING
+drop table t1;
+#
+# End of 10.3 tests
+#
diff --git a/mysql-test/main/show.test b/mysql-test/main/show.test
index 9b0b58349d5..37c30000e59 100644
--- a/mysql-test/main/show.test
+++ b/mysql-test/main/show.test
@@ -45,3 +45,14 @@ drop table t1;
--echo #
--echo # End of 10.2 tests
--echo #
+
+--echo #
+--echo # MDEV-28253 Mysqldump - INVISIBLE column error
+--echo #
+create table t1 (a int, b datetime invisible on update now() without system versioning) with system versioning;
+desc t1;
+drop table t1;
+
+--echo #
+--echo # End of 10.3 tests
+--echo #
diff --git a/mysql-test/main/show_check.result b/mysql-test/main/show_check.result
index 06277f5fe93..3498dcd13c0 100644
--- a/mysql-test/main/show_check.result
+++ b/mysql-test/main/show_check.result
@@ -987,7 +987,7 @@ def information_schema COLUMNS COLUMNS CHARACTER_SET_NAME CHARACTER_SET_NAME 253
def information_schema COLUMNS COLUMNS COLLATION_NAME COLLATION_NAME 253 96 0 Y 4096 0 33
def information_schema COLUMNS COLUMNS COLUMN_TYPE COLUMN_TYPE 252 589815 7 N 4113 0 33
def information_schema COLUMNS COLUMNS COLUMN_KEY COLUMN_KEY 253 9 3 N 4097 0 33
-def information_schema COLUMNS COLUMNS EXTRA EXTRA 253 90 0 N 4097 0 33
+def information_schema COLUMNS COLUMNS EXTRA EXTRA 253 240 0 N 4097 0 33
def information_schema COLUMNS COLUMNS PRIVILEGES PRIVILEGES 253 240 31 N 4097 0 33
def information_schema COLUMNS COLUMNS COLUMN_COMMENT COLUMN_COMMENT 253 3072 0 N 4097 0 33
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
@@ -1006,7 +1006,7 @@ def information_schema COLUMNS COLUMNS COLUMN_TYPE Type 252 589815 7 N 4113 0 33
def information_schema COLUMNS COLUMNS IS_NULLABLE Null 253 9 2 N 4097 0 33
def information_schema COLUMNS COLUMNS COLUMN_KEY Key 253 9 3 N 4097 0 33
def information_schema COLUMNS COLUMNS COLUMN_DEFAULT Default 252 589788 0 Y 4112 0 33
-def information_schema COLUMNS COLUMNS EXTRA Extra 253 90 0 N 4097 0 33
+def information_schema COLUMNS COLUMNS EXTRA Extra 253 240 0 N 4097 0 33
Field Type Null Key Default Extra
c int(11) NO PRI NULL
----------------------------------------------------------------
diff --git a/mysql-test/main/sp-i_s_columns.result b/mysql-test/main/sp-i_s_columns.result
new file mode 100644
index 00000000000..707fd76fd77
--- /dev/null
+++ b/mysql-test/main/sp-i_s_columns.result
@@ -0,0 +1,34 @@
+#
+# MDEV-28267 ASAN heap-use-after-free in Item_sp::func_name_cstring
+#
+CREATE TABLE t1 (a INT);
+CREATE FUNCTION test.f1(a INT) RETURNS TEXT RETURN '';
+CREATE FUNCTION test.f2(a INT) RETURNS TEXT RETURN '';
+CREATE VIEW v1 AS SELECT f1(a) AS v1 FROM t1;
+CREATE VIEW v2 AS SELECT f1(a) AS v2 FROM t1;
+CREATE VIEW v3 AS SELECT f1(a) AS v3 FROM t1;
+CREATE VIEW v4 AS SELECT f1(a) AS v4 FROM t1;
+BEGIN NOT ATOMIC
+FOR i IN 1..10
+DO
+ANALYZE FORMAT=JSON SELECT *
+FROM INFORMATION_SCHEMA.COLUMNS
+WHERE
+TABLE_SCHEMA='test'
+ AND
+TABLE_NAME LIKE 'v%'
+ AND
+(SLEEP(0.01)=0 OR f1(ordinal_position) >'')
+ORDER BY TABLE_NAME;
+END FOR;
+END;
+$$
+connect con1,localhost,root,,test;
+CREATE OR REPLACE FUNCTION f2(a INT) RETURNS TEXT RETURN '';
+connection default;
+disconnect con1;
+connection default;
+DROP FUNCTION f1;
+DROP FUNCTION f2;
+DROP TABLE t1;
+DROP VIEW v1, v2, v3, v4;
diff --git a/mysql-test/main/sp-i_s_columns.test b/mysql-test/main/sp-i_s_columns.test
new file mode 100644
index 00000000000..0782d06d1cc
--- /dev/null
+++ b/mysql-test/main/sp-i_s_columns.test
@@ -0,0 +1,49 @@
+--echo #
+--echo # MDEV-28267 ASAN heap-use-after-free in Item_sp::func_name_cstring
+--echo #
+
+CREATE TABLE t1 (a INT);
+CREATE FUNCTION test.f1(a INT) RETURNS TEXT RETURN '';
+CREATE FUNCTION test.f2(a INT) RETURNS TEXT RETURN '';
+CREATE VIEW v1 AS SELECT f1(a) AS v1 FROM t1;
+CREATE VIEW v2 AS SELECT f1(a) AS v2 FROM t1;
+CREATE VIEW v3 AS SELECT f1(a) AS v3 FROM t1;
+CREATE VIEW v4 AS SELECT f1(a) AS v4 FROM t1;
+
+--disable_result_log
+
+DELIMITER $$;
+--send
+BEGIN NOT ATOMIC
+ FOR i IN 1..10
+ DO
+ ANALYZE FORMAT=JSON SELECT *
+ FROM INFORMATION_SCHEMA.COLUMNS
+ WHERE
+ TABLE_SCHEMA='test'
+ AND
+ TABLE_NAME LIKE 'v%'
+ AND
+ (SLEEP(0.01)=0 OR f1(ordinal_position) >'')
+ ORDER BY TABLE_NAME;
+ END FOR;
+END;
+$$
+DELIMITER ;$$
+
+--connect (con1,localhost,root,,test)
+CREATE OR REPLACE FUNCTION f2(a INT) RETURNS TEXT RETURN '';
+--connection default
+--reap
+
+--enable_result_log
+
+
+# Cleanup
+--disconnect con1
+--connection default
+
+DROP FUNCTION f1;
+DROP FUNCTION f2;
+DROP TABLE t1;
+DROP VIEW v1, v2, v3, v4;
diff --git a/mysql-test/main/table_value_constr.result b/mysql-test/main/table_value_constr.result
index 9ce4a814dec..c8e6363c110 100644
--- a/mysql-test/main/table_value_constr.result
+++ b/mysql-test/main/table_value_constr.result
@@ -1304,8 +1304,6 @@ EXPLAIN
{
"query_block": {
"union_result": {
- "table_name": "<unit1>",
- "access_type": "ALL",
"query_specifications": [
{
"query_block": {
@@ -1525,8 +1523,6 @@ EXPLAIN
{
"query_block": {
"union_result": {
- "table_name": "<union1,2>",
- "access_type": "ALL",
"query_specifications": [
{
"query_block": {
@@ -1589,8 +1585,6 @@ EXPLAIN
{
"query_block": {
"union_result": {
- "table_name": "<union1,2>",
- "access_type": "ALL",
"query_specifications": [
{
"query_block": {
@@ -1633,8 +1627,6 @@ EXPLAIN
{
"query_block": {
"union_result": {
- "table_name": "<union1,2,3>",
- "access_type": "ALL",
"query_specifications": [
{
"query_block": {
@@ -1677,10 +1669,6 @@ ANALYZE
{
"query_block": {
"union_result": {
- "table_name": "<unit1>",
- "access_type": "ALL",
- "r_loops": 0,
- "r_rows": null,
"query_specifications": [
{
"query_block": {
@@ -1908,10 +1896,6 @@ ANALYZE
{
"query_block": {
"union_result": {
- "table_name": "<union1,2>",
- "access_type": "ALL",
- "r_loops": 0,
- "r_rows": null,
"query_specifications": [
{
"query_block": {
@@ -1976,10 +1960,6 @@ ANALYZE
{
"query_block": {
"union_result": {
- "table_name": "<union1,2>",
- "access_type": "ALL",
- "r_loops": 0,
- "r_rows": null,
"query_specifications": [
{
"query_block": {
@@ -2022,10 +2002,6 @@ ANALYZE
{
"query_block": {
"union_result": {
- "table_name": "<union1,2,3>",
- "access_type": "ALL",
- "r_loops": 0,
- "r_rows": null,
"query_specifications": [
{
"query_block": {
diff --git a/mysql-test/main/view.result b/mysql-test/main/view.result
index 15a382a687d..11686fe5bf1 100644
--- a/mysql-test/main/view.result
+++ b/mysql-test/main/view.result
@@ -6555,7 +6555,7 @@ INSERT INTO t3 VALUES (1),(8);
CREATE VIEW v1 AS SELECT * FROM t1 LEFT JOIN ( SELECT t2.* FROM t2 INNER JOIN t3 ON ( k = j ) ) AS alias1 ON ( i = j );
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 `test`.`t1`.`i` AS `i`,`alias1`.`j` AS `j` from (`test`.`t1` left join (select `test`.`t2`.`j` AS `j` from (`test`.`t2` join `test`.`t3` on(`test`.`t3`.`k` = `test`.`t2`.`j`))) `alias1` on(`test`.`t1`.`i` = `alias1`.`j`)) latin1 latin1_swedish_ci
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `t1`.`i` AS `i`,`alias1`.`j` AS `j` from (`t1` left join (select `t2`.`j` AS `j` from (`t2` join `t3` on(`t3`.`k` = `t2`.`j`))) `alias1` on(`t1`.`i` = `alias1`.`j`)) latin1 latin1_swedish_ci
SELECT * FROM t1 LEFT JOIN ( SELECT t2.* FROM t2 INNER JOIN t3 ON ( k = j ) ) AS alias1 ON ( i = j );
i j
3 NULL
@@ -6702,7 +6702,7 @@ EXECUTE stmt;
DEALLOCATE PREPARE stmt;
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 `testalias`.`testcase` AS `testcase` from (select case when 1 in (select `test`.`t1`.`a` from `test`.`t1` where `test`.`t1`.`a` < 2) then 1 end AS `testcase`) `testalias` latin1 latin1_swedish_ci
+v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select `testalias`.`testcase` AS `testcase` from (select case when 1 in (select `t1`.`a` from `t1` where `t1`.`a` < 2) then 1 end AS `testcase`) `testalias` latin1 latin1_swedish_ci
SELECT * FROM v1;
testcase
1