MySQL Forums
Forum List  »  NDB clusters

Got error 851 Maximum 8052 bytes of FIXED columns supported
Posted by: foo bar
Date: June 05, 2017 11:33PM

I'm trying to create the following table in NDB cluster. But i'm getting error "SQL Error (1296): Got error 851 'Maximum 8052 bytes of FIXED columns supported, use varchar or COLUMN_FORMAT DYNAMIC instead' from NDBCLUSTER".

CREATE TABLE `abc` (
`id` INT(15) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`m` INT(11) NULL DEFAULT NULL,
`y` INT(11) NULL DEFAULT NULL,
`q1` INT(11) NULL DEFAULT NULL,
`zzz` INT(11) NULL DEFAULT NULL,
`a1` INT(11) NULL DEFAULT NULL,
`b1` INT(11) NULL DEFAULT NULL,
`kkk` INT(11) NULL DEFAULT NULL,
`aaa` INT(11) NULL DEFAULT NULL,
`bbb` INT(11) NULL DEFAULT NULL,
`ee` INT(11) NULL DEFAULT NULL,
`ii` INT(11) NULL DEFAULT NULL,
`kk` INT(11) NULL DEFAULT NULL,
`oo` BIGINT(20) NULL DEFAULT NULL,
`qq` BIGINT(20) NULL DEFAULT NULL,
`c1` DOUBLE NULL DEFAULT NULL,
`d1` DOUBLE NULL DEFAULT NULL,
`e1` DOUBLE NULL DEFAULT NULL,
`f1` DOUBLE NULL DEFAULT NULL,
`g1` DOUBLE NULL DEFAULT NULL,
`h1` DOUBLE NULL DEFAULT NULL,
`i1` DOUBLE NULL DEFAULT NULL,
`j1` DOUBLE NULL DEFAULT NULL,
`k1` DOUBLE NULL DEFAULT NULL,
`l1` DOUBLE NULL DEFAULT NULL,
`m1` DOUBLE NULL DEFAULT NULL,
`n1` DOUBLE NULL DEFAULT NULL,
`bb` TINYINT(1) NULL DEFAULT NULL,
`hh` TINYINT(1) NULL DEFAULT NULL,
`nn` TINYINT(1) NULL DEFAULT NULL,
`tt` TINYINT(1) NULL DEFAULT NULL,
`cc` DECIMAL(20,0) NULL DEFAULT NULL,
`e` DECIMAL(20,0) NULL DEFAULT NULL,
`j` DECIMAL(20,0) NULL DEFAULT NULL,
`p` DECIMAL(20,0) NULL DEFAULT NULL,
`q` DECIMAL(20,0) NULL DEFAULT NULL,
`w` DECIMAL(20,0) NULL DEFAULT NULL,
`g` DATETIME NULL DEFAULT NULL,
`o1` DATETIME NULL DEFAULT NULL,
`uu` DATETIME NULL DEFAULT NULL,
`vv` DATETIME NULL DEFAULT NULL,
`ww` DATETIME NULL DEFAULT NULL,
`xx` DATETIME NULL DEFAULT NULL,
`yy` DATETIME NULL DEFAULT NULL,
`zz` DATETIME NULL DEFAULT NULL,
`t` CHAR(1) NULL DEFAULT NULL,
`a` VARCHAR(10) NULL DEFAULT NULL,
`b` VARCHAR(48) NULL DEFAULT NULL,
`c` VARCHAR(10) NULL DEFAULT NULL,
`d` VARCHAR(48) NULL DEFAULT NULL,
`f` VARCHAR(48) NULL DEFAULT NULL,
`h` VARCHAR(10) NULL DEFAULT NULL,
`i` VARCHAR(48) NULL DEFAULT NULL,
`k` VARCHAR(10) NULL DEFAULT NULL,
`l` VARCHAR(48) NULL DEFAULT NULL,
`n` VARCHAR(10) NULL DEFAULT NULL,
`o` VARCHAR(48) NULL DEFAULT NULL,
`r` VARCHAR(10) NULL DEFAULT NULL,
`s` VARCHAR(20) NULL DEFAULT NULL,
`u` VARCHAR(48) NULL DEFAULT NULL,
`v` VARCHAR(48) NULL DEFAULT NULL,
`z` VARCHAR(100) NULL DEFAULT NULL,
`aa` VARCHAR(100) NULL DEFAULT NULL,
`dd` VARCHAR(100) NULL DEFAULT NULL,
`gg` VARCHAR(100) NULL DEFAULT NULL,
`jj` VARCHAR(100) NULL DEFAULT NULL,
`mm` VARCHAR(100) NULL DEFAULT NULL,
`pp` VARCHAR(100) NULL DEFAULT NULL,
`ss` VARCHAR(100) NULL DEFAULT NULL,
`ccc` VARCHAR(48) NULL DEFAULT NULL,
`ddd` VARCHAR(48) NULL DEFAULT NULL,
`eee` VARCHAR(100) NULL DEFAULT NULL,
`fff` VARCHAR(48) NULL DEFAULT NULL,
`ggg` VARCHAR(48) NULL DEFAULT NULL,
`hhh` VARCHAR(100) NULL DEFAULT NULL,
`iii` VARCHAR(48) NULL DEFAULT NULL,
`jjj` VARCHAR(100) NULL DEFAULT NULL,
`lll` VARCHAR(100) NULL DEFAULT NULL,
`mmm` VARCHAR(48) NULL DEFAULT NULL,
`nnn` VARCHAR(48) NULL DEFAULT NULL,
`ooo` VARCHAR(100) NULL DEFAULT NULL,
`ppp` VARCHAR(255) NULL DEFAULT NULL,
`ll` VARCHAR(255) NULL DEFAULT NULL,
`ff` VARCHAR(255) NULL DEFAULT NULL,
`x` VARCHAR(255) NULL DEFAULT NULL,
`rr` VARCHAR(255) NULL DEFAULT NULL,
`rrr` VARCHAR(255) NULL DEFAULT NULL,
`p1` VARCHAR(255) NULL DEFAULT NULL,
`qqq` VARCHAR(100) NULL DEFAULT NULL,
`sss` VARCHAR(48) NULL DEFAULT NULL,
`uuu` VARCHAR(48) NULL DEFAULT NULL,
`vvv` VARCHAR(48) NULL DEFAULT NULL,
`www` VARCHAR(48) NULL DEFAULT NULL,
`xxx` VARCHAR(48) NULL DEFAULT NULL,
`yyy` VARCHAR(48) NULL DEFAULT NULL,
`ttt` TEXT NULL DEFAULT NULL
)
COLLATE='utf8_general_ci'
TABLESPACE TS1
STORAGE DISK
ENGINE=NDB
AUTO_INCREMENT=1;

