提交 4b78fd4e 编写于 作者: S Steve Yurong Su

[ISSUE-3690] Memory leaks on the server when cpp client invokes checkTimeseriesExists

上级 3a6a8619
......@@ -1020,8 +1020,10 @@ void Session::createMultiTimeseries(vector <string> paths, vector <TSDataType::T
bool Session::checkTimeseriesExists(string path) {
try {
string sql = "SHOW TIMESERIES " + path;
return executeQueryStatement(sql)->hasNext();
std::unique_ptr <SessionDataSet> dataset = executeQueryStatement("SHOW TIMESERIES " + path);
bool isExisted = dataset->hasNext();
dataset->closeOperationHandle();
return isExisted;
}
catch (exception e) {
throw IoTDBConnectionException(e.what());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册