Bug #18474 Unlistable directories yield no info from information_schema, part2
Submitted: 23 Mar 2006 22:05 Modified: 17 Jan 2014 15:25
Reporter: Magnus Blåudd Email Updates:
Status: Won't fix Impact on me:
None 
Category:MySQL Server: Information schema Severity:S3 (Non-critical)
Version:5.0.20 OS:Windows (Windows)
Assigned to: Magnus Blåudd CPU Architecture:Any

[23 Mar 2006 22:05] Magnus Blåudd
Description:
If a subdirectory (database) in the MySQL data directory doesn't allow for
reading ("r" flag) for the user that the MySQL server runs as, listing metadata
from the information_schema database fails instead of showing what
it can show about the other databases.

This is the same problem as bug#15851 except it occurs only on windows. There is a separate implementation for 'my_dir' for windows and it has not been fixed to behave like the default version.

How to repeat:
#
# Bug #15851 Unlistable directories yield no info from information_schema
#
create database mysqltest;
create table mysqltest.t1(a int);
--exec chmod -r $MYSQLTEST_VARDIR/master-data/mysqltest
select table_schema from information_schema.tables where table_schema='mysqltest';
--exec chmod +r $MYSQLTEST_VARDIR/master-data/mysqltest
drop database mysqltest;

Suggested fix:
Make 'my_dir' skip the directory and return that there was 0 files to read.
[23 Mar 2006 22:11] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/4096
[6 Apr 2006 9:54] Magnus Blåudd
Pushed a fix to 5.0.21 and 5.0.8(last week) that makes unlistable directories be skipped by the windows version of my_dir(in the same way as the unix/linux version does)
[10 Apr 2006 13:19] Magnus Blåudd
Not working in 5.0 yet
[11 Apr 2006 13:41] Magnus Blåudd
The code to return skip any unlistable directories have been implemented for function 'my_dir' in mysys/my_lib.c 

It works fine on WinXP but on our build host with Windows 2003 it's not possible to chmod the mysqltest database directory to that it's not pssoble to list with the 'find_files' function. So the problem tat we can "see" one more directory than there should be is not fatal in any way.

Thus the testcase for bug#15851 that shows this problem has been disabled.
[11 Apr 2006 18:41] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/4813
[12 Apr 2006 8:16] Magnus Blåudd
Pushed a patch only affecting windows to 5.0.21
[4 May 2006 15:47] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/5958
[17 Jan 2014 15:25] Georgi Kodinov
We're not using nor recommending cygwin anymore. 
Please stick to the Windows OS utilities.
And reopen the bug if there's demonstrable problem with how MySQL is handling manual permissions alteration.