You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: mysql-test/main/information_schema_db.result
+5-8Lines changed: 5 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -213,11 +213,8 @@ connection default;
213
213
use test;
214
214
drop view testdb_1.v1, v2, testdb_1.v3, v4;
215
215
drop database testdb_1;
216
-
connection testdb_1;
217
216
disconnect testdb_1;
218
-
connection testdb_2;
219
217
disconnect testdb_2;
220
-
connection default;
221
218
drop user testdb_1@localhost;
222
219
drop user testdb_2@localhost;
223
220
#
@@ -249,18 +246,18 @@ ERROR 42000: SELECT command denied to user 'mysqltest_1'@'localhost' for table `
249
246
connection default;
250
247
drop user mysqltest_1@localhost;
251
248
drop database testdb_1;
252
-
connection user1;
253
249
disconnect user1;
254
-
connection default;
255
250
set global sql_mode=default;
256
251
#
257
252
# MDEV-20549 SQL SECURITY DEFINER does not work for INFORMATION_SCHEMA tables
258
253
#
259
254
create user foo@localhost;
260
255
grant select on test.* to foo@localhost;
256
+
connect foo,localhost,foo;
257
+
connection default;
261
258
create procedure rootonly() select 1;
262
-
create sql security definer view v1d as select current_user(),user from information_schema.processlist where command!='daemon';
263
-
create sql security invoker view v1i as select current_user(),user from information_schema.processlist where command!='daemon';
259
+
create sql security definer view v1d as select current_user(),user from information_schema.processlist where id in($default_id, $foo_id) order by user;
260
+
create sql security invoker view v1i as select current_user(),user from information_schema.processlist where id in($default_id, $foo_id) order by user;
264
261
create sql security definer view v2d as select table_name from information_schema.tables where table_schema='mysql' and table_name like '%user%';
265
262
create sql security invoker view v2i as select table_name from information_schema.tables where table_schema='mysql' and table_name like '%user%';
266
263
create sql security definer view v3d as select schema_name from information_schema.schemata where schema_name like '%mysql%';
@@ -269,7 +266,7 @@ create sql security definer view v4d as select routine_name from information_sch
269
266
create sql security invoker view v4i as select routine_name from information_schema.routines where routine_schema='test';
270
267
create sql security definer view v5d as select view_definition > '' from information_schema.views where table_name='v1d';
271
268
create sql security invoker view v5i as select view_definition > '' from information_schema.views where table_name='v1d';
Copy file name to clipboardExpand all lines: mysql-test/main/information_schema_db.test
+7-11Lines changed: 7 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -207,13 +207,8 @@ connection default;
207
207
use test;
208
208
drop view testdb_1.v1, v2, testdb_1.v3, v4;
209
209
drop database testdb_1;
210
-
connection testdb_1;
211
210
disconnect testdb_1;
212
-
--source include/wait_until_disconnected.inc
213
-
connection testdb_2;
214
211
disconnect testdb_2;
215
-
--source include/wait_until_disconnected.inc
216
-
connection default;
217
212
drop user testdb_1@localhost;
218
213
drop user testdb_2@localhost;
219
214
@@ -244,10 +239,7 @@ show create view testdb_1.v1;
244
239
connection default;
245
240
drop user mysqltest_1@localhost;
246
241
drop database testdb_1;
247
-
connection user1;
248
242
disconnect user1;
249
-
--source include/wait_until_disconnected.inc
250
-
connection default;
251
243
252
244
set global sql_mode=default;
253
245
@@ -257,9 +249,13 @@ set global sql_mode=default;
257
249
258
250
create user foo@localhost;
259
251
grant select on test.* to foo@localhost;
252
+
let $default_id= `select connection_id()`;
253
+
connect foo,localhost,foo;
254
+
let $foo_id= `select connection_id()`;
255
+
connection default;
260
256
create procedure rootonly() select 1;
261
-
create sql security definer view v1d as select current_user(),user from information_schema.processlist where command!='daemon';
262
-
create sql security invoker view v1i as select current_user(),user from information_schema.processlist where command!='daemon';
257
+
evalp create sql security definer view v1d as select current_user(),user from information_schema.processlist where id in($default_id, $foo_id) order by user;
258
+
evalp create sql security invoker view v1i as select current_user(),user from information_schema.processlist where id in($default_id, $foo_id) order by user;
263
259
create sql security definer view v2d as select table_name from information_schema.tables where table_schema='mysql' and table_name like '%user%';
264
260
create sql security invoker view v2i as select table_name from information_schema.tables where table_schema='mysql' and table_name like '%user%';
265
261
create sql security definer view v3d as select schema_name from information_schema.schemata where schema_name like '%mysql%';
@@ -268,7 +264,7 @@ create sql security definer view v4d as select routine_name from information_sch
268
264
create sql security invoker view v4i as select routine_name from information_schema.routines where routine_schema='test';
269
265
create sql security definer view v5d as select view_definition > '' from information_schema.views where table_name='v1d';
270
266
create sql security invoker view v5i as select view_definition > '' from information_schema.views where table_name='v1d';
0 commit comments