mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 14:03:07 +01:00
Fix for #7545: Server crash on some LockMemSize values
(cherry picked from commit 0e67aa86b8
)
This commit is contained in:
parent
df3d6b8c2f
commit
a72aea457e
@ -242,7 +242,7 @@ void Config::loadValues(const ConfigFile& file, const char* srcName)
|
||||
const ConfigFile::Parameter* par = file.findParameter(entry.key);
|
||||
|
||||
// Don't assign values to the global keys at non-default config
|
||||
if (par && (defaultConfig || !entry.is_global))
|
||||
if (par && (defaultConfig || !entry.is_global) && (par->hasValue || par->sub))
|
||||
{
|
||||
// Assign the actual value
|
||||
|
||||
@ -350,7 +350,7 @@ void Config::checkValues()
|
||||
|
||||
checkIntForLoBound(KEY_DEFAULT_DB_CACHE_PAGES, 0, true);
|
||||
|
||||
checkIntForLoBound(KEY_LOCK_MEM_SIZE, 64 * 1024, false);
|
||||
checkIntForLoBound(KEY_LOCK_MEM_SIZE, 256 * 1024, false);
|
||||
|
||||
const char* strVal = values[KEY_GC_POLICY].strVal;
|
||||
if (strVal)
|
||||
|
@ -305,6 +305,7 @@ ConfigFile::LineType ConfigFile::parseLine(const char* fileName, const String& i
|
||||
if (par.name.isEmpty()) // not good - no key
|
||||
return LINE_BAD;
|
||||
valStart = n + 1;
|
||||
par.hasValue = true;
|
||||
}
|
||||
else if (inString >= 2) // Something after the end of line
|
||||
return LINE_BAD;
|
||||
|
@ -78,10 +78,10 @@ public:
|
||||
{
|
||||
Parameter(MemoryPool& p, const Parameter& par)
|
||||
: AutoStorage(p), name(getPool(), par.name), value(getPool(), par.value),
|
||||
sub(par.sub), line(par.line)
|
||||
sub(par.sub), line(par.line), hasValue(par.hasValue)
|
||||
{ }
|
||||
Parameter()
|
||||
: AutoStorage(), name(getPool()), value(getPool()), sub(0), line(0)
|
||||
: AutoStorage(), name(getPool()), value(getPool()), sub(0), line(0), hasValue(false)
|
||||
{ }
|
||||
|
||||
SINT64 asInteger() const;
|
||||
@ -91,6 +91,7 @@ public:
|
||||
String value;
|
||||
Firebird::RefPtr<ConfigFile> sub;
|
||||
unsigned int line;
|
||||
bool hasValue;
|
||||
|
||||
static const KeyType* generate(const Parameter* item)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user