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

[Bug]: alter table statement can add a primary key of more than 64 columns to a table #1975

Open
lyukun opened this issue May 20, 2024 · 0 comments
Assignees
Labels
type: bug Something isn't working

Comments

@lyukun
Copy link

lyukun commented May 20, 2024

Describe the bug

lter table statement can add a primary key of more than 64 columns to a table , but it shouldn't
Environment

observer (OceanBase 4.2.1.3)

REVISION: 1-598ce455d69891af710390a3ccb9b09af1c66d4b
BUILD_BRANCH: drop_col_instant_oracle
BUILD_TIME: Jan 3 2024 20:54:19
BUILD_FLAGS: RelWithDebInfo
BUILD_INFO: jenkins-oceanbase_build_4_2_1_drop_col_instant_oracle-B6

Copyright (c) 2011-present OceanBase Inc.
Fast Reproduce Steps(Required)

Steps to reproduce the behavior:
create table t1(c0 int, c1 int, c2 int, c3 int, c4 int, c5 int, c6 int, c7 int, c8 int, c9 int, c10 int, c11 int, c12 int, c13 int, c14 int, c15 int, c16 int, c17 int, c18 int, c19 int, c20 int, c21 int, c22 int, c23 int, c24 int, c25 int, c26 int, c27 int, c28 int, c29 int, c30 int, c31 int, c32 int, c33 int, c34 int, c35 int, c36 int, c37 int, c38 int, c39 int, c40 int, c41 int, c42 int, c43 int, c44 int, c45 int, c46 int, c47 int, c48 int, c49 int, c50 int, c51 int, c52 int, c53 int, c54 int, c55 int, c56 int, c57 int, c58 int, c59 int, c60 int, c61 int, c62 int, c63 int, c64 int, c65 int, c66 int, c67 int, c68 int, c69 int, c70 int, c71 int, c72 int, c73 int, c74 int, c75 int, c76 int, c77 int, c78 int, primary key (c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16,c17,c18,c19,c20,c21,c22,c23,c24,c25,c26,c27,c28,c29,c30,c31,c32,c33,c34,c35,c36,c37,c38,c39,c40,c41,c42,c43,c44,c45,c46,c47,c48,c49,c50,c51,c52,c53,c54,c55,c56,c57,c58,c59,c60,c61,c62,c63,c64));
alter table t1 drop primary key;

// alter pk column count to > 64 is also not allowed
alter table t1 add primary key (c1,c2,c3,c4,c5,c6,c7,c8,c9,c10,c11,c12,c13,c14,c15,c16,c17,c18,c19,c20,c21,c22,c23,c24,c25,c26,c27,c28,c29,c30,c31,c32,c33,c34,c35,c36,c37,c38,c39,c40,c41,c42,c43,c44,c45,c46,c47,c48,c49,c50,c51,c52,c53,c54,c55,c56,c57,c58,c59,c60,c61,c62,c63,c64,c65,c66,c67,c68,c69,c70);

Expected behavior

erorr 1070
Actual Behavior
the last ddl statement above succeeds

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant