Bug #19010 ALTER from Cluster table wo/ PK to other engine fails
Submitted: 11 Apr 2006 13:59 Modified: 22 May 2006 14:13
Reporter: Nikolay Grishakin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Partitions Severity:S3 (Non-critical)
Version:5.1 OS:Linux (Linux)
Assigned to: Mikael Ronström CPU Architecture:Any

[11 Apr 2006 13:59] Nikolay Grishakin
Description:
The following test case fails with error 1467:

#### Try to ALTER from Cluster Disk Data to InnoDB

CREATE TABLE test.t1 (a1 INT, a2 BLOB, a3 TEXT) TABLESPACE ts STORAGE DISK ENGINE=NDB;
SHOW CREATE TABLE test.t1;
ALTER TABLE test.t1 ENGINE=InnoDB;
SHOW CREATE TABLE test.t1;
DROP TABLE test.t1;

#query 'ALTER TABLE test.t1 ENGINE=InnoDB' failed: 1467: Field in list of fields for partition function not found in table

Also adding a primary key to the table does not make it work 

How to repeat:
see above.
[11 Apr 2006 14:05] Jonas Oreland
Hi,

I don't think has anything to do with DD. Can you try wo/ DD.?
And if this makes no difference, please update synopsis.

Also can you try wo/ blob/text.

If removing DD still makes it fail, put the bug into category partitioning.
(otherwise, just set it back to verified...)
[11 Apr 2006 14:28] Nikolay Grishakin
Creating table without DD and BLOB fields produces the same error.
Changing category to Partitioning.
[21 Apr 2006 8:25] Jonas Oreland
Simpler testcase
create table t1 (a int) engine = ndb;
alter table t1 engine = innodb;
ERROR 1467 (HY000): Field in list of fields for partition function not found in table

create table t1 (a int primary key) engine = ndb;
alter table t1 engine = innodb; // works

i.e. the problem is not blobs. But tables wo/ primary key
     also innodb can be any other engine (excluding ndb :-))
[9 May 2006 6:43] Mikael Ronström
Will treat tables that have been defined as auto-partitioned or with the same attributes
as auto-partitioned as non-partitioned when altering them to new storage engine.
Also when using SHOW CREATE TABLE will remove print-out of auto-partitioned info.
This means that a new handler method is_auto_partitioned will be introduced.
[20 May 2006 15:54] Mikael Ronström
Patch will appear in 5.1.11
(Reviewed by Martin Skold)
[22 May 2006 14:13] 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.11 changelog; closed.