mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-4.1' into cassandra-5.0
This commit is contained in:
commit
5ea935d6b8
|
|
@ -23,8 +23,10 @@ include::cassandra:example$BNF/ks_table.bnf[]
|
||||||
----
|
----
|
||||||
|
|
||||||
Both keyspace and table name should be comprised of only alphanumeric
|
Both keyspace and table name should be comprised of only alphanumeric
|
||||||
characters, cannot be empty and are limited in size to 48 characters
|
or underscore characters and cannot be empty.
|
||||||
(that limit exists mostly to avoid filenames (which may include the
|
Keyspace name is limited in size to 48 characters, while
|
||||||
|
table name is limited in size to 222 characters
|
||||||
|
(those limits exist mostly to avoid filenames (which may include the
|
||||||
keyspace and table name) to go over the limits of certain file systems).
|
keyspace and table name) to go over the limits of certain file systems).
|
||||||
By default, keyspace and table names are case-insensitive (`myTable` is
|
By default, keyspace and table names are case-insensitive (`myTable` is
|
||||||
equivalent to `mytable`) but case sensitivity can be forced by using
|
equivalent to `mytable`) but case sensitivity can be forced by using
|
||||||
|
|
|
||||||
|
|
@ -112,6 +112,9 @@ public class CreateTableValidationTest extends CQLTester
|
||||||
String tableName = "t".repeat(FILENAME_LENGTH - tableIdSuffix);
|
String tableName = "t".repeat(FILENAME_LENGTH - tableIdSuffix);
|
||||||
String tooLongTableName = "l".repeat(FILENAME_LENGTH - tableIdSuffix + 1);
|
String tooLongTableName = "l".repeat(FILENAME_LENGTH - tableIdSuffix + 1);
|
||||||
|
|
||||||
|
// Assert that the documented value of 222 corresponds to the actual constant.
|
||||||
|
assertThat(TABLE_NAME_LENGTH).isEqualTo(222);
|
||||||
|
|
||||||
execute(String.format("CREATE KEYSPACE %s with replication = " +
|
execute(String.format("CREATE KEYSPACE %s with replication = " +
|
||||||
"{ 'class' : 'SimpleStrategy', 'replication_factor' : 1 }",
|
"{ 'class' : 'SimpleStrategy', 'replication_factor' : 1 }",
|
||||||
keyspaceName));
|
keyspaceName));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue