[Lazarus] Lazarus, Jedi etc.

Michael Van Canneyt michael at freepascal.org
Mon Jul 15 17:48:05 CEST 2013

On Mon, 15 Jul 2013, Henry Vermaak wrote:

> On Mon, Jul 15, 2013 at 04:34:21PM +0100, Henry Vermaak wrote:
>> On Mon, Jul 15, 2013 at 03:44:42PM +0100, Graeme Geldenhuys wrote:
>> > On 2013-07-15 15:06, Henry Vermaak wrote:
>> > > Could you explain why the above is bad for those of us that aren't DB
>> > > experts?  To my untrained eye it looks fairly plausible, so I'm
>> > > obviously missing something.
>> > 
>> > I never inserted data into column C, so MySQL decided on its own that it
>> > should magically contain the value 0 — inventing data! Last time I
>> > checked 0 <> null in SQL terms either.
>> I seem to remember something about table columns having default values
>> in the definition, so perhaps column C defaults to 0?  0 != NULL, so it
>> didn't break your definition?
> Just checked the docs:
> "If you are not running in strict SQL mode, any column not explicitly
> given a value is set to its default (explicit or implicit) value.
> ...
> If you want an INSERT statement to generate an error unless you
> explicitly specify values for all columns that do not have a default
> value, you should use strict mode."
> Seems fair enough to me?

That is not RDBMS compliant behaviour.

RDBMs is an established mathematical theory, not something that a bunch of IT-ers with their 'anything goes' attitude invented.
All RDBMSes are supposed to behave the same.

So the same statement is supposed to behave the same on all RDBMSes, 
given the same definition of the table. The statement given in the 
example is supposed to give an error, period.

You can't just say "oh well, we'll just ignore the rules for some time"

Like in: 
I just killed my neighbour, but hey, I changed the law for 5 seconds while I did it, 
so no problem !


More information about the Lazarus mailing list