[
https://issues.apache.org/jira/browse/SENTRY-2024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16225954#comment-16225954
]
Na Li commented on SENTRY-2024:
-------------------------------
[~akolb] I checked the tables, CREATE TABLE AUTHZ_PATHS_MAPPING is the only one
that we need to specify the char set for its field.
Can you be more specific on what consistency you mean?
> Specify Char Set for AUTHZ_OBJ_NAME
> -----------------------------------
>
> Key: SENTRY-2024
> URL: https://issues.apache.org/jira/browse/SENTRY-2024
> Project: Sentry
> Issue Type: Bug
> Components: Sentry
> Affects Versions: 2.0.0
> Reporter: Na Li
> Assignee: Na Li
> Priority: Critical
> Attachments: SENTRY-2024.001.patch, SENTRY-2024.001.patch
>
>
> AUTHZ_OBJ_NAME has (384) chars. If its table char set is utf8, the constrain
> AUTHZOBJNAME will have error "Specified key was too long; max key length is
> 767 bytes"
> The solution is to specify the char set for this field, so it works for mysql
> regardless the char set of its table or DB.
> Reference:
> CREATE TABLE AUTHZ_PATHS_MAPPING
> (
> AUTHZ_OBJ_ID BIGINT NOT NULL generated always as identity (start with 1),
> AUTHZ_OBJ_NAME VARCHAR({color:red}384{color}),
> CREATE_TIME_MS BIGINT NOT NULL
> );
> CREATE UNIQUE INDEX AUTHZOBJNAME ON AUTHZ_PATHS_MAPPING
> ({color:red}AUTHZ_OBJ_NAME{color});
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)