List:General Discussion« Previous MessageNext Message »
From:Sasha Pachev Date:June 1 1999 5:02am
Subject:Re: MySQL dies with corrupted index
View as plain text  
Jason Spears wrote:
> 
> On Mon, 31 May 1999, Michal Ludvig wrote:
> 
>  >Hi,
>  >I have got a following table:
>  >
>  >: CREATE TABLE ip_tbl (
>  >:   ipid int(10) unsigned DEFAULT '0' NOT NULL,
>  >:   ip varchar(18) DEFAULT '' NOT NULL,
>  >:   dn varchar(64) DEFAULT '' NOT NULL,
>  >:   dn1 int(10) unsigned DEFAULT '0' NOT NULL,
>  >:   dn2 int(10) unsigned DEFAULT '0' NOT NULL,
>  >:   rtime int(10) unsigned DEFAULT '0' NOT NULL,
>  >:   flag int(10) unsigned DEFAULT '0' NOT NULL,
>  >:
>  >:   PRIMARY KEY (ipid),
>  >:   UNIQUE ip (ip),
>  >:   UNIQUE dn (dn),
>  >:   KEY dn1 (dn1),
>  >:   KEY dn2 (dn2),
>  >:   KEY rtime (rtime),
>  >:   KEY flag (flag)
>  >: );
> 
> I'm a bit new to SQL, but your definitions of the ip and dn columns
> both look strange to me.  How can you specify a DEFAULT '' NOT NULL
> column?  Does '' not represent NULL?  If so, mySQL should barf
> on the table definition itself, but you never know...
> 
> HTH,
> 
> Jason Spears

Jason:

DEFAULT '' NOT NULL is actually acceptable. '' is an empty string, which
is not the same as NULL

-- 
Sasha Pachev
http://www.sashanet.com
Thread
MySQL dies with corrupted indexMichal Ludvig31 May
  • Re: MySQL dies with corrupted indexJason Spears1 Jun
    • Re: MySQL dies with corrupted indexSasha Pachev1 Jun
  • MySQL dies with corrupted indexMichael Widenius3 Jun
Re: MySQL dies with corrupted indexMichal Ludvig31 May
  • Re: MySQL dies with corrupted indexDim Zegebart31 May
    • Re: MySQL dies with corrupted indexMichal Ludvig31 May
      • Re: MySQL dies with corrupted indexDim Zegebart31 May