Bug #51450 ERROR 1069: Too many keys specified. Max 64 keys allowed‎
Submitted: 24 Feb 2010 9:11 Modified: 17 Mar 2010 10:17
Reporter: krishna reddy Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S1 (Critical)
Version:5.0,5.5 OS:Any
Assigned to: CPU Architecture:Any

[24 Feb 2010 9:11] krishna reddy
Description:
I am getting the error 1069:Too many keys specified. Max 64 keys allowed while creating the table with more than 64 foreign keys in My SQL 5.0 and later versions also like(My SQL 5.5).

one of my table having 100 foreign keys.Data base engine is InnoDB.

How to repeat:
creating the table with more than 64 columns with 64 foreign keys.
[24 Feb 2010 9:15] krishna reddy
sql file consists the statements to test this bug

Attachment: test_index_limit.sql (application/octet-stream, text), 5.02 KiB.

[24 Feb 2010 17:39] MySQL Verification Team
Thank you the bug report. That's by design:

http://dev.mysql.com/doc/refman/5.0/en/features.html

"Support for up to 64 indexes per table (32 before MySQL 4.1.2). Each index may consist of 1 to 16 columns or parts of columns. The maximum index width is 1000 bytes (767 for InnoDB); before MySQL 4.1.2, the limit is 500 bytes...."

Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation.  All rights reserved.

C:\build>type 5.0\include\config-win.h | findstr MAX_INDEXES
#ifndef MAX_INDEXES
#define MAX_INDEXES 64

C:\build>
[25 Feb 2010 6:03] krishna reddy
Hi,

I am getting the error while adding the foreign key constraints to the table columns.Here One of my table of DB Engine type InnoDB having more than 64 foreign keys.

Error is Too Many Keys specified:max 64 keys allowed.
[25 Feb 2010 6:04] krishna reddy
sql file consists the statements to test this bug.

Attachment: test_foreign_key_limit.sql (application/octet-stream, text), 11.35 KiB.

[3 Mar 2010 12:26] krishna reddy
Hi,

I am getting the error while adding the foreign key constraints to the table columns.Here
One of my table of DB Engine type InnoDB having more than 64 foreign keys.

Error is Too Many Keys specified:max 64 keys allowed.
[4 Mar 2010 4:49] krishna reddy
Hi,

what will be the maximum limit for foreign keys to be created for a table?
[17 Mar 2010 10:17] krishna reddy
Hi,

what will be the maximum limit for foreign keys to be created for a table?