Bug #45080 Cluster limit on indexes per table ...
Submitted: 25 May 2009 21:45 Modified: 5 Jun 2009 10:41
Reporter: Hartmut Holzgraefe Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Documentation Severity:S3 (Non-critical)
Version:mysql-5.1-telco-7.0 OS:Any
Assigned to: Jon Stephens CPU Architecture:Any

[25 May 2009 21:45] Hartmut Holzgraefe
Description:
http://dev.mysql.com/doc/refman/5.1/en/mysql-cluster-limitations-limits.html

says

  Different limits related to tables and indexes. 
  For example, the maximum number of ordered indexes 
  per table is determined by MaxNoOfOrderedIndexes. 

MaxNoOfOrderedIndexes sets the limit of total per
cluster indexes though, the maximum number of 
(ordered) indexes per table seems to be fixed 
to 16 (including the primary key) on CREATE TABLE
time.

Additional indexes may be added using the "online
add index" which has its own set of prolems though,
see bug #44980 ...

How to repeat:
Try to create a table with 16 or more indexes (including the primary key):

mysql> create table t2 ( 
  `id` int(11) NOT NULL AUTO_INCREMENT,   
  `attr_1` varchar(20) DEFAULT NULL,   
  `attr_2` varchar(20) DEFAULT NULL,  
  `attr_3` varchar(20) DEFAULT NULL,   
  `attr_4` varchar(20) DEFAULT NULL,   
  `attr_5` varchar(20) DEFAULT NULL,   
  `attr_6` varchar(20) DEFAULT NULL,   
  `attr_7` varchar(20) DEFAULT NULL,   
  `attr_8` varchar(20) DEFAULT NULL,   
  `attr_9` varchar(20) DEFAULT NULL,   
  `attr_10` varchar(20) DEFAULT NULL,  
  `attr_11` varchar(20) DEFAULT NULL,   
  `attr_12` varchar(20) DEFAULT NULL,   
  `attr_13` varchar(20) DEFAULT NULL,   
  `attr_14` varchar(20) DEFAULT NULL,   
  `attr_15` varchar(20) DEFAULT NULL,   
  `attr_16` varchar(20) DEFAULT NULL,   
  `attr_17` varchar(20) DEFAULT NULL,   
  `attr_18` varchar(20) DEFAULT NULL,   
  `attr_19` varchar(20) DEFAULT NULL,   
  `attr_20` varchar(20) DEFAULT NULL,   
  PRIMARY KEY (`id`),  
  KEY `key_1` (`attr_1`),   
  KEY `key_2` (`attr_2`),   
  KEY `key_3` (`attr_3`),   
  KEY `key_4` (`attr_4`),  
  KEY `key_5` (`attr_5`),  
  KEY `key_6` (`attr_6`),   
  KEY `key_7` (`attr_7`),   
  KEY `key_8` (`attr_8`),   
  KEY `key_9` (`attr_9`),   
  KEY `key_10` (`attr_10`), 
  KEY `key_11` (`attr_11`),
  KEY `key_12` (`attr_12`),  
  KEY `key_13` (`attr_13`),   
  KEY `key_14` (`attr_14`),   
  KEY `key_15` (`attr_15`),   
  KEY `attr_16` (`attr_16`) 
) ENGINE=ndbcluster;

ERROR 1005 (HY000): Can't create table 'test.t2' (errno: 783)

Suggested fix:
Document the real per table limits ..
[5 Jun 2009 10:41] Jon Stephens
Thank you for your bug report. This issue has been addressed in the documentation. The updated documentation will appear on our website shortly, and will be included in the next release of the relevant products.