You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
fix(memory leaks): MCOL-5791 - get rid of memory leaks in plugin code (#3365)
There were numerous memory leaks in plugin's code and associated code. During typical run of MTR tests it leaked around 65 megabytes of objects. As a result they may severely affect long-lived connections. This patch fixes (almost) all leaks found in the plugin. The exceptions are two leaks associated with SHOW CREATE TABLE columnstore_table and getting information of columns of columnstore-handled table. These should be fixed on the server side and work is on the way.
This commit is contained in:
@ -344,7 +344,7 @@ bool anyRowInTable(string& schema, string& tableName, int sessionID)
|
||||
rowgroup::RGData rgData;
|
||||
ByteStream::quadbyte qb = 4;
|
||||
msg << qb;
|
||||
rowgroup::RowGroup* rowGroup = 0;
|
||||
std::shared_ptr<rowgroup::RowGroup> rowGroup = 0;
|
||||
bool anyRow = false;
|
||||
|
||||
exemgrClient->write(msg);
|
||||
@ -397,7 +397,7 @@ bool anyRowInTable(string& schema, string& tableName, int sessionID)
|
||||
if (!rowGroup)
|
||||
{
|
||||
// This is mete data
|
||||
rowGroup = new rowgroup::RowGroup();
|
||||
rowGroup.reset(new rowgroup::RowGroup());
|
||||
rowGroup->deserialize(msg);
|
||||
qb = 100;
|
||||
msg.restart();
|
||||
@ -515,7 +515,7 @@ bool anyTimestampColumn(string& schema, string& tableName, int sessionID)
|
||||
rowgroup::RGData rgData;
|
||||
ByteStream::quadbyte qb = 4;
|
||||
msg << qb;
|
||||
rowgroup::RowGroup* rowGroup = 0;
|
||||
std::shared_ptr<rowgroup::RowGroup> rowGroup = 0;
|
||||
bool anyRow = false;
|
||||
|
||||
exemgrClient->write(msg);
|
||||
@ -568,7 +568,7 @@ bool anyTimestampColumn(string& schema, string& tableName, int sessionID)
|
||||
if (!rowGroup)
|
||||
{
|
||||
// This is mete data
|
||||
rowGroup = new rowgroup::RowGroup();
|
||||
rowGroup.reset(new rowgroup::RowGroup());
|
||||
rowGroup->deserialize(msg);
|
||||
qb = 100;
|
||||
msg.restart();
|
||||
|
Reference in New Issue
Block a user