Hi Roland,

On 17/12/2008, at 9:25 AM, Roland Bouman wrote:
On Tue, Dec 16, 2008 at 11:56 PM, Arjen Lentz <[email protected]> wrote:
Ostensibly, the above behaviour was designed so that LOAD DATA and other multi-row or batch operations would continue if a NULL value was inserted
into a NOT NULL column.

I think this is the key issue, this behaviour was designed to deal with a
non-transactional environment.
Since Drizzle is getting rid of that architecture, the reason-to-be for this
behaviour has disappeared also.

I fail to see how this has got anything at all to do with
transactions. I mean, NOT NULL is a constraint - no more, no less.

LOAD DATA INFILE does fail on a UNIQUE constraint, possibly aborting
the remainder of the work. Why should a NOT NULL constraint be treated
differently?

Yes the UNIQUE constraint example is one of those nasty situations that you can get in to, for absolute consistency mysql perhaps should have always assumed IGNORE and kept going with warnings. But it doesn't, so there ya go. But at least it's predictable. The key to all the automatic "keep going and do the best you can" logic is predictability and general consistency. It's by no means brilliant, but at least you can work out what will happen if you know about those basic rules of how MySQL would operate.


Yes. Rationale: if a column was defined as NOT NULL, then NULL is not valid. Magically changing it into some value (whatever it may be) is not good; MySQL did just it by necessity because of MyISAM being non- transactional.

I'm still not convinced this is relevant to this matter ;-)


I'm pretty sure it is. All the "do the best you can and keep going" logic is not just something Monty cooked up out of thin air, it's a direct consequence of having to deal with a non-transactional storage engine! It's the coping mechanism.

Drizzle is removing the core reason to need this (non-transactional engines), thus cascading the reasoning to the point where we can also get rid of this type of "do the best you can" logic. On invalid input you chuck an error, simple.


Cheers,
Arjen.
--
Arjen Lentz, Director @ Open Query (http://openquery.com.au)
Training and Expertise for MySQL and related tools

OurDelta: free enhanced builds for MySQL @ http://ourdelta.org


_______________________________________________
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