List:General Discussion« Previous MessageNext Message »
From:Martin Ramsch Date:September 22 1999 2:50pm
Subject:Re: BUG ? Auto_increment and tiny_int
View as plain text  
On Wed, 1999-09-22 06:42:14 -0700, Rick Moore wrote:
> id tinyint unsigned not null auto_increment );
[...]
> show columns from test2;
> +-------+---------------------+------+-----+---------+----------------+...
> | Field | Type                | Null | Key | Default | Extra          |...
> +-------+---------------------+------+-----+---------+----------------+...
> | id    | tinyint(3) unsigned |      | PRI | NULL    | auto_increment |...
> +-------+---------------------+------+-----+---------+----------------+...
> 1 row in set (0.00 sec)
> 
> I thought I specified "not null?"  I haven't researched the manual
> thoroughly, but I assume this is an intentional silent column
> change...

No, it's no column changes, because the "NOT NULL" of the column
definition is reflected in the 'Null' column above: being empty means,
no NULL values.

But NULL as default values is--as I've recently learned here on the
list--to make ODBC happy and have it really insert NULL into
AUTO_INCREMENT columns.  Otherwise you wouldn't get the automatic
increments ...
(Hope, I got that explanation right ...)

Regards,
  Martin
-- 
Martin Ramsch <m.ramsch@stripped> <URL: http://home.pages.de/~ramsch/ >
PGP KeyID=0xE8EF4F75 FiPr=52 44 5E F3 B0 B1 38 26  E4 EC 80 58 7B 31 3A D7
Thread
BUG ? Auto_increment and tiny_intPeter Zaitsev21 Sep
  • Re: BUG ? Auto_increment and tiny_intScott Hess21 Sep
    • Re: BUG ? Auto_increment and tiny_intMichael Widenius22 Sep
  • Re: BUG ? Auto_increment and tiny_intRick Moore22 Sep
    • Re: BUG ? Auto_increment and tiny_intMartin Ramsch22 Sep
      • Re: BUG ? Auto_increment and tiny_intPaul DuBois22 Sep
    • Re: BUG ? Auto_increment and tiny_intMichael Widenius22 Sep