Damnit !
Thanks for pointing it, I forgot these things.
But it's a bit more subtle :
If any column in a table has a variable length, the entire row becomes
variable-length as a result. Therefore, if a table contains any
variable-length columns (VARCHAR, TEXT, or BLOB), all CHAR  columns
longer than three characters are changed to VARCHAR columns.

I get it working with :
ALTER TABLE sessions MODIFY id char(32) NOT NULL DEFAULT '', MODIFY ip
char(8) NOT NULL DEFAULT '0';
show create table sessions;
CREATE TABLE `sessions` (
  `id` char(32) NOT NULL default '',
  `user_id` int(6) NOT NULL default '0',
  `ip` char(8) NOT NULL default '0',
  `lastseen` timestamp NOT NULL default CURRENT_TIMESTAMP on update
CURRENT_TIMESTAMP,
  `expire` timestamp NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`id`),
  KEY `user_id2` (`user_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1

and now I've got fixed-length rows !
Thanks

2005/8/13, Roger Baklund <[EMAIL PROTECTED]>:
> Pooly wrote:
> > Hi,
> >
> > I try to convert a varchar to a char, but it doesn't seems to work.
> 
>  From the manual: "...all CHAR columns longer than three characters are
> changed to VARCHAR columns."
> 
> <URL: http://dev.mysql.com/doc/mysql/en/silent-column-changes.html >
> 
> --
> Roger
> 
> 
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
> 
> 


-- 
Webzine Rock : http://www.w-fenec.org/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to