Pooly wrote:
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 !

or you could have just done:

alter table sessions row_format=fixed;

-jsd-


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

Reply via email to