Skip to content

Commit 65e26bc

Browse files
committed
Merge branch '10.1' into 10.2
2 parents cc5f442 + d03ea82 commit 65e26bc

23 files changed

+510
-76
lines changed

client/mysql_upgrade.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
#include "client_priv.h"
2020
#include <sslopt-vars.h>
21-
#include "../scripts/mysql_fix_privilege_tables_sql.c"
21+
#include <../scripts/mysql_fix_privilege_tables_sql.c>
2222

2323
#include <welcome_copyright_notice.h> /* ORACLE_WELCOME_COPYRIGHT_NOTICE */
2424

mysql-test/include/have_not_innodb_plugin.inc

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
source include/have_innodb.inc;
2+
3+
if (!`select count(*) from information_schema.plugins
4+
where plugin_name = 'innodb' and plugin_status = 'active' and
5+
plugin_library is null`) {
6+
skip Need compiled-in InnoDB;
7+
}

mysql-test/r/blackhole.result

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,9 @@ SELECT 0 FROM t1 FORCE INDEX FOR GROUP BY(a) WHERE a = 0 OR b = 0 AND c = 0;
2424
0
2525
DROP TABLE t1;
2626
End of 5.6 tests
27+
CREATE TABLE `t` (
28+
`a` varchar(3000) NOT NULL default '',
29+
PRIMARY KEY (`a`)
30+
) ENGINE=BLACKHOLE;
31+
DROP TABLE `t`;
32+
End of 10.1 tests
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
create table t1(a int) engine=innodb;
2+
select * from t1;
3+
a
4+
1
5+
2
6+
5
7+
drop table t1;

mysql-test/r/lock_view.result

