I use this command to "lock" my database, flush logs , take a LVM snapshot and release it.
Testing the recover + binlogs , appear it's not working.
(I discovery this when during the recover, applying the binlogs give error of duplicate key where supose not should exists at that moment)
The behave I get is the data files still be writting after the flush. So , what's wrong here? I miss something?
# echo "FLUSH TABLES WITH READ LOCK ; flush logs" | mysql -vvv
--------------
FLUSH TABLES WITH READ LOCK
--------------
Query OK, 0 rows affected (0.00 sec)
# mysql --version
mysql Ver 14.14 Distrib 5.6.25, for Linux (x86_64) using EditLine wrapper
I not sure , but after flush with read lock , if I connect to any database and try create a table, it's should lock and wait until the UNLOCK , don't ?
This isn't happen, it create the table successfully.
EDIT
I found a documentation where say to run SET GLOBAL read_only = ON
after the flush and SET GLOBAL read_only = OFF
.
All other suggestions, blogs, tutorials, manuals don't mention this is needed.
More doubts!!!
EDIT 2
Insert and updates still working too...