I have a database, say
abc, in mysql server. It has only one table named
test uses innodb engine and I've set
innodb_file_per_table to true.
After I run the query
delete from abc.test, I want to calculate the database size of
abc. Here is the query I use:
SELECT table_schema "name", sum( IF(engine = "MyISAM", data_length + index_length - data_free, data_length + index_length)) "size" FROM information_schema.TABLES where table_schema like "abc";
The strange thing is that I find the database size doesn't decrease at all, however the data in "test" is gone.
I've done this kind of test many times, this strange behavior happens sometimes.
percona mysql server 5.5.29-rel29.4.
Can anybody tell me what is wrong?
Actually, I use another thread to check the database size periodically.