提交 18755a14 编写于 作者: H hjxilinx

merge from develop

......@@ -583,7 +583,7 @@ data = c1.fetchall()
numOfRows = c1.rowcount
numOfCols = len(c1.description)
for irow in range(numOfRows):
print("Row%d: ts=%s, temperature=%d, humidity=%f" %(irow, data[irow][0], data[irow][1],data[irow][2])
print("Row%d: ts=%s, temperature=%d, humidity=%f" %(irow, data[irow][0], data[irow][1],data[irow][2]))
# use the cursor as an iterator to retrieve all returned results
c1.execute('select * from tb')
......
......@@ -579,7 +579,7 @@ data = c1.fetchall()
numOfRows = c1.rowcount
numOfCols = len(c1.description)
for irow in range(numOfRows):
print("Row%d: ts=%s, temperature=%d, humidity=%f" %(irow, data[irow][0], data[irow][1],data[irow][2])
print("Row%d: ts=%s, temperature=%d, humidity=%f" %(irow, data[irow][0], data[irow][1],data[irow][2]))
# 直接使用cursor 循环拉取查询结果
c1.execute('select * from tb')
......
......@@ -78,23 +78,24 @@ osinfo=$(cat /etc/os-release | grep "NAME" | cut -d '"' -f2)
#echo "osinfo: ${osinfo}"
os_type=0
if echo $osinfo | grep -qwi "ubuntu" ; then
echo "this is ubuntu system"
echo "This is ubuntu system"
os_type=1
elif echo $osinfo | grep -qwi "debian" ; then
echo "this is debian system"
echo "This is debian system"
os_type=1
elif echo $osinfo | grep -qwi "Kylin" ; then
echo "this is Kylin system"
echo "This is Kylin system"
os_type=1
elif echo $osinfo | grep -qwi "centos" ; then
echo "this is centos system"
echo "This is centos system"
os_type=2
elif echo $osinfo | grep -qwi "fedora" ; then
echo "this is fedora system"
echo "This is fedora system"
os_type=2
else
echo "this is other linux system"
os_type=0
echo "${osinfo}: This is an officially unverified linux system, If there are any problems with the installation and operation, "
echo "please feel free to contact taosdata.com for support."
os_type=1
fi
function kill_taosd() {
......
......@@ -105,10 +105,10 @@ if [ "$osType" != "Darwin" ]; then
echo "this is fedora system"
os_type=2
else
echo "this is other linux system"
os_type=0
echo "${osinfo}: This is an officially unverified linux system, If there are any problems with the installation and operation, "
echo "please feel free to contact taosdata.com for support."
os_type=1
fi
fi
function kill_taosd() {
......
......@@ -797,7 +797,10 @@ int32_t taosDumpTable(char *table, char *metric, struct arguments *arguments, FI
if (metric != NULL && metric[0] != '\0') { // dump metric definition
count = taosGetTableDes(metric, tableDes);
if (count < 0) return -1;
if (count < 0) {
free(tableDes);
return -1;
}
taosDumpCreateTableClause(tableDes, count, arguments, fp);
......@@ -805,18 +808,26 @@ int32_t taosDumpTable(char *table, char *metric, struct arguments *arguments, FI
count = taosGetTableDes(table, tableDes);
if (count < 0) return -1;
if (count < 0) {
free(tableDes);
return -1;
}
taosDumpCreateMTableClause(tableDes, metric, count, arguments, fp);
} else { // dump table definition
count = taosGetTableDes(table, tableDes);
if (count < 0) return -1;
if (count < 0) {
free(tableDes);
return -1;
}
taosDumpCreateTableClause(tableDes, count, arguments, fp);
}
free(tableDes);
return taosDumpTableData(fp, table, arguments);
}
......
......@@ -215,7 +215,7 @@ void vnodeCloseShellVnode(int vnode) {
if (shellList[vnode] == NULL) return;
for (int i = 0; i < vnodeList[vnode].cfg.maxSessions; ++i) {
vnodeFreeQInfo(shellList[vnode][i].qhandle, true);
vnodeDecRefCount(shellList[vnode][i].qhandle);
}
int32_t* v = malloc(sizeof(int32_t));
......@@ -369,8 +369,10 @@ int vnodeProcessQueryRequest(char *pMsg, int msgLen, SShellObj *pObj) {
if (pObj->qhandle) {
dTrace("QInfo:%p %s free qhandle", pObj->qhandle, __FUNCTION__);
vnodeFreeQInfo(pObj->qhandle, true);
void* qHandle = pObj->qhandle;
pObj->qhandle = NULL;
vnodeDecRefCount(qHandle);
}
if (QUERY_IS_STABLE_QUERY(pQueryMsg->queryType)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册