[
https://issues.apache.org/jira/browse/SENTRY-2024?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16225971#comment-16225971
]
Alexander Kolbasov commented on SENTRY-2024:
--------------------------------------------
None of the current .sql scripts use latin1 encoding - everything else uses
utf-8. Can you explain why this one should be treated not in the same way as
everything else?
> 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)