Bug #16822 ALTER TABLE test.t1 OPTIMIZE PARTITION p4 hangs mysql-test
Submitted: 26 Jan 2006 21:25 Modified: 21 Mar 2006 16:33
Reporter: Jonathan Miller Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Partitions Severity:S2 (Serious)
Version:5.1.6-alpha OS:Linux (Linux)
Assigned to: Assigned Account CPU Architecture:Any

[26 Jan 2006 21:25] Jonathan Miller
Description:
May be same cause as in http://bugs.mysql.com/bug.php?id=16821
The following test never returns,

How to repeat:
 ./mysql-test-run --do-test=test2 --with-ndbcluster-all --ndb-extra-test

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
 ADD INDEX (c5);

ALTER TABLE test.t1 RENAME test.t3;

ALTER TABLE test.t3 RENAME test.t1;

ALTER TABLE test.t1 CHANGE c2 c2 BLOB;

ALTER TABLE test.t1 CHANGE c2 c2 TEXT;

ALTER TABLE test.t1 MODIFY c1 BIGINT NOT NULL;

SHOW CREATE TABLE test.t1;

ALTER TABLE test.t1 OPTIMIZE PARTITION p4;

DROP TABLE test.t1;
[26 Jan 2006 21:49] Jorge del Conde
Reproduced under FC4 with a recent 5.1 clone
[21 Mar 2006 16:33] Mikael Ronström
See Bug #16819, 16819 needs feedback, this is the same type of problem.