Privet!


User with similar privileges successfully drops table on my MySQL 5.0.7:



mysql> drop table acc_tmp;

Query OK, 0 rows affected (0.01 sec)



mysql> show grants for current_user;

+-----------------------------------------------------------------------------+

| Grants for [EMAIL PROTECTED]

|

+-----------------------------------------------------------------------------+

| GRANT USAGE ON *.* TO 'info'@'localhost'

|

| GRANT SELECT ON `blg`.* TO 'info'@'localhost'

|

| GRANT INSERT, DELETE, CREATE, DROP ON `blg`.`acc_tmp` TO

'info'@'localhost' |

+-----------------------------------------------------------------------------+

3 rows in set (0.00 sec)



mysql> select database();

+------------+

| database() |

+------------+

| blg        |

+------------+

1 row in set (0.00 sec)





Your 4.0.13 version is very old and could contain bugs. Check if problem

exists on the latest release (4.1.12 or if you unable to use 4.1 - on

4.0.25).













Kaplenko Vitalij <[EMAIL PROTECTED]> wrote:

> Hi everyone,

> 

> My environment:

> - Linux 2.6.7-1.7asp #1 Thu Jul 15 17:36:07 YEKST 2004 i686 i386 GNU/Linux

> - server version: 4.0.13

> 

> I wrote a script-SQL like this:

> 

> #Begin of script-SQL

> ...

> DATA_BEGIN=$1

> DATA_END=$2

> TIME_BEGIN=$3

> TIME_END=$4

> USER_NAME=$5

> PRICE=$6

> 

> CUR_TABLE=acc_cur

> TMP_TABLE=acc_tmp

> 

> mysql -h 198.168.68.1 -u info blg <<TTT2

> 

>        DROP TABLE IF EXISTS $TMP_TABLE;

>        CREATE TABLE $TMP_TABLE SELECT cur_date,cur_time,traffic FROM 

> $CUR_TABLE LIMIT 1;

>        DELETE FROM $TMP_TABLE;

> 

>        INSERT INTO $TMP_TABLE

>        SELECT cur_date,cur_time,count(*)

>        FROM $CUR_TABLE

>        WHERE user_name = '$USER_NAME'

>                AND cur_date >= '$DATA_BEGIN'

>                AND cur_date < '$DATA_END'

>                AND cur_time >= '$TIME_BEGIN'

>                AND cur_time <= '$TIME_END'

>        GROUP BY cur_date,cur_time;

> 

>        SELECT (count(*)*($PRICE)/60)

>        FROM $TMP_TABLE;

> 

>        DROP TABLE $TMP_TABLE;

> 

> TTT2

> #End of script-SQL

> 

> When I grant privileges for user 'info' like this:

> +----------------------------------------------------------------------------------------------------------+

> | Grants for 

> [EMAIL PROTECTED]/255.255.255.0                                               
>                 

> |

> +----------------------------------------------------------------------------------------------------------+

> | GRANT SHOW DATABASES, CREATE TEMPORARY TABLES, LOCK TABLES ON *.* TO 

> 'info'@'198.168.68.0/255.255.255.0' |

> | GRANT SELECT, INSERT, DELETE, CREATE, DROP ON `blg`.* TO 

> 'info'@'198.168.68.0/255.255.255.0'             |

> +----------------------------------------------------------------------------------------------------------+

> 

> The script-SQL, printed above, execute Ok.

> 

> When I grant privileges for user 'info' like this:

> +----------------------------------------------------------------------------------------------+

> | Grants for 

> [EMAIL PROTECTED]/255.255.255.0                                               
>     

> |

> +----------------------------------------------------------------------------------------------+

> | GRANT USAGE ON *.* TO 

> 'info'@'198.168.68.0/255.255.255.0'                                    |

> | GRANT SELECT ON `blg`.* TO 

> 'info'@'198.168.68.0/255.255.255.0'                               |

> | GRANT INSERT, DELETE, CREATE, DROP ON `blg`.`acc_tmp` TO 

> 'info'@'198.168.68.0/255.255.255.0' |

> +----------------------------------------------------------------------------------------------+

> When I tried to execute the script-SQL, I get error:

> ERROR 1142 (00000) at line 2: drop command denied to user: 

> '[EMAIL PROTECTED]' for table 'acc_tmp'

> 

> Help me, pls.

> 

> Many thanks

> 

> Vitalij

> 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
       <___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to