Current time: 12-24-2024, 05:20 AM Hello There, Guest! (LoginRegister)


Post Reply 
[SOLVED] MySQL on external server - no quota?
Author Message
FeG Offline
Banned

Posts: 222
Joined: Aug 2007
Post: #17
RE: MySQL on external server - no quota?
Hi,

(10-11-2008 02:20 AM)sci2tech Wrote:  The idea is good but the the result is not accurate. This method does not add size of .frm (than contain structure of table or output from a Create view commands) file witch usually is ~8k for each table in first case.

In fact, the method mysqldb_quota_by_dir_engine doesn't count the .frm files either. The differences are only caused by the db.opt file and the directory itself.
If you run this command:
Code:
du -csb --exclude=*.frm --exclude=db.opt /var/lib/mysql/DATABASE/* | tail -1

the calculated space will be the same as the output of the method mysqldb_quota_by_mysql_engine, which can be simulated on a shell like this:
Code:
echo "SHOW TABLE STATUS;" | mysql DATABASE | awk '{ sum += $7 + $9 } END { print sum }'

So I'd suppose to instead modify mysqldb_quota_by_dir_engine so that it ignores the size of db.opt and the directory by using the du - command shown above. In my opinion this is the right solution since the user doesn't really uses the size of db.opt and the directory itself with it's mysql db - so it would be correct to not count it.

I've just apploaded a third ( Wink ) patch, which makes (besides the other changes) the two methods counting the same, as I've described above...

Regards
FeG
10-11-2008 06:10 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
RE: MySQL on external server - no quota? - FeG - 10-11-2008 06:10 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)