Bug #14381 Key length is limited to 255 bytes on BDB

Submitted: 27 Oct 2005 9:35 Modified: 1 Nov 2005 19:17
Reporter: Hakan Küçükyılmaz Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: BDB Severity:S4 (Feature request)
Version:5.0.16-debug-log OS:Linux (Linux)
Assigned to: Andrey Hristov CPU Architecture:Any

[27 Oct 2005 9:35] Hakan Küçükyılmaz
Description:
Key length is limited to 255 bytes on BerkeleyDB.

How to repeat:
USE test;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (
  a varchar(127)
) Engine BerkeleyDB CHARACTER SET utf8;

ALTER TABLE t1 ADD PRIMARY KEY (a);

Output:

[11:30] root@test>Use test;
DDatabase changed
5.0.16-debug-log
[11:30] root@test>DROP TABLE IF EXISTS t1;
CRQuery OK, 0 rows affected, 1 warning (0.00 sec)

5.0.16-debug-log
[11:30] root@test>CREATE TABLE t1 (
    ->   a varchar(127)
    -> ) Engine BerkeleyDB CHARACTER SET utf8;

ALTER TABLE t1 ADD PRIMARY KEY (a);Query OK, 0 rows affected (0.10 sec)

5.0.16-debug-log
[11:30] root@test>
5.0.16-debug-log
[11:30] root@test>ALTER TABLE t1 ADD PRIMARY KEY (a);
ERROR 1071 (42000): Specified key was too long; max key length is 255 bytes

Suggested fix:
Support longer key.
[31 Oct 2005 13:15] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/31683
[1 Nov 2005 19:17] Paul DuBois
Noted in 5.0.16 changelog.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.039 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.