| Bug #6751 | The maximum key size is still 1024 bytes on InnoDB (mysql 4.1.7) | ||
|---|---|---|---|
| Submitted: | 22 Nov 2004 15:07 | Modified: | 22 Nov 2004 18:04 |
| Reporter: | Janne Hietamäki | Email Updates: | |
| Status: | Closed | Impact on me: | |
| Category: | MySQL Server: InnoDB storage engine | Severity: | S3 (Non-critical) |
| Version: | 4.1.7 | OS: | Linux (linux / Fedora core 3) |
| Assigned to: | CPU Architecture: | Any | |
[22 Nov 2004 15:07]
Janne Hietamäki
[22 Nov 2004 18:04]
Heikki Tuuri
Hi!
Thank you for the bug report. I have now updated the manual. Unfortunately, the global MySQL limit is still 1024 bytes per key. A problem in raising it is that MySQL stores key values in the stack, and stack consumption must be kept very low that you can create 10 000 connections = 10 000 threads in a 32-bit computer.
The InnoDB internal limit is 3500 bytes.
unireg.h:53:#define MAX_KEY_LENGTH 1024 /* max possible key */
handler.h:
uint max_key_length() const
{ return min(MAX_KEY_LENGTH, max_supported_key_length()); }
uint max_key_part_length() const
{ return min(MAX_KEY_LENGTH, max_supported_key_part_length()); }
ha_innodb.h:
uint max_supported_key_length() const { return 3500; }
uint max_supported_key_part_length() const { return 3500; }