my question is how did it get column size more than 8052 bytes? i run ndb_size.pl and this is what I get.

test.abc
--------

DataMemory for Columns (* means varsized DataMemory):
Column Name Type Varsized Key 4.1 5.0 5.1
gg varchar(100) Y 104 104 4*
mm varchar(100) Y 104 104 4*
d varchar(50) Y 52 52 4*
lll varchar(100) Y 104 104 4*
rr varchar(255) Y 256 256 4*
xx datetime 8 8 8
y int(11) 4 4 4
jj varchar(100) Y 104 104 4*
yy datetime 8 8 8
mmm varchar(50) Y 52 52 4*
g datetime 8 8 8
vv datetime 8 8 8
aa varchar(100) Y 104 104 4*
g1 double 8 8 8
e1 double 8 8 8
e decimal(20,0) N/A N/A N/A
d1 double 8 8 8
ll varchar(255) Y 256 256 4*
jjj varchar(100) Y 104 104 4*
p1 varchar(255) Y 256 256 4*
o1 datetime 8 8 8
oo bigint(20) 8 8 8
b varchar(50) Y 52 52 4*
q decimal(20,0) N/A N/A N/A
z varchar(100) Y 104 104 4*
w decimal(20,0) N/A N/A N/A
ppp varchar(255) Y 256 256 4*
bbb int(11) 4 4 4
fff varchar(50) Y 52 52 4*
n1 double 8 8 8
l1 double 8 8 8
sss varchar(50) Y 52 52 4*
a1 int(11) 4 4 4
eee varchar(100) Y 104 104 4*
pp varchar(100) Y 104 104 4*
zz datetime 8 8 8
qqq varchar(100) Y 104 104 4*
nnn varchar(50) Y 52 52 4*
iii varchar(50) Y 52 52 4*
m1 double 8 8 8
c1 double 8 8 8
ddd varchar(50) Y 52 52 4*
uuu varchar(50) Y 52 52 4*
a varchar(10) Y 12 12 4*
hhh varchar(100) Y 104 104 4*
k1 double 8 8 8
xxx varchar(50) Y 52 52 4*
ttt text 264 264 264
tt tinyint(1) 4 4 4
j decimal(20,0) N/A N/A N/A
u varchar(50) Y 52 52 4*
f1 double 8 8 8
k varchar(10) Y 12 12 4*
cc decimal(20,0) N/A N/A N/A
ss varchar(100) Y 104 104 4*
bb tinyint(1) 4 4 4
ooo varchar(100) Y 104 104 4*
vvv varchar(50) Y 52 52 4*
id int(15) PRI 4 4 4
zzz int(11) 4 4 4
t char(1) 4 4 4
i1 double 8 8 8
h1 double 8 8 8
rrr varchar(255) Y 256 256 4*
qq bigint(20) 8 8 8
ff varchar(255) Y 256 256 4*
dd varchar(100) Y 104 104 4*
v varchar(50) Y 52 52 4*
s varchar(20) Y 24 24 4*
kkk int(11) 4 4 4
q1 int(11) 4 4 4
uu datetime 8 8 8
c varchar(10) Y 12 12 4*
b1 int(11) 4 4 4
ccc varchar(50) Y 52 52 4*
www varchar(50) Y 52 52 4*
ggg varchar(50) Y 52 52 4*
r varchar(10) Y 12 12 4*
ii int(11) 4 4 4
x varchar(255) Y 256 256 4*
nn tinyint(1) 4 4 4
h varchar(10) Y 12 12 4*
j1 double 8 8 8
aaa int(11) 4 4 4
f varchar(50) Y 52 52 4*
i varchar(50) Y 52 52 4*
ee int(11) 4 4 4
n varchar(10) Y 12 12 4*
m int(11) 4 4 4
l varchar(50) Y 52 52 4*
p decimal(20,0) N/A N/A N/A
yyy varchar(50) Y 52 52 4*
ww datetime 8 8 8
kk int(11) 4 4 4
hh tinyint(1) 4 4 4
o varchar(50) Y 52 52 4*
-- -- --
Fixed Size Columns DM/Row 4948 4948 512
Varsize Columns DM/Row 0 0 196


