[Lazarus] Lazarus, Jedi etc.
Mark Morgan Lloyd
markMLl.lazarus at telemetry.co.uk
Tue Jul 16 21:37:51 CEST 2013
Henry Vermaak wrote:
> On Tue, Jul 16, 2013 at 12:23:10PM +0200, Reinier Olislagers wrote:
>> On 16-7-2013 11:53, Henry Vermaak wrote:
>>> Ranting from a position of ignorance seriously dilutes your credibility
>>> in my book.
>> I'm just saying the rants may be justified if mysql cannot be configured
>> to follow the RDBMS integrity norms.
>> Obviously you don't know if that is possible either, so let's give the
>> ranters the benefit of the doubt.
>
> Sigh, I thought I was clear on that. Using Graeme's example:
>
> mysql> set sql_mode = TRADITIONAL;
> Query OK, 0 rows affected (0.00 sec)
>
> mysql> create table a (b int not null, c int not null);
> Query OK, 0 rows affected (0.10 sec)
>
> mysql> insert into a (b) values (1);
> ERROR 1364 (HY000): Field 'c' doesn't have a default value
> mysql>
I certainly sympathise with your argument Henry, but I'm a bit concerned
if MySQL is prepared to accept a "not null" constraint that it does not
intend to enforce. So assuming that there is no sql_mode change between
these two commands (using the earlier example):
mysql> create table a (b int not null, c int not null);
Query OK, 0 rows affected (0.17 sec)
mysql> insert into a (b) values (1);
Query OK, 1 row affected, 1 warning (0.03 sec)
one or other of them should at the very least raise a warning.
--
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk
[Opinions above are the author's, not those of his employers or colleagues]
More information about the Lazarus
mailing list