We were using replication to deal with certain queries that were producing table scans. I realize this is not a great long term solution but we were migrating a web site that was set up this way, so it wasn’t really a choice.
We had a database that was a mix of InnoDB and a few MyISAM tables. The MyISAM tables were used for fulltext searches.
To get a database dump, we were using the command
mysqldump --all-databases --single-transaction
--master-data=1 > dumpfile.sql
We’d then import the dump into a DB slave. When we’d bring a slave up and reply the log, we’d get a duplicate key error. After a few times, we noticed it was always on the MyISAM table. This is because MyISAM does not use transactions, and –single-transaction does not place a read lock on tables. Data can be inserted into the table during the backup but before that table is dumped.
In conclusion, if you’re using …
[Read more]