May 25, 2012

Post: How FLUSH TABLES WITH READ LOCK works with Innodb Tables

… others use FLUSH TABLES WITH READ LOCK to temporary make MySQL read only. In many cases the period for which server has to be made read only is… of MySQL 5.5 FLUSH TABLES WITH READ LOCK does not work as optimally as you could think it works. Even though with general lock compatibility guidelines Read Lock should…

Comment: How FLUSH TABLES WITH READ LOCK works with Innodb Tables

… under FLUSH TABLES WITH READ LOCK (I believe it should work even without that). We are using CentOS 5.x, LVM2, XFS and Oracle MySQL 5… we have been experiencing this with many versions of MySQL. We are now using ‘service mysql stop’ instead of FLUSH TABLES WITH READ LOCK to get reliable snapshots…

Comment: How FLUSH TABLES WITH READ LOCK works with Innodb Tables

Even killing FLUSH TABLES WITH READ LOCK won’t resolve the deadlock as of MySQL 5.5 – other queries will still be stuck in ‘Waiting for table flush‘ even after the FLUSH TABLES WITH READ LOCK goes away. :( http://bugs.mysql.com/bug.php?id=44884

Comment: How FLUSH TABLES WITH READ LOCK works with Innodb Tables

…/no-more-mysql-crash-safe-replication-in-50/ We have fixed it in Percona Server. Also if you’re doing FLUSH TABLES WITH READ LOCK anyway…

Post: How fast is FLUSH TABLES WITH READ LOCK?

… to chat with them about their MySQL backup product. One of the representatives told me that their backup product uses FLUSH TABLES WITH READ LOCK, which he admitted takes a global lock

Post: Hacking to make ALTER TABLE online for certain changes

… auto_increment, (2) flush tables with read lock, (3) swap .frm files while keeping mysql suspended and (4) unlock the tables afterwards: — 1. mysql> CREATE TABLE `huge_table_new` ( -> `id…) — 2. mysql> FLUSH TABLES WITH READ LOCK; Query OK, 0 rows affected (0.00 sec) — 3. mysql> ^Z [1]+ Stopped mysql test # mv huge_table.frm huge_table_old.frm…

Post: SHOW OPEN TABLES - what is in your table cache

… OPEN TABLES and flush only open tables, when run it again and see how many tables are open and in use and if FLUSH TABLES WITH READ LOCK can… given table (so you can see what tables are candidates for replacement) and the timestamp when this table was locked (or lock wait started) – MySQL anyway…

Post: Using LVM for MySQL Backup and Replication Setup

… to perform backup of MySQL Database (or create slave) using LVM2 on Linux. 1) Connect to MySQL and run FLUSH TABLES WITH READ LOCK Note – this command may take a while to complete if you have long running queries. The catch here is FLUSH TABLES WITH READ LOCK

Comment: Using LVM for MySQL Backup and Replication Setup

…—- 1 mysql mysql 956920476 Aug 16 00:23 mysql-bin.000156 /data/dev/mysql# mysql < FLUSH TABLES WITH READ LOCK; > SHOW MASTER STATUS; > \! ls -lart mysql-bin*|tail -n1 > UNLOCK TABLES; > MYSQL File…—- 1 mysql mysql 957115478 Aug 16 00:23 mysql-bin.000156 /data/dev/mysql# mysql < FLUSH TABLES WITH READ LOCK; > SHOW MASTER STATUS; > \! ls -lart mysql-bin*|tail -n1 > UNLOCK TABLES; > MYSQL File…

Post: 10 things you need to know about backup solutions for MySQL

… files? Does the backup use FLUSH TABLES, LOCK TABLES, or FLUSH TABLES WITH READ LOCK? These all interrupt processing. What other effects are there on MySQL? I’ve seen systems that do a RESET MASTER, which immediately breaks replication. Are there any FLUSH commands at all, like FLUSH