MySQL Forums
Forum List  »  NDB clusters

Re: maximum row size
Posted by: Mikael Ronström
Date: July 08, 2005 02:01PM

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.

Options: Reply• Quote


Subject
Views
Written By
Posted
11450
July 07, 2005 10:17PM
Re: maximum row size
4708
July 08, 2005 02:01PM
4059
June 29, 2006 04:48AM
3648
March 29, 2006 03:31PM
3056
June 29, 2006 05:00AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.