Lines changed: 231 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,231 @@
1+
create database mysqltest1;
2+
create database mysqltest2;
3+
create database mysqltest3;
4+
create user invoker@localhost;
5+
create user definer@localhost;
6+
grant select,show view on mysqltest1.* to invoker@localhost;
7+
grant select,show view on mysqltest1.* to definer@localhost;
8+
grant select,show view on mysqltest2.* to invoker@localhost;
9+
grant select,show view on mysqltest2.* to definer@localhost;
10+
grant select,show view on mysqltest3.* to invoker@localhost;
11+
grant select on performance_schema.* to definer@localhost;
12+
create table mysqltest1.t1 (a int);
13+
create definer=definer@localhost view mysqltest2.v2 as select * from mysqltest1.t1;
14+
create definer=definer@localhost view mysqltest3.v3 as select * from mysqltest2.v2;
15+
create definer=definer@localhost view mysqltest3.v3is as select schema_name from information_schema.schemata order by schema_name;
16+
create definer=definer@localhost view mysqltest3.v3ps as select user from performance_schema.users where current_connections>0 order by user;
17+
create definer=definer@localhost view mysqltest3.v3nt as select 1;
18+
create definer=definer@localhost sql security invoker view mysqltest3.v3i as select * from mysqltest1.t1;
19+
20+
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET latin1 */;
21+
22+
USE `mysqltest1`;
23+
/*!40101 SET @saved_cs_client = @@character_set_client */;
24+
/*!40101 SET character_set_client = utf8 */;
25+
CREATE TABLE `t1` (
26+
`a` int(11) DEFAULT NULL
27+
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
28+
/*!40101 SET character_set_client = @saved_cs_client */;
29+
30+
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER SET latin1 */;
31+
32+
USE `mysqltest2`;
33+
SET @saved_cs_client = @@character_set_client;
34+
SET character_set_client = utf8;
35+
/*!50001 CREATE TABLE `v2` (
36+
`a` tinyint NOT NULL
37+
) ENGINE=MyISAM */;
38+
SET character_set_client = @saved_cs_client;
39+
40+
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest3` /*!40100 DEFAULT CHARACTER SET latin1 */;
41+
42+
USE `mysqltest3`;
43+
SET @saved_cs_client = @@character_set_client;
44+
SET character_set_client = utf8;
45+
/*!50001 CREATE TABLE `v3` (
46+
`a` tinyint NOT NULL
47+
) ENGINE=MyISAM */;
48+
SET character_set_client = @saved_cs_client;
49+
SET @saved_cs_client = @@character_set_client;
50+
SET character_set_client = utf8;
51+
/*!50001 CREATE TABLE `v3i` (
52+
`a` tinyint NOT NULL
53+
) ENGINE=MyISAM */;
54+
SET character_set_client = @saved_cs_client;
55+
SET @saved_cs_client = @@character_set_client;
56+
SET character_set_client = utf8;
57+
/*!50001 CREATE TABLE `v3is` (
58+
`schema_name` tinyint NOT NULL
59+
) ENGINE=MyISAM */;
60+
SET character_set_client = @saved_cs_client;
61+
SET @saved_cs_client = @@character_set_client;
62+
SET character_set_client = utf8;
63+
/*!50001 CREATE TABLE `v3nt` (
64+
`1` tinyint NOT NULL
65+
) ENGINE=MyISAM */;
66+
SET character_set_client = @saved_cs_client;
67+
SET @saved_cs_client = @@character_set_client;
68+
SET character_set_client = utf8;
69+
/*!50001 CREATE TABLE `v3ps` (
70+
`user` tinyint NOT NULL
71+
) ENGINE=MyISAM */;
72+
SET character_set_client = @saved_cs_client;
73+
74+
USE `mysqltest1`;
75+
76+
USE `mysqltest2`;
77+
/*!50001 DROP TABLE IF EXISTS `v2`*/;
78+
/*!50001 SET @saved_cs_client = @@character_set_client */;
79+
/*!50001 SET @saved_cs_results = @@character_set_results */;
80+
/*!50001 SET @saved_col_connection = @@collation_connection */;
81+
/*!50001 SET character_set_client = latin1 */;
82+
/*!50001 SET character_set_results = latin1 */;
83+
/*!50001 SET collation_connection = latin1_swedish_ci */;
84+
/*!50001 CREATE ALGORITHM=UNDEFINED */
85+
/*!50013 DEFINER=`definer`@`localhost` SQL SECURITY DEFINER */
86+
/*!50001 VIEW `v2` AS select `mysqltest1`.`t1`.`a` AS `a` from `mysqltest1`.`t1` */;
87+
/*!50001 SET character_set_client = @saved_cs_client */;
88+
/*!50001 SET character_set_results = @saved_cs_results */;
89+
/*!50001 SET collation_connection = @saved_col_connection */;
90+
91+
USE `mysqltest3`;
92+
/*!50001 DROP TABLE IF EXISTS `v3`*/;
93+
/*!50001 SET @saved_cs_client = @@character_set_client */;
94+
/*!50001 SET @saved_cs_results = @@character_set_results */;
95+
/*!50001 SET @saved_col_connection = @@collation_connection */;
96+
/*!50001 SET character_set_client = latin1 */;
97+
/*!50001 SET character_set_results = latin1 */;
98+
/*!50001 SET collation_connection = latin1_swedish_ci */;
99+
/*!50001 CREATE ALGORITHM=UNDEFINED */
100+
/*!50013 DEFINER=`definer`@`localhost` SQL SECURITY DEFINER */
101+
/*!50001 VIEW `v3` AS select `v2`.`a` AS `a` from `mysqltest2`.`v2` */;
102+
/*!50001 SET character_set_client = @saved_cs_client */;
103+
/*!50001 SET character_set_results = @saved_cs_results */;
104+
/*!50001 SET collation_connection = @saved_col_connection */;
105+
/*!50001 DROP TABLE IF EXISTS `v3i`*/;
106+
/*!50001 SET @saved_cs_client = @@character_set_client */;
107+
/*!50001 SET @saved_cs_results = @@character_set_results */;
108+
/*!50001 SET @saved_col_connection = @@collation_connection */;
109+
/*!50001 SET character_set_client = latin1 */;
110+
/*!50001 SET character_set_results = latin1 */;
111+
/*!50001 SET collation_connection = latin1_swedish_ci */;
112+
/*!50001 CREATE ALGORITHM=UNDEFINED */
113+
/*!50013 DEFINER=`definer`@`localhost` SQL SECURITY INVOKER */
114+
/*!50001 VIEW `v3i` AS select `mysqltest1`.`t1`.`a` AS `a` from `mysqltest1`.`t1` */;
115+
/*!50001 SET character_set_client = @saved_cs_client */;
116+
/*!50001 SET character_set_results = @saved_cs_results */;
117+
/*!50001 SET collation_connection = @saved_col_connection */;
118+
/*!50001 DROP TABLE IF EXISTS `v3is`*/;
119+
/*!50001 SET @saved_cs_client = @@character_set_client */;
120+
/*!50001 SET @saved_cs_results = @@character_set_results */;
121+
/*!50001 SET @saved_col_connection = @@collation_connection */;
122+
/*!50001 SET character_set_client = latin1 */;
123+
/*!50001 SET character_set_results = latin1 */;
124+
/*!50001 SET collation_connection = latin1_swedish_ci */;
125+
/*!50001 CREATE ALGORITHM=UNDEFINED */
126+
/*!50013 DEFINER=`definer`@`localhost` SQL SECURITY DEFINER */
127+
/*!50001 VIEW `v3is` AS select `information_schema`.`schemata`.`SCHEMA_NAME` AS `schema_name` from `information_schema`.`schemata` order by `information_schema`.`schemata`.`SCHEMA_NAME` */;
128+
/*!50001 SET character_set_client = @saved_cs_client */;
129+
/*!50001 SET character_set_results = @saved_cs_results */;
130+
/*!50001 SET collation_connection = @saved_col_connection */;
131+
/*!50001 DROP TABLE IF EXISTS `v3nt`*/;
132+
/*!50001 SET @saved_cs_client = @@character_set_client */;
133+
/*!50001 SET @saved_cs_results = @@character_set_results */;
134+
/*!50001 SET @saved_col_connection = @@collation_connection */;
135+
/*!50001 SET character_set_client = latin1 */;
136+
/*!50001 SET character_set_results = latin1 */;
137+
/*!50001 SET collation_connection = latin1_swedish_ci */;
138+
/*!50001 CREATE ALGORITHM=UNDEFINED */
139+
/*!50013 DEFINER=`definer`@`localhost` SQL SECURITY DEFINER */
140+
/*!50001 VIEW `v3nt` AS select 1 AS `1` */;
141+
/*!50001 SET character_set_client = @saved_cs_client */;
142+
/*!50001 SET character_set_results = @saved_cs_results */;
143+
/*!50001 SET collation_connection = @saved_col_connection */;
144+
/*!50001 DROP TABLE IF EXISTS `v3ps`*/;
145+
/*!50001 SET @saved_cs_client = @@character_set_client */;
146+
/*!50001 SET @saved_cs_results = @@character_set_results */;
147+
/*!50001 SET @saved_col_connection = @@collation_connection */;
148+
/*!50001 SET character_set_client = latin1 */;
149+
/*!50001 SET character_set_results = latin1 */;
150+
/*!50001 SET collation_connection = latin1_swedish_ci */;
151+
/*!50001 CREATE ALGORITHM=UNDEFINED */
152+
/*!50013 DEFINER=`definer`@`localhost` SQL SECURITY DEFINER */
153+
/*!50001 VIEW `v3ps` AS select `performance_schema`.`users`.`USER` AS `user` from `performance_schema`.`users` where `performance_schema`.`users`.`CURRENT_CONNECTIONS` > 0 order by `performance_schema`.`users`.`USER` */;
154+
/*!50001 SET character_set_client = @saved_cs_client */;
155+
/*!50001 SET character_set_results = @saved_cs_results */;
156+
/*!50001 SET collation_connection = @saved_col_connection */;
157+
connect inv,localhost,invoker;
158+
lock table mysqltest3.v3 write;
159+
ERROR 42000: Access denied for user 'invoker'@'localhost' to database 'mysqltest3'
160+
disconnect inv;
161+
connection default;
162+
grant lock tables on mysqltest3.* to invoker@localhost;
163+
connect inv,localhost,invoker;
164+
show create view mysqltest3.v3;
165+
View Create View character_set_client collation_connection
166+
v3 CREATE ALGORITHM=UNDEFINED DEFINER=`definer`@`localhost` SQL SECURITY DEFINER VIEW `mysqltest3`.`v3` AS select `v2`.`a` AS `a` from `mysqltest2`.`v2` latin1 latin1_swedish_ci
167+
show create view mysqltest3.v3is;
168+
View Create View character_set_client collation_connection
169+
v3is CREATE ALGORITHM=UNDEFINED DEFINER=`definer`@`localhost` SQL SECURITY DEFINER VIEW `mysqltest3`.`v3is` AS select `information_schema`.`schemata`.`SCHEMA_NAME` AS `schema_name` from `information_schema`.`schemata` order by `information_schema`.`schemata`.`SCHEMA_NAME` latin1 latin1_swedish_ci
170+
show create view mysqltest3.v3ps;
171+
View Create View character_set_client collation_connection
172+
v3ps CREATE ALGORITHM=UNDEFINED DEFINER=`definer`@`localhost` SQL SECURITY DEFINER VIEW `mysqltest3`.`v3ps` AS select `performance_schema`.`users`.`USER` AS `user` from `performance_schema`.`users` where `performance_schema`.`users`.`CURRENT_CONNECTIONS` > 0 order by `performance_schema`.`users`.`USER` latin1 latin1_swedish_ci
173+
show create view mysqltest3.v3nt;
174+
View Create View character_set_client collation_connection
175+
v3nt CREATE ALGORITHM=UNDEFINED DEFINER=`definer`@`localhost` SQL SECURITY DEFINER VIEW `mysqltest3`.`v3nt` AS select 1 AS `1` latin1 latin1_swedish_ci
176+
show create view mysqltest3.v3i;
177+
View Create View character_set_client collation_connection
178+
v3i CREATE ALGORITHM=UNDEFINED DEFINER=`definer`@`localhost` SQL SECURITY INVOKER VIEW `mysqltest3`.`v3i` AS select `mysqltest1`.`t1`.`a` AS `a` from `mysqltest1`.`t1` latin1 latin1_swedish_ci
179+
lock table mysqltest3.v3 write;
180+
ERROR HY000: View 'mysqltest3.v3' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
181+
lock table mysqltest3.v3i write;
182+
ERROR HY000: View 'mysqltest3.v3i' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
183+
lock table mysqltest3.v3is write;
184+
select * from mysqltest3.v3is;
185+
schema_name
186+
information_schema
187+
mysqltest1
188+
mysqltest2
189+
performance_schema
190+
test
191+
lock table mysqltest3.v3ps write;
192+
select * from mysqltest3.v3ps;
193+
user
194+
NULL
195+
invoker
196+
root
197+
lock table mysqltest3.v3nt write;
198+
select * from mysqltest3.v3nt;
199+
1
200+
1
201+
disconnect inv;
202+
connection default;
203+
grant lock tables on mysqltest2.* to invoker@localhost;
204+
connect inv,localhost,invoker;
205+
lock table mysqltest3.v3 write;
206+
ERROR HY000: View 'mysqltest3.v3' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
207+
lock table mysqltest3.v3i write;
208+
ERROR HY000: View 'mysqltest3.v3i' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
209+
disconnect inv;
210+
connection default;
211+
grant lock tables on mysqltest1.* to definer@localhost;
212+
connect inv,localhost,invoker;
213+
lock table mysqltest3.v3 write;
214+
select * from mysqltest3.v3;
215+
a
216+
lock table mysqltest3.v3i write;
217+
ERROR HY000: View 'mysqltest3.v3i' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
218+
disconnect inv;
219+
connection default;
220+
grant lock tables on mysqltest1.* to invoker@localhost;
221+
connect inv,localhost,invoker;
222+
lock table mysqltest3.v3i write;
223+
select * from mysqltest3.v3i;
224+
a
225+
disconnect inv;
226+
connection default;
227+
drop user invoker@localhost;
228+
drop user definer@localhost;
229+
drop database mysqltest1;
230+
drop database mysqltest2;
231+
drop database mysqltest3;

mysql-test/r/not_true.require

Lines changed: 0 additions & 2 deletions
This file was deleted.

mysql-test/r/processlist_notembedded.result

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,16 @@ disconnect con1;
1414
connection default;
1515
SET DEBUG_SYNC = 'RESET';
1616
End of 5.5 tests
17+
#
18+
# MDEV-23752: SHOW EXPLAIN FOR thd waits for sleep
19+
#
20+
connect con1,localhost,root,,;
21+
select sleep(100000);;
22+
connection default;
23+
SHOW EXPLAIN FOR con_id;
24+
id select_type table type possible_keys key key_len ref rows Extra
25+
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used
26+
Warnings:
27+
Note 1003 select sleep(100000)
28+
KILL QUERY con_id;
29+
# End of 10.2 tests

mysql-test/suite/sys_vars/r/replicate_do_db_basic.result

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,9 @@ SET @@GLOBAL.replicate_do_db=null;
3737
SELECT @@GLOBAL.replicate_do_db;
3838
@@GLOBAL.replicate_do_db
3939

40+
SET @@GLOBAL.replicate_do_db=DEFAULT;
41+
SELECT @@GLOBAL.replicate_do_db;
42+
@@GLOBAL.replicate_do_db
43+
4044
# Cleanup.
4145
SET @@GLOBAL.replicate_do_db = @save_replicate_do_db;

mysql-test/suite/sys_vars/r/rpl_init_slave_func.result

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
include/master-slave.inc
22
[connection master]
3-
connection slave;
3+
include/sync_slave_sql_with_master.inc
44
SET @start_max_connections= @@global.max_connections;
55
SET @start_init_slave= @@global.init_slave;
66
SET NAMES utf8;
@@ -19,18 +19,12 @@ SELECT @@global.init_slave = 'SET @@global.max_connections = @@global.max_connec
1919
1
2020
Expect 1
2121
include/assert.inc [@@global.max_connections = @start_max_connections]
22-
STOP SLAVE;
23-
RESET MASTER;
24-
RESET SLAVE;
25-
START SLAVE;
26-
include/wait_for_slave_to_start.inc
22+
include/restart_slave.inc
23+
connection master;
24+
include/sync_slave_sql_with_master.inc
2725
include/assert.inc [@@global.max_connections = @start_max_connections + 1]
2826
SET @@global.init_slave = "SET @a=5";
29-
STOP SLAVE;
30-
RESET MASTER;
31-
RESET SLAVE;
32-
START SLAVE;
33-
include/wait_for_slave_to_start.inc
27+
include/restart_slave.inc
3428
SHOW VARIABLES LIKE 'init_slave';
3529
Variable_name Value
3630
init_slave SET @a=5

0 commit comments

Comments
 (0)