ofbiz-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (Jira)" <j...@apache.org>
Subject [jira] [Commented] (OFBIZ-5426) mysql: ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes
Date Mon, 23 Mar 2020 11:40:00 GMT

    [ https://issues.apache.org/jira/browse/OFBIZ-5426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17064734#comment-17064734
] 

ASF subversion and git services commented on OFBIZ-5426:
--------------------------------------------------------

Commit 91673f1b419b8e87552ddc692ae904fd28cd29d4 in ofbiz-framework's branch refs/heads/trunk
from Pawan Verma
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=91673f1 ]

Fixed: Specified key was too long; max key length is 767 bytes for ProductPromoCodeEmail entity.(OFBIZ-5426)
(#44)

* Fixed: Specified key was too long; max key length is 767 bytes for ProductPromoCodeEmail
entity.
(OFBIZ-5426)

The problem is in the entity model. An email address should not be used in the primary key
- mainly because an email address is case-insensitive. A better design would be to use the
email address contact mechanism ID in the primary key.

Done Following:
1. Changed Entity Name from ProductPromoCodeEmail to ProductPromoCodeContMech
2. Related Changes for the entity name change
3. Migration service to migrate old data

Thanks, Leon for the report and Adrian Crum, Jacques Le Roux, Ingo Wolfmayr, Deepak Dixit,
Pierre Smits and Gil Portenseigne for the discussion and review.

* Improved: Added new line in service definition file and lincence in MigrationServices file.
(OFBIZ-5426)

Thanks, Jacopo for the review.

> mysql: ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes
> ----------------------------------------------------------------------------------
>
>                 Key: OFBIZ-5426
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5426
>             Project: OFBiz
>          Issue Type: Bug
>          Components: framework
>    Affects Versions: Trunk
>            Reporter: Leon
>            Assignee: Deepak Dixit
>            Priority: Major
>         Attachments: OFBIZ-5426.patch, OFBIZ-5426.patch, OFBIZ-5426.patch, OFBIZ-5426.patch,
OFBIZ-5426.patch
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Due to revision 1529838, the length of data type "email" was increased from 254 to 320.
But It makes the ofbiz failed to create tables such as "PRODUCT_PROMO_CODE_EMAIL" which includes
an email fields as its primary key.
> The database is mysql, innodb engine and utf8 charset. The error msg:
> ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes.
> I suggest to revert change of r1529838.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message