Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#5498] improvement(storage): Modify the length limit of privileges column #5500

Merged
merged 2 commits into from
Nov 11, 2024

Conversation

jerqi
Copy link
Contributor

@jerqi jerqi commented Nov 7, 2024

What changes were proposed in this pull request?

Modify the length limit of privileges column
According to the privilege interface, our privilege max value is 64 * 64. Every privilege name is about 14 character. So I use 64* 64 * 20 as new length limit.

Why are the changes needed?

Fix: #5498

Does this PR introduce any user-facing change?

No.

How was this patch tested?

Manual test.

@jerqi jerqi marked this pull request as draft November 7, 2024 07:10
@jerqi jerqi self-assigned this Nov 7, 2024
@jerqi jerqi requested a review from yuqi1129 November 7, 2024 08:39
-- specific language governing permissions and limitations
-- under the License.
--
ALTER TABLE role_meta_securable_object ALTER COLUMN privilege_names TYPE VARCHAR(81920);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any difference between VARCHAR and TEXT for PG?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PG can't use TEXT. I try TEXT. It throws an error.

@jerqi jerqi marked this pull request as ready for review November 7, 2024 09:41
@jerryshao jerryshao requested a review from yuqi1129 November 8, 2024 06:02
@jerryshao
Copy link
Contributor

You should have a test to cover your fix at least.

@jerqi
Copy link
Contributor Author

jerqi commented Nov 8, 2024

You should have a test to cover your fix at least.

OK, my origin test case leave a privilege. I added it.

@jerryshao jerryshao merged commit c0502f1 into apache:main Nov 11, 2024
26 checks passed
@jerqi jerqi deleted the ISSUE-5498 branch November 11, 2024 06:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug report] Value too long for column "PRIVILEGE_NAMES VARCHAR(256)"
3 participants