![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi all, I have a question regarding the logical backup of MySQL databases that use both MyISAM and InnoDB. The mysqldump utility supports these two options: --single-transaction - Creates a consistent snapshot by dumping all tables in a single transaction. Works ONLY for tables stored in storage engines which support multiversioning (currently only InnoDB does) [...] Option automatically turns off --lock-tables. -x, --lock-all-tables - Locks all tables across all databases. This is achieved by taking a global read lock for the duration of the whole dump. Automatically turns --single-transaction and --lock-tables off. For InnoDB we need --single-transaction, for MyISAM - lock-tables or lock-all-tables (in case we need cross-database cosistency). So how a _hybrid_ database (a database that uses both MyISAM and InnoDB engines) is supposed to be backed up? |
#3
| |||
| |||
|
|
Just to clarify, the question could be reformulated like this: Do the lock-[all-]tables option guarantee a consistent backup of InnoDB tables? |
#4
| |||
| |||
|
|
"Radoulov, Dimitre"<cichomitiko (AT) gmail (DOT) com> wrote: ... Just to clarify, the question could be reformulated like this: Do the lock-[all-]tables option guarantee a consistent backup of InnoDB tables? Yes. But of course the global lock will cause writes to queue up, so anybody tries to avoid it. I.e. by using InnoDB tables and then mysqldump --single-transaction |
![]() |
| Thread Tools | |
| Display Modes | |
| |