Bug #16810 ALTER TABLE test.t1 COALESCE PARTITION 4' failed: Out of memory;
Submitted: 26 Jan 2006 15:50 Modified: 16 Mar 2006 8:12
Reporter: Jonathan Miller Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Partitions Severity:S2 (Serious)
Version:5.1.6-alpha OS:Linux (Linux)
Assigned to: Mikael Ronström CPU Architecture:Any

[26 Jan 2006 15:50] Jonathan Miller
Description:
Trying to coalesce a table with only 11 records :-(

Errors are (from /home/ndbdev/jmiller/clones/mysql-5.1-new/mysql-test/var/log/mysqltest-time) :
mysqltest: At line 23: query 'ALTER TABLE test.t1 COALESCE PARTITION 4' failed: 1037: Out of memory; restart server and try again (needed 8 bytes)

How to repeat:
CREATE TABLE test.t1 (
  c1 MEDIUMINT NOT NULL AUTO_INCREMENT,
  c2 TEXT NOT NULL,
  c3 INT NOT NULL,
  c4 BIT NOT NULL,
  c5 FLOAT,
  c6 VARCHAR(255),
  c7 TIMESTAMP,
  PRIMARY KEY(c1,c3))
  ENGINE=NDB
  PARTITION BY KEY(c3) PARTITIONS 5;

let $j= 11;
--disable_query_log
while ($j)
{
  eval INSERT INTO test.t1 VALUES (NULL, "Tested Remotely from Texas, USA", $j, b'0',
                                   $j.00,"By JBM $j","2006-01-26");
  dec $j;
}
--enable_query_log
ALTER TABLE test.t1 COALESCE PARTITION 4;

DROP TABLE test.t1;
[26 Jan 2006 17:38] MySQL Verification Team
mysql> ALTER TABLE test.t1 COALESCE PARTITION 4;
ERROR 1037 (HY001): Out of memory; restart server and try again (needed 8 bytes)
[13 Mar 2006 16:40] Mikael Ronström
The bug was fixed in the latest version of the MySQL Server
[16 Mar 2006 8:12] 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 bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Documented bugfix in 5.1.8 changelog. Closed.