GAM
GAM

Reputation: 19

mysqldump locking tables despite --skip-lock-tables & --single-transaction options set

I'm trying to generate a dump of a database comprised of innodb tables.

Having dutifully read the mysqldump section of the relevant (5.6) manual, I used the --skip-lock-tables and --single-transaction options. When I look at the resulting dump file I see "LOCK TABLES" & "UNLOCK TABLES" around the INSERT statements for each table in the database.

--single-transaction on its own produces the same result.

Does anyone have an idea as to why mysqldump is seemingly ignoring these options?

I take it that the LOCK TABLES & UNLOCK TABLES should not be appearing with one or both of these options.

Upvotes: 1

Views: 5289

Answers (1)

sphakka
sphakka

Reputation: 506

Mmh, you have dutifully but maybe not thoroughly read man mysqldump (or the manual section you mention is incomplete) ;-) Else you'd know that you need to add --skip-add-locks to your mysqldump command.

Upvotes: 4

Related Questions