Bug #70836 ALTER IGNORE TABLE behavior
Submitted: 6 Nov 2013 16:02 Modified: 15 Nov 2013 18:41
Reporter: Morgan Tocker Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:5.6.14 OS:Any
Assigned to: Paul DuBois CPU Architecture:Any

[6 Nov 2013 16:02] Morgan Tocker
Description:
From: http://dev.mysql.com/doc/refman/5.6/en/alter-table.html

"IGNORE is a MySQL extension to standard SQL. It controls how ALTER TABLE works if there are duplicates on unique keys in the new table or if warnings occur when strict mode is enabled. If IGNORE is not specified, the copy is aborted and rolled back if duplicate-key errors occur. If IGNORE is specified, only the first row is used of rows with duplicates on a unique key. The other conflicting rows are deleted. Incorrect values are truncated to the closest matching acceptable value."

I wonder if we should use the wording "the first row", since SQL does not imply ordering.  InnoDB is somewhat deterministic, but I wonder if this could get users in trouble.

How to repeat:
--

Suggested fix:
"First row encountered", "picks a row" - I'm not sure.
[7 Nov 2013 19:33] Sveta Smirnova
Thank you for the report.

We certainly should explain what is "the first row" in this context.

Verified as described.
[15 Nov 2013 18:41] 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.

only the first row is used -> only one row is used