Bug #67366 | INSERT IGNORE INTO always returns TRUE | ||
---|---|---|---|
Submitted: | 24 Oct 2012 18:52 | Modified: | 24 Oct 2012 22:29 |
Reporter: | Dotan Cohen | Email Updates: | |
Status: | Open | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S4 (Feature request) |
Version: | 5.5 | OS: | Linux |
Assigned to: | CPU Architecture: | Any |
[24 Oct 2012 18:52]
Dotan Cohen
[24 Oct 2012 22:09]
Davi Arnaut
You can find that out by looking at the number of duplicates.
[24 Oct 2012 22:20]
Davi Arnaut
To be more specific, just compare if "Records" equals "Duplicates". That information is also available by looking at the number of affected rows. No point in introducing a new syntax for something that can be easily deduced.
[24 Oct 2012 22:29]
Dotan Cohen
Thank you Davi, I do have a working workaround for my current code. The issue tracker is certainly not a user support forum! Although there exist workarounds today, in my opinion a straightforward method done with a single query is necessary as well. In fact, I don't think that new syntax should be introduced, but rather that the existing syntax should return a FALSE equivalent (ERROR) if all records are dupes.