Bug #103814 ClusterJ partition key scratch buffer size too small
Submitted: 26 May 12:30 Modified: 27 May 0:14
Reporter: Mikael Ronström Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S2 (Serious)
Version:8.0.23++ OS:Any
Assigned to: CPU Architecture:Any

[26 May 12:30] Mikael Ronström
Description:
Create a table like this:

CREATE TABLE t (
a VARCHAR(500) collate utf8_unicode_ci primry key NOT NULL
) engine=NDB DEFAULT CHARSET utf8;

Insert a row into this table from ClusterJ
Will generate error code 4278, buffer too small.
The problem is the partition key scratch buffer size which is limited
to 10000 bytes. This table will require 120000 bytes of hash buffer
(500 * 3 * 8).

How to repeat:
Create a table like this:

CREATE TABLE t (
a VARCHAR(500) collate utf8_unicode_ci primry key NOT NULL
) engine=NDB DEFAULT CHARSET utf8;

Insert a row into this table from ClusterJ
Will generate error code 4278, buffer too small.

Suggested fix:
Use malloc when buffer isn't large enough in Ndb.cpp::computeHash.
[27 May 0:14] MySQL Verification Team
Hi Mikael,

Thanks for the report!

all best
Bogdan