Bug #109399 Table fails to createRecord
Submitted: 15 Dec 2022 16:13 Modified: 16 Dec 2022 5:52
Reporter: Mikael Ronström Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:8.0.31 OS:Any
Assigned to: CPU Architecture:Any

[15 Dec 2022 16:13] Mikael Ronström
Description:
Added the following test table to NDBT_Tables.cpp:
static
const
NDBT_Attribute T18Attribs[] = {
  NDBT_Attribute("KOL1", NdbDictionary::Column::Varbinary, 100, true), 
  NDBT_Attribute("KOL2", NdbDictionary::Column::Unsigned, 1, false, false),
  NDBT_Attribute("KOL3", NdbDictionary::Column::Longvarbinary, 15000, false, true),
  NDBT_Attribute("KOL99", NdbDictionary::Column::Unsigned, 1, false, false),
};

static
const
NDBT_Table T18("T18", sizeof(T18Attribs)/sizeof(NDBT_Attribute), T18Attribs);

Using this table in the test testNdbApi -n NdbRecordRowLength gives error code 4547.

This means that two columns have overlapping start positions in the record created.

How to repeat:
See description.
[15 Dec 2022 16:15] Mikael Ronström
When running it against testBasic -n Bug27756 T18
it reports a memory leak.
[15 Dec 2022 16:17] Mikael Ronström
testIndex -n DeferredError T18
ends in segmentation fault
[15 Dec 2022 17:04] Mikael Ronström
Seems like testNdbApi -n NdbRecordRowLength T18
is fixed by increasing highestUsed from 9000 to 31000 in the
test case in testNdbApi.cpp. Assume that the test case was written
in a time when max record size was 8052. It is now 30000, so test
case didn't properly work with large tables.
[15 Dec 2022 22:43] Mikael Ronström
testBasic -n Bug27756 T18
fails since this test case won't work with table row size larger
than around 10 kB. If larger than the copy row of the next row
will be taken from a different page since the free will put back
rows in a different order than they are allocated. So the test
case depends on a specific table row size.
[15 Dec 2022 23:08] Mikael Ronström
The test case
testIndex -n DeferredError T18
crashed since the row size was bigger than 8000 bytes.
HugoCalculator.cpp had two stack buffers that used 8000 bytes instead
of maximum row size. This led to a crash of the test case when a larger
table was used.
[15 Dec 2022 23:09] Mikael Ronström
Thus all problems related to this bug has been shown to be
only test related.
[16 Dec 2022 5:52] MySQL Verification Team
Hello Mikael,

Thank you for the report and feedback.

Sincerely,
Umesh