mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Fix for bug#15851 Unlistable directories yield no info from information_schema
to skip directories which are not allowed for read
mysql-test/r/information_schema.result:
Fix for bug#15851 Unlistable directories yield no info from information_schema
test result
mysql-test/t/information_schema.test:
Fix for bug#15851 Unlistable directories yield no info from information_schema
test case
This commit is contained in:
@@ -1084,3 +1084,8 @@ DROP TABLE t1;
|
||||
DROP VIEW v1;
|
||||
DROP FUNCTION func1;
|
||||
DROP FUNCTION func2;
|
||||
create database mysqltest;
|
||||
create table mysqltest.t1(a int);
|
||||
select table_schema from information_schema.tables where table_schema='mysqltest';
|
||||
table_schema
|
||||
drop database mysqltest;
|
||||
|
||||
@@ -790,3 +790,13 @@ DROP TABLE t1;
|
||||
DROP VIEW v1;
|
||||
DROP FUNCTION func1;
|
||||
DROP FUNCTION func2;
|
||||
|
||||
#
|
||||
# Bug #15851 Unlistable directories yield no info from information_schema
|
||||
#
|
||||
create database mysqltest;
|
||||
create table mysqltest.t1(a int);
|
||||
--exec chmod -r $MYSQL_TEST_DIR/var/master-data/mysqltest
|
||||
select table_schema from information_schema.tables where table_schema='mysqltest';
|
||||
--exec chmod +r $MYSQL_TEST_DIR/var/master-data/mysqltest
|
||||
drop database mysqltest;
|
||||
|
||||
@@ -170,6 +170,8 @@ MY_DIR *my_dir(const char *path, myf MyFlags)
|
||||
bzero(finfo.mystat, sizeof(MY_STAT));
|
||||
VOID(strmov(tmp_file,dp->d_name));
|
||||
VOID(my_stat(tmp_path, finfo.mystat, MyFlags));
|
||||
if (!(finfo.mystat->st_mode & MY_S_IREAD))
|
||||
continue;
|
||||
}
|
||||
else
|
||||
finfo.mystat= NULL;
|
||||
|
||||
Reference in New Issue
Block a user