You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-07 03:22:57 +03:00
MCOL-1847. Made the field parsing a little more paranoid.
This commit is contained in:
@@ -526,16 +526,20 @@ int main(int argc, char* argv[])
|
|||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
if (temp > 0)
|
bool cacheInMB = false;
|
||||||
|
if (temp > 0) {
|
||||||
BRPBlocksPct = temp;
|
BRPBlocksPct = temp;
|
||||||
/* MCOL-1847. Did the user specify this in MB or GB? */
|
/* MCOL-1847. Did the user specify this in MB or GB? */
|
||||||
int len = strBlockPct.length();
|
int len = strBlockPct.length();
|
||||||
if (strBlockPct[len-1] == 'g' || strBlockPct[len-1] == 'm')
|
if (strBlockPct[len-1] == 'g' || strBlockPct[len-1] == 'm')
|
||||||
{
|
{
|
||||||
if (strBlockPct[len-1] == 'g')
|
if (strBlockPct[len-1] == 'g')
|
||||||
BRPBlocksPct *= 1024;
|
BRPBlocksPct *= 1024;
|
||||||
BRPBlocks = BRPBlocksPct * 128; // 128 blocks per MB
|
cacheInMB = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
if (cacheInMB)
|
||||||
|
BRPBlocks = BRPBlocksPct * 128; // 128 blocks per MB
|
||||||
else
|
else
|
||||||
BRPBlocks = ((BRPBlocksPct / 100.0) * (double) cg.getTotalMemory()) / 8192;
|
BRPBlocks = ((BRPBlocksPct / 100.0) * (double) cg.getTotalMemory()) / 8192;
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user