You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-02 17:46:37 +03:00
fix(memory leaks): MCOL-5791 - get rid of memory leaks in plugin code
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:
committed by
Sergey Zefirov
parent
6445f4dff3
commit
38fd96a663
@ -34,7 +34,7 @@ int ddldebug = 0;
|
||||
int lineno = 1;
|
||||
void ddlerror(struct pass_to_bison* x, char const *s);
|
||||
|
||||
static char* scanner_copy(char *str, yyscan_t yyscanner, copy_action_t action = NOOP );
|
||||
static char* scanner_copy(const char *str, yyscan_t yyscanner, copy_action_t action = NOOP );
|
||||
|
||||
%}
|
||||
|
||||
@ -115,9 +115,9 @@ CONSTRAINT {return CONSTRAINT;}
|
||||
CONSTRAINTS {return CONSTRAINTS;}
|
||||
CREATE {return CREATE;}
|
||||
CURRENT_USER {return CURRENT_USER;}
|
||||
DATE {ddlget_lval(yyscanner)->str=strdup("date"); return DATE;}
|
||||
DATE {ddlget_lval(yyscanner)->str = scanner_copy("date", yyscanner); return DATE;}
|
||||
DATETIME {return DATETIME;}
|
||||
TIME {ddlget_lval(yyscanner)->str=strdup("time"); return TIME;}
|
||||
TIME {ddlget_lval(yyscanner)->str = scanner_copy("time", yyscanner); return TIME;}
|
||||
TIMESTAMP {return TIMESTAMP;}
|
||||
DECIMAL {return DECIMAL;}
|
||||
DEC {return DECIMAL;}
|
||||
@ -276,7 +276,7 @@ void scanner_finish(yyscan_t yyscanner)
|
||||
pScanData->valbuf.clear();
|
||||
}
|
||||
|
||||
char* scanner_copy (char *str, yyscan_t yyscanner, copy_action_t action)
|
||||
char* scanner_copy (const char *str, yyscan_t yyscanner, copy_action_t action)
|
||||
{
|
||||
char* result;
|
||||
char* nv = strdup(str);
|
||||
|
Reference in New Issue
Block a user