Bug #32475 ALTER TABLE: too many warnings on index creation

Submitted: 18 Nov 2007 3:16 Modified: 8 Oct 2008 19:37
Reporter: Paul DuBois Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Errors Severity:S3 (Non-critical)
Version:5.1, 6.0 OS:Any
Assigned to: Assigned Account CPU Architecture:Any

[18 Nov 2007 3:16] Paul DuBois
Description:
MyISAM allows index prefixes to be up to 1000 bytes, and longer prefixes generate a warning. But whereas in 5.0 one warning, in 5.1 and 6.0, two and three identical warnings are generated, respectively!

How to repeat:
Test script:

drop table if exists t;
create table t (b blob);
alter table t add index (b(1001));
show warnings;

Result in 5.0.52:

+---------+------+----------------------------------------------------------+
| Level   | Code | Message                                                  |
+---------+------+----------------------------------------------------------+
| Warning | 1071 | Specified key was too long; max key length is 1000 bytes | 
+---------+------+----------------------------------------------------------+

Result in 5.1.23:

+---------+------+----------------------------------------------------------+
| Level   | Code | Message                                                  |
+---------+------+----------------------------------------------------------+
| Warning | 1071 | Specified key was too long; max key length is 1000 bytes | 
| Warning | 1071 | Specified key was too long; max key length is 1000 bytes | 
+---------+------+----------------------------------------------------------+

Result in 6.0.4:

+---------+------+----------------------------------------------------------+
| Level   | Code | Message                                                  |
+---------+------+----------------------------------------------------------+
| Warning | 1071 | Specified key was too long; max key length is 1000 bytes | 
| Warning | 1071 | Specified key was too long; max key length is 1000 bytes | 
| Warning | 1071 | Specified key was too long; max key length is 1000 bytes | 
+---------+------+----------------------------------------------------------+

Suggested fix:
I think a single warning should be sufficient. :-)
[18 Nov 2007 10:09] MySQL Verification Team
Thank you for the bug report. Verified as described.
[8 Oct 2008 19:37] Konstantin Osipov
Duplicate of Bug#31149

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

Page generated in 0.050 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.