Hello.

On Thu, May 30, 2002 at 10:52:46PM +0100, [EMAIL PROTECTED] wrote:
> Hi,
> 
> (FYI: "mysql Ver 11.13 Distrib 3.23.36, for redhat-linux-gnu (i386)")

3.23.36 is a bit outdated by now (more than a year old) and there have
been several bug fixes regarding GRANT/REVOKE since then. So you may
consider upgrading and check if you find the problems still reproducable.

> After extensive testing, I have found that: -
> 
> (a) [SIDE ISSUE]
>     Logged-in as a user (using password) and modifying privileges in
>     another MySQL (root) session, even with "flush privileges", the
>     privileges do not reliably update in all cases. Not all
>     combinations of GRANT / REVOKE completely without sometimes
>     needing a flush privileges, even in a single (root) session.

That is a bit too vague to be useful. Can you provide a repeatable
test case?

You know that the privileges have different points when they are
evaluated again? See http://www.mysql.com/doc/P/r/Privilege_changes.html.

> (b) [MAIN ISSUE]
>     One might expect a statement such as the following type of
>     statement: SELECT fields INTO OUTFILE "/tmp/j" FROM tbl; to
>     require the FILE privilege (global) and the SELECT privilege on
>     _just_ the affected table. Not true. In my tests, I had to grant
>     the SELECT privilege on the entire (affected) database instead.

I cannot reproduce the problem you described on 3.23.46:

mysql> SELECT VERSION();
+-------------+
| VERSION()   |
+-------------+
| 3.23.46-log |
+-------------+
mysql> GRANT FILE ON *.* TO philemon@localhost;
Query OK, 0 rows affected (0.09 sec)
mysql> SELECT * FROM user WHERE user='philemon' AND host='localhost' \G
*************************** 1. row ***************************
           Host: localhost
           User: philemon
       password: <...>
    Select_priv: N
    Insert_priv: N
    Update_priv: N
    Delete_priv: N
    Create_priv: N
      Drop_priv: N
    Reload_priv: N
  Shutdown_priv: N
   Process_priv: N
      File_priv: Y
     Grant_priv: N
References_priv: N
     Index_priv: N
     Alter_priv: N
1 row in set (0.00 sec)
mysql> SELECT * FROM db WHERE db='yasg' AND user='philemon' \G
*************************** 1. row ***************************
           Host: 
             Db: yasg
           User: philemon
    Select_priv: Y
    Insert_priv: Y
    Update_priv: Y
    Delete_priv: Y
    Create_priv: N
      Drop_priv: N
     Grant_priv: N
References_priv: N
     Index_priv: N
     Alter_priv: N
1 row in set (0.00 sec)

shell> mysql -uphilemon yasg
[...]
mysql> SELECT gid INTO OUTFILE "/tmp/test" FROM config WHERE gid < 100;
Query OK, 37 rows affected (0.02 sec)

> Hope this helps. (Anyone know any more?)
> 
> 
> Note, from changelog, I cannot find a fix for this problem. Having
> searched for "outfile" and "privilege", I have found only the
> following vaguely related (but not relevant!) fix: -
>   (Release 3.23.25) - Fixed privilege checking for CHECK TABLE.

Well, sometimes bugs have side-effects which are not obvious by the
description in the change history. There have been several fixes to
the handling of files and to the privilege system. So IMHO 3.23.36 is
not an appropriate version for discussing issues with these and you
should either upgrade or provide repeatable test cases (as I have done
for you in one case), so that others with newer versions can verify it
against their systems.

Bye,

        Benjamin.

-- 
[EMAIL PROTECTED]

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to