List:General Discussion« Previous MessageNext Message »
From:Joerg Bruehe Date:October 28 2005 11:30am
Subject:Re: Bug? Set Null Value in NOT NULL field...
View as plain text  
Hi!

LMS wrote:
> Jeff Smelser escribió:
> 
>> On Wednesday 26 October 2005 04:24 pm, LMS wrote:
>>
>>> Hi,
>>> I have this structure:
>>> -----------------------------------------------
>>> CREATE TABLE tabla (
>>>   id int(10) unsigned NOT NULL auto_increment,
>>>   nombre varchar(100) NOT NULL default '',
>>
>>
>>
>> because your defaulting it to ''.. so null = '' on insert..
>>
>> Jeff
> 
> 
> Ok thanks for your answer, but I can't set any other property, and I 
> need that it gives back an error, because it would have thus to be.

This seems to be a problem of history: It was not done in previous 
versions, so introducing it now might break old applications ...

Please see the manual, especially sections 1.8.6.2 and 5.3.2.
AIUI, using a "strict" mode (new in 5.0) is the way for you.

Joerg

-- 
Joerg Bruehe, Senior Production Engineer
MySQL AB, www.mysql.com
Thread
Bug? Set Null Value in NOT NULL field...LMS27 Oct
  • Re: Bug? Set Null Value in NOT NULL field...Jeff Smelser27 Oct
    • Re: Bug? Set Null Value in NOT NULL field...LMS27 Oct
      • Re: Bug? Set Null Value in NOT NULL field...Joerg Bruehe28 Oct