mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-02-02 10:00:38 +01:00
Task #7900 - Remove compatibility options MaxIdentifierByteLength and MaxIdentifierCharLength.
This commit is contained in:
parent
a7168913cc
commit
ccdc281dc5
@ -424,37 +424,6 @@
|
||||
#TempCacheLimit = 64M
|
||||
|
||||
|
||||
# ----------------------------
|
||||
# Maximum allowed identifier name length in bytes
|
||||
#
|
||||
# Sets a limit for the number of bytes in an identifier.
|
||||
#
|
||||
# Set to 31 to limit as Firebird 3.0 and previous versions. Setting
|
||||
# this value for all databases (including the security database) may
|
||||
# cause problems.
|
||||
#
|
||||
# Per-database configurable.
|
||||
#
|
||||
# Type: integer
|
||||
#
|
||||
#MaxIdentifierByteLength = 252
|
||||
|
||||
|
||||
# ----------------------------
|
||||
# Maximum allowed identifier name length in characters
|
||||
#
|
||||
# Sets a limit for the number of characters in an identifier.
|
||||
#
|
||||
# Setting this value for all databases (including the security database)
|
||||
# may cause problems.
|
||||
#
|
||||
# Per-database configurable.
|
||||
#
|
||||
# Type: integer
|
||||
#
|
||||
#MaxIdentifierCharLength = 63
|
||||
|
||||
|
||||
# ----------------------------
|
||||
# Threshold that controls whether to store non-key fields in the sort block or
|
||||
# refetch them from data pages after sorting.
|
||||
|
@ -397,12 +397,6 @@ void Config::checkValues()
|
||||
|
||||
checkIntForLoBound(KEY_FILESYSTEM_CACHE_THRESHOLD, 0, true);
|
||||
|
||||
checkIntForLoBound(KEY_MAX_IDENTIFIER_BYTE_LENGTH, 1, true);
|
||||
checkIntForHiBound(KEY_MAX_IDENTIFIER_BYTE_LENGTH, MAX_SQL_IDENTIFIER_LEN, true);
|
||||
|
||||
checkIntForLoBound(KEY_MAX_IDENTIFIER_CHAR_LENGTH, 1, true);
|
||||
checkIntForHiBound(KEY_MAX_IDENTIFIER_CHAR_LENGTH, METADATA_IDENTIFIER_CHAR_LEN, true);
|
||||
|
||||
checkIntForLoBound(KEY_SNAPSHOTS_MEM_SIZE, 1, true);
|
||||
checkIntForHiBound(KEY_SNAPSHOTS_MEM_SIZE, MAX_ULONG, true);
|
||||
|
||||
|
@ -171,8 +171,6 @@ enum ConfigKey
|
||||
KEY_REMOTE_ACCESS,
|
||||
KEY_IPV6_V6ONLY,
|
||||
KEY_WIRE_COMPRESSION,
|
||||
KEY_MAX_IDENTIFIER_BYTE_LENGTH,
|
||||
KEY_MAX_IDENTIFIER_CHAR_LENGTH,
|
||||
KEY_ENCRYPT_SECURITY_DATABASE,
|
||||
KEY_STMT_TIMEOUT,
|
||||
KEY_CONN_IDLE_TIMEOUT,
|
||||
@ -282,8 +280,6 @@ constexpr ConfigEntry entries[MAX_CONFIG_KEY] =
|
||||
{TYPE_BOOLEAN, "RemoteAccess", false, true},
|
||||
{TYPE_BOOLEAN, "IPv6V6Only", false, false},
|
||||
{TYPE_BOOLEAN, "WireCompression", false, false},
|
||||
{TYPE_INTEGER, "MaxIdentifierByteLength", false, (int)MAX_SQL_IDENTIFIER_LEN},
|
||||
{TYPE_INTEGER, "MaxIdentifierCharLength", false, (int)METADATA_IDENTIFIER_CHAR_LEN},
|
||||
{TYPE_BOOLEAN, "AllowEncryptedSecurityDatabase", false, false},
|
||||
{TYPE_INTEGER, "StatementTimeout", false, 0},
|
||||
{TYPE_INTEGER, "ConnectionIdleTimeout", false, 0},
|
||||
@ -594,10 +590,6 @@ public:
|
||||
|
||||
CONFIG_GET_PER_DB_BOOL(getWireCompression, KEY_WIRE_COMPRESSION);
|
||||
|
||||
CONFIG_GET_PER_DB_INT(getMaxIdentifierByteLength, KEY_MAX_IDENTIFIER_BYTE_LENGTH);
|
||||
|
||||
CONFIG_GET_PER_DB_INT(getMaxIdentifierCharLength, KEY_MAX_IDENTIFIER_CHAR_LENGTH);
|
||||
|
||||
CONFIG_GET_PER_DB_BOOL(getCryptSecurityDatabase, KEY_ENCRYPT_SECURITY_DATABASE);
|
||||
|
||||
// set in seconds
|
||||
|
@ -398,19 +398,6 @@ int Parser::yylexAux()
|
||||
Database* const dbb = tdbb->getDatabase();
|
||||
MemoryPool& pool = *tdbb->getDefaultPool();
|
||||
|
||||
unsigned maxByteLength, maxCharLength;
|
||||
|
||||
if (scratch->flags & DsqlCompilerScratch::FLAG_INTERNAL_REQUEST)
|
||||
{
|
||||
maxByteLength = MAX_SQL_IDENTIFIER_LEN;
|
||||
maxCharLength = METADATA_IDENTIFIER_CHAR_LEN;
|
||||
}
|
||||
else
|
||||
{
|
||||
maxByteLength = dbb->dbb_config->getMaxIdentifierByteLength();
|
||||
maxCharLength = dbb->dbb_config->getMaxIdentifierCharLength();
|
||||
}
|
||||
|
||||
SSHORT c = lex.ptr[-1];
|
||||
UCHAR tok_class = classes(c);
|
||||
char string[MAX_TOKEN_LEN];
|
||||
@ -434,7 +421,7 @@ int Parser::yylexAux()
|
||||
|
||||
check_bound(p, string);
|
||||
|
||||
if (p > string + maxByteLength || p > string + maxCharLength)
|
||||
if (p > string + MAX_SQL_IDENTIFIER_LEN || p > string + METADATA_IDENTIFIER_CHAR_LEN)
|
||||
yyabandon(yyposn, -104, isc_dyn_name_longer);
|
||||
|
||||
*p = 0;
|
||||
@ -560,7 +547,7 @@ int Parser::yylexAux()
|
||||
const unsigned charLength = metadataCharSet->length(
|
||||
name.length(), (const UCHAR*) name.c_str(), true);
|
||||
|
||||
if (name.length() > maxByteLength || charLength > maxCharLength)
|
||||
if (name.length() > MAX_SQL_IDENTIFIER_LEN || charLength > METADATA_IDENTIFIER_CHAR_LEN)
|
||||
yyabandon(yyposn, -104, isc_dyn_name_longer);
|
||||
|
||||
yylval.metaNamePtr = FB_NEW_POOL(pool) MetaName(pool, name);
|
||||
@ -1244,7 +1231,7 @@ int Parser::yylexAux()
|
||||
check_bound(p, string);
|
||||
*p = 0;
|
||||
|
||||
if (p > &string[maxByteLength] || p > &string[maxCharLength])
|
||||
if (p > &string[MAX_SQL_IDENTIFIER_LEN] || p > &string[METADATA_IDENTIFIER_CHAR_LEN])
|
||||
yyabandon(yyposn, -104, isc_dyn_name_longer);
|
||||
|
||||
const MetaName str(string, p - string);
|
||||
|
@ -61,8 +61,6 @@ const int TEMP_STR_LENGTH = 128;
|
||||
|
||||
// Metadata constants
|
||||
|
||||
// When changing these constants, change MaxIdentifierByteLength and MaxIdentifierCharLength in
|
||||
// firebird.conf too.
|
||||
const unsigned METADATA_IDENTIFIER_CHAR_LEN = 63;
|
||||
const unsigned METADATA_BYTES_PER_CHAR = 4;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user