Na Li created SENTRY-2024:
-----------------------------
Summary: 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
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)