Bug #21622 Error in manual about NDB limitation and data type BIT
Submitted: 14 Aug 2006 14:04 Modified: 16 Aug 2006 11:56
Reporter: Matthias Leich Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:4.1->5.1 OS:
Assigned to: Jon Stephens CPU Architecture:Any

[14 Aug 2006 14:04] Matthias Leich
Description:
Manual 5.1: 17.12. Known Limitations of MySQL Cluster
   http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-limitations.html
   ....
   A BIT column cannot be a primary key or part of a composite primary key.
   ....

This description is incomplete. The limitation is much bigger.

# Add a simple index after table creation 
create table t1 (a bit(2), b char(17));
alter table t1 add key (a);
ERROR HY000: Got error 906 'Unsupported attribute type in index' from NDBCLUSTER
# Create table with simple index
create table t1 (a bit(2), b char(17), PRIMARY KEY(b), KEY(a));
ERROR HY000: Can't create table 'test.t1' (errno: 906)

It looks like columns of type BIT cannot be primary key or index or
a part of them.

I guess this is also valid for NDB cluster in MySQL 5.0.

How to repeat:
Please try the statements above or some variations of them.
[16 Aug 2006 11:56] Jon Stephens
Additional testing shows that BIT can't be used for unique keys, either.

Thanks!