On 06.02.2005 05:26 (+0100), Mark Webber wrote:
What version of Windows? XP and Windows 2000, 2003 have built-in Quota functions if you are using NTFS. Right click on the drive, choose properties, click on the Quota tab.

That won't help him, and he know I think.

It won't work because the quota is based on the volume not per folder.


My idea is still to create a little script that revokes INSERT and
UPDATE rights from the user if the database (or whatever unit you want
to check) exceeds the maximum allowed size and grant these rights again
if the size is below maximum. This script (PHP or Perl should be OK,
both are free for all platforms) can be run by the OS scheduler (Linux
cron or Windows task scheduler). If you need some PHP code for that, let
me know. It won't give you a perfect protection but I believe this is OK
for everyday use.

It needs to be real time. Someone can run an insert in an infinite loop and basically fill up the partition and this will affect all the databases in that paritition which means no more inserts for any database anymore. This is troublesome.


That script needs to be run pretty often and do the revoke before the partition fill up, and if you have hundreds of databases, it will need to run against all these databases. I am not sure if this check is cpu/time consuming or fast. I also use MS SQL Server which can limit database size and I am dissapointed that MySQL can't.

Salama



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



Reply via email to