mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 18:03:04 +01:00
Backported fix for #7545: Server crash on some LockMemSize values
This commit is contained in:
parent
d53aa4985b
commit
ad00203c1e
@ -286,7 +286,7 @@ void Config::loadValues(const ConfigFile& file)
|
|||||||
const ConfigEntry& entry = entries[i];
|
const ConfigEntry& entry = entries[i];
|
||||||
const ConfigFile::Parameter* par = file.findParameter(entry.key);
|
const ConfigFile::Parameter* par = file.findParameter(entry.key);
|
||||||
|
|
||||||
if (par)
|
if (par && (par->hasValue || par->sub))
|
||||||
{
|
{
|
||||||
// Assign the actual value
|
// Assign the actual value
|
||||||
|
|
||||||
@ -505,8 +505,8 @@ int Config::getDummyPacketInterval() const
|
|||||||
int Config::getLockMemSize() const
|
int Config::getLockMemSize() const
|
||||||
{
|
{
|
||||||
int size = get<int>(KEY_LOCK_MEM_SIZE);
|
int size = get<int>(KEY_LOCK_MEM_SIZE);
|
||||||
if (size < 64 * 1024)
|
if (size < 256 * 1024)
|
||||||
size = 64 * 1024;
|
size = 256 * 1024;
|
||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -305,6 +305,7 @@ ConfigFile::LineType ConfigFile::parseLine(const char* fileName, const String& i
|
|||||||
if (par.name.isEmpty()) // not good - no key
|
if (par.name.isEmpty()) // not good - no key
|
||||||
return LINE_BAD;
|
return LINE_BAD;
|
||||||
valStart = n + 1;
|
valStart = n + 1;
|
||||||
|
par.hasValue = true;
|
||||||
}
|
}
|
||||||
else if (inString >= 2) // Something after the end of line
|
else if (inString >= 2) // Something after the end of line
|
||||||
return LINE_BAD;
|
return LINE_BAD;
|
||||||
|
@ -77,10 +77,10 @@ public:
|
|||||||
{
|
{
|
||||||
Parameter(MemoryPool& p, const Parameter& par)
|
Parameter(MemoryPool& p, const Parameter& par)
|
||||||
: AutoStorage(p), name(getPool(), par.name), value(getPool(), par.value),
|
: 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()
|
Parameter()
|
||||||
: AutoStorage(), name(getPool()), value(getPool()), sub(0), line(0)
|
: AutoStorage(), name(getPool()), value(getPool()), sub(0), line(0), hasValue(false)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
SINT64 asInteger() const;
|
SINT64 asInteger() const;
|
||||||
@ -90,6 +90,7 @@ public:
|
|||||||
String value;
|
String value;
|
||||||
Firebird::RefPtr<ConfigFile> sub;
|
Firebird::RefPtr<ConfigFile> sub;
|
||||||
unsigned int line;
|
unsigned int line;
|
||||||
|
bool hasValue;
|
||||||
|
|
||||||
static const KeyType* generate(const Parameter* item)
|
static const KeyType* generate(const Parameter* item)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user