Re: maximum row size
power wang wrote:
You are using a character set utf8 that uses 3 bytes per character. Thus each
varchar needs 768 bytes.
768 * 11 = 8448 > 8052
Rgrds Mikael
> When i attempt to create a table following this
> script:
> create table tb_test(
> id int NOT NULL auto_increment,
> column0 varchar(255),
> column1 varchar(255),
> column2 varchar(255),
> column3 varchar(255),
> column4 varchar(255),
> column5 varchar(255),
> column6 varchar(255),
> column7 varchar(255),
> column8 varchar(255),
> column9 varchar(255),
> column10 varchar(255),
> primary key(id),
> index idx_tb_test(id)
> )ENGINE=ndbcluster DEFAULT CHARSET=utf8;
> I got errors:
> java.sql.SQLException: Row size too large.
> The maximum row size for the used table type, not
> counting BLOBs, is 8052.
> You have to change some columns to TEXT or
> BLOBs at
> com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.ja
> va:2851)
>
> I worked on a mysql cluster make up of 4
> machines(1 mgm node,2 storage node,1 mysql node)
> with 5.0.7 beta.
> So as i know, there is an limit of row size is
> 8052b.
> But the table only have 12 columns.And simplly
> canculate the size is 16+4+11*256=2836 b,it is not
> large than 8052,
> who can help me to find the right method of
> canculation.