Skip to content

Commit 136c691

Browse files
committed
Rollback change to length validation in create table
1 parent 9878bcd commit 136c691

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/java/org/apache/cassandra/cql3/statements/schema/CreateTableStatement.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public void validate(QueryState state)
109109
{
110110
super.validate(state);
111111

112-
if (!state.getClientState().isInternal && tableName.length() + keyspaceName.length() > SchemaConstants.NAME_LENGTH)
112+
if (!state.getClientState().isInternal && tableName.length() > SchemaConstants.NAME_LENGTH - keyspaceName.length())
113113
throw ire("Keyspace and table names combined shouldn't be more than %s characters long (got keyspace of %s chars and table of %s chars for %s.%s)",
114114
SchemaConstants.NAME_LENGTH, keyspaceName.length(), tableName.length(), keyspaceName, tableName);
115115

0 commit comments

Comments
 (0)