Roland Bouman wrote:
Hi!

On Fri, Dec 26, 2008 at 8:54 PM, Ann W. Harrison <[email protected]> wrote:
The thing about this whole discussion that people seem to miss is that you
have to choose to use the IGNORE keyword.  We are not talking about default
behavior.  If you use the IGNORE keyword, you are accepting responsibility
for what happens.
What I thought we were discussing was which errors IGNORE ignores.
If it ignores totally duplicate records, that's one thing.  If it

I thought that in this thread, the whole IGNORE thing was introduced
by Jay on december 22 when he said

"
Can we just stick to throwing warnings where the standard says to do
so, and errors likewise?

**IMPORTANT**:

This would likely mean the dropping of the IGNORE keyword from
Drizzle's SQL syntax.
"

I interpreted this as "If drizzle's error/warning policy would conform
(more to) standard SQL, maybe this means the IGNORE syntax needs to
go". I think Jay incuded the IGNORE case in this thread to discuss
whether throwing a warning when ignoring a row is in any way
compatible with a more standard warning/error behaviour.

(Jay, is this indeed why you brought up IGNORE in this thread?)

Partly. The following piece of the MySQL manual regarding the IGNORE keyword is what I had in mind:

http://dev.mysql.com/doc/refman/5.1/en/insert.html

"Data conversions that would trigger errors abort the statement if IGNORE is not specified. With IGNORE, invalid values are adjusted to the closest values and inserted; warnings are produced but the statement does not abort. You can determine with the mysql_info() C API function how many rows were actually inserted into the table."

In my mind, Drizzle should absolutely NOT behave in the above way. I don't mind the suggestion of ON DUPLICATE KEY IGNORE and even more, I like the ON CONFLICT clause because IMHO it is more explicit about *what* you are ignoring. Explicit is better!

But I do *not* like the documented MySQL behaviour of IGNORE:

"invalid values are adjusted to the closest values and inserted; warnings are produced but the statement does not abort"

This, IMHO, is wrong.

Cheers from sunny Marco Island, Florida :)

Jay

_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to