Bug #32670 Altering table with 75% free data memory reports table full
Submitted: 23 Nov 2007 17:04 Modified: 14 Dec 2007 22:16
Reporter: Geert Vanderkelen Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Cluster: Cluster (NDB) storage engine Severity:S3 (Non-critical)
Version:5.1.22_6.3.6 OS:Any
Assigned to: Jonas Oreland CPU Architecture:Any

[23 Nov 2007 17:04] Geert Vanderkelen
Description:
Altering a table which occupies about 25% of the data memory, makes it fail with error 'table full' and put the data memory up.

[root@localhost:/test]
> alter table t1 modify pk1 varchar(80) not null;
ERROR 1114 (HY000): The table 't1' is full

[root@localhost:/test]
> show warnings\G
*************************** 1. row ***************************
  Level: Error
   Code: 1296
Message: Got error 827 'Out of memory in Ndb Kernel, table data (increase DataMemory)' from NDB
*************************** 2. row ***************************
  Level: Error
   Code: 1114
Message: The table 't1' is full
2 rows in set (0.00 sec)

How to repeat:
CREATE TABLE `t1` (
  `pk1` varchar(100) NOT NULL,
  `pk2` varchar(60) NOT NULL,
  `pk3` varchar(100) NOT NULL,
  `i1` int(5) NOT NULL DEFAULT '0',
  `vb1` varbinary(7500) NOT NULL,
  `i2` int(8) NOT NULL,
  `v1` varchar(50) NOT NULL,
  `dt1` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`pk1`,`pk2`,`pk3`) USING HASH,
  KEY (`pk1`)) ENGINE=ndbcluster DEFAULT CHARSET=latin1;

ALTER TABLE t1 MODIFY pk1 VARCHAR(80) NOT NULL;

ndb api app attached (privately) to fill table with records.

Suggested fix:
Maybe missing the obvious.
[23 Nov 2007 17:08] Geert Vanderkelen
hugoLoad can be used to fill the table, when making the Primary key an INT. It doesn't matter for reproducing the problem.
[23 Nov 2007 17:10] Geert Vanderkelen
Configuration used:

[NDBD DEFAULT]
Datadir=/data2/csc/21201/cluster
NoOfReplicas=1
DataMemory=200M
IndexMemory=10M

[NDB_MGMD DEFAULT]
Datadir=/data2/csc/21201/cluster
portnumber=1406

[TCP DEFAULT]
portnumber=2292
SendBufferMemory=4M

[NDB_MGMD]
Id=1
HostName=localhost

[NDBD]
Id=3
HostName=localhost
[11 Dec 2007 14:18] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/39710

ChangeSet@1.2661, 2007-12-11 15:18:37+01:00, tomas@whalegate.ndb.mysql.com +2 -0
  Bug#32670
  - make sure transaction off is captured
[13 Dec 2007 10:28] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/39872

ChangeSet@1.2786, 2007-12-13 11:28:12+01:00, tomas@whalegate.ndb.mysql.com +1 -0
  correct merge of bug#32670
[14 Dec 2007 17:09] Bugs System
Pushed into 6.0.5-alpha
[14 Dec 2007 22:16] Jon Stephens
Thank you for your bug report. This issue has been committed to our source repository of that product and will be incorporated into the next release.

If necessary, you can access the source repository and build the latest available version, including the bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html

Documented bugfix in the 6.0.5 changelog.
[7 Jan 2008 15:33] Jon Stephens
Also documented fix in 5.1.23-ndb-6.3.7 changelog.
[7 Jan 2008 16:06] Jon Stephens
Also documented fix in 5.1.23-ndb-6.2.10 changelog.