You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@sentry.apache.org by "Na Li (JIRA)" <ji...@apache.org> on 2017/09/01 17:56:00 UTC

[jira] [Commented] (SENTRY-1894) Update field size in package.jdo for dataNucleus to match size in sql

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

Na Li commented on SENTRY-1894:
-------------------------------

[~akolb] in SQL script, the first 250 chars are used in unique index. But in package.jdo, we don't know how to use the first 250 chars of URI in the unique index. And both unique indexes in jdo and sql are inserted into the table. So I think it should be OK to remove the unique index "PRIVILEGE_INDEX" from "MSentryPrivilege" at jdo 

> Update field size in package.jdo for dataNucleus to match size in sql
> ---------------------------------------------------------------------
>
>                 Key: SENTRY-1894
>                 URL: https://issues.apache.org/jira/browse/SENTRY-1894
>             Project: Sentry
>          Issue Type: Bug
>          Components: Sentry
>    Affects Versions: 2.0.0
>            Reporter: Na Li
>            Assignee: Na Li
>         Attachments: SENTRY-1894.001.patch, SENTRY-1894.002.patch, SENTRY-1894.003.patch, SENTRY-1894.004.patch
>
>
> The unique index (`SERVER_NAME`,`DB_NAME`,`TABLE_NAME`,`COLUMN_NAME`,`URI`,`ACTION`,`WITH_GRANT_OPTION`)" in `SENTRY_DB_PRIVILEGE` at package.jdo file is too large. When running datanucleus schema tool, it complains "com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was too long; max key length is 767 bytes"
> The size of the fields `SERVER_NAME`,`DB_NAME`,`TABLE_NAME`,`COLUMN_NAME` are 4000, but the corresponding size in sql is only 128.
> We should match the size defined in package.jdo to what's in sql script, and remove `URI` from being part of the unique id. After those change, the datanucleus schema tool finishes successfully with command "mvn datanucleus:schema-create -X -e"



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)