DataMemory for Indexes:
Index Name Type 4.1 5.0 5.1
PRIMARY BTREE N/A N/A N/A
-- -- --
Total Index DM/Row 0 0 0



Supporting Tables DataMemory/Row
test.abc$BLOB_ttt 2040 2040 2044
-- -- --
This DataMemory/Row 4972 4972 536
Total DM/Row 7012 7012 2580 Includes DM in other tables


IndexMemory for Indexes:
Index Name 4.1 5.0 5.1
PRIMARY 29 16 16
-- -- --
Indexes IM/Row 29 16 16


Supporting Tables IndexMemory/Row
test.abc$BLOB_ttt 37 16 16
-- -- --

Total Suppt IM/Row 37 16 16



Summary (for THIS table):
4.1 5.0 5.1
Fixed Overhead DM/Row 12 12 16
NULL Bytes/Row 12 12 8
DataMemory/Row 4972 4972 536 (Includes overhead, bitmap and indexes)

Varsize Overhead DM/Row 0 0 8
Varsize NULL Bytes/Row 0 0 8
Avg Varsize DM/Row 0 0 212

No. Rows 0 0 0

Rows/32kb DM Page 6 6 60
Fixedsize DataMemory (KB) 0 0 0

Rows/32kb Varsize DM Page 0 0 153
Varsize DataMemory (KB) 0 0 0

Rows/8kb IM Page 282 512 512
IndexMemory (KB) 0 0 0

It looks like the maximum it should take is about 4972 bytes.

Also, i check my ndb_default_column_format.

show variables like 'ndb_default_column_format'.

ndb_default_column_format DYNAMIC

So, why is the error still suggesting to use column_format dynamic?

Thanks in advance.

Options: ReplyQuote


Subject
Views
Written By
Posted
Got error 851 Maximum 8052 bytes of FIXED columns supported
235
June 05, 2017 11:33PM


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.