Sat Nov 17 18:32:45 CET 2007

MySQL, InnoDB and replications

I had a lot of fun yesterday. I wanted to optimize the InnoDB storage in one of my projects. I realized that the innodb_data_file_path MySQL parameter doesn't allow you to specify the very simple case: whenever you need a new innodb datafile, add it, but limit its size to e.g. 1GB. The only method to do so is to periodically monitor the file size of the last (autoextending) data file. Another method is to pre-define several 1GB files and keep the last one as e.g. 10MB and autoextending and monitor its size. It would be nice to have this possibility.

But that was not fun. The real fun was when I realised that the described method to start replication with empty master and slave can't work as described, because the databases test and test_% are special in mysql database. This caused me two hours of debugging to realize that the bug is in the manual describing something that can't work by design ;-) But when I realized it, the complete process took me 5 minutes.

Posted by Pavel | Permanent link | File under: Work