Bug #64309 mysqldump --disable-keys
Submitted: 13 Feb 2012 11:34 Modified: 7 Mar 2012 2:54
Reporter: Peter Laursen (Basic Quality Contributor) Email Updates:
Status: Closed Impact on me:
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:any OS:Any
Assigned to: Paul Dubois CPU Architecture:Any
Tags: qc

[13 Feb 2012 11:34] Peter Laursen

"--disable-keys, -K 

 For each table, surround the INSERT statements with /*!40000 ALTER TABLE tbl_name DISABLE KEYS */; and /*!40000 ALTER TABLE tbl_name ENABLE KEYS */; statements. This makes loading the dump file faster because the indexes are created after all rows are inserted. This option is effective only for nonunique indexes of MyISAM tables."

I find the statement above ambiguous as regards non-MyISAM tables. It can either be understood as

"This option is effective only for nonunique indexes of MyISAM tables and has no effect on tables using non-MyISAM engines"


"This option is effective only for nonunique indexes of MyISAM tables. With InnoDB it has effect for all indexes".

(and what about other engines than the two like MEMORY)

How to repeat:
see above 

Suggested fix:
[13 Feb 2012 12:57] Valeriy Kravchuk
Thank you for the documentation request.
[13 Feb 2012 15:01] Paul Dubois
Hi Peter. I don't understand. How does "X applies only to Y" mean "X applies only to Y, but it might also apply to Z"?

"X applies only to Y" means "only to Y".
[13 Feb 2012 15:31] Peter Laursen
I will try! :)

How does the option then have with "Z" (InnoDB). I am able to read the statement both ways and after reading it I am actually uncertain how the option affects InnoDB tables.

It is a plain language matter.  Nothing particularly technical. Compare: "Kids eat milk chocolate only".  Well -- they don't eat dark chocolate - that is obvious from the statement, but do they also eat winegum? It would be better to frame it like "the only chocolate eaten by kids is milk chocolate".
[13 Feb 2012 16:14] Peter Laursen
Let me add that when you read docs statements it hould be easy to *negate* the statement. Something is happening due to some setting. OK. But what is *not* happening and *where is it not* happening. That is equally important to understand.

Negation of the statement "This  option is effective only for nonunique indexes of MyISAM tables." is difficult because it already contains two negations (*ONLY FOR* and *NON*-unique). The abilty of my brain to build a negation of such already heavily negated statements is insufficient and I am uncertain if I should understand:
1) No indexes (unique or non-unique) have the same problem with tables using other engines similar to what non-unique indexes of MyISAM have with this option
2) The option has no effect at all with non-MyISAM tables.

Now Valeriy approved this, so I think he saw some ambiguity too.  He usually does not approve my reports here just in order to be kind and welcoming (google translation - sorry if it is not fully covering Danish 'imødekommende').
[14 Feb 2012 18:13] Paul Dubois
So let me try some alternative formulations.

This option applies to nonunique indexes of MyISAM tables.

This option applies only to MyISAM tables, and only for nonunique indexes.
[7 Mar 2012 2:54] Paul Dubois
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.

This option is effective only for nonunique indexes of MyISAM tables.
It has no effect for other tables.