未验证 提交 67c148ec 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #2161 from taosdata/bugfix/#530

Bugfix/#530
......@@ -413,5 +413,5 @@ if __name__ == '__main__':
print(data)
cinter.freeresult(result)
cinter.freeResult(result)
cinter.close(conn)
\ No newline at end of file
......@@ -93,7 +93,6 @@ class TDengineCursor(object):
if self._connection is None:
return False
self._connection.clear_result_set()
self._reset_result()
self._connection = None
......@@ -109,7 +108,6 @@ class TDengineCursor(object):
# TODO : change the exception raised here
raise ProgrammingError("Cursor is not connected")
self._connection.clear_result_set()
self._reset_result()
stmt = operation
......@@ -202,7 +200,6 @@ class TDengineCursor(object):
for i in range(len(self._fields)):
buffer[i].extend(block[i])
self._connection.clear_result_set()
return list(map(tuple, zip(*buffer)))
......@@ -222,6 +219,8 @@ class TDengineCursor(object):
"""
self._description = None
self._rowcount = -1
if self._result is not None:
CTaosInterface.freeResult(self._result)
self._result = None
self._fields = None
self._block = None
......
......@@ -413,5 +413,5 @@ if __name__ == '__main__':
print(data)
cinter.freeresult(result)
cinter.freeResult(result)
cinter.close(conn)
\ No newline at end of file
......@@ -95,7 +95,6 @@ class TDengineCursor(object):
if self._connection is None:
return False
self._connection.clear_result_set()
self._reset_result()
self._connection = None
......@@ -111,7 +110,6 @@ class TDengineCursor(object):
# TODO : change the exception raised here
raise ProgrammingError("Cursor is not connected")
self._connection.clear_result_set()
self._reset_result()
stmt = operation
......@@ -204,8 +202,6 @@ class TDengineCursor(object):
for i in range(len(self._fields)):
buffer[i].extend(block[i])
self._connection.clear_result_set()
return list(map(tuple, zip(*buffer)))
def nextset(self):
......@@ -224,6 +220,8 @@ class TDengineCursor(object):
"""
self._description = None
self._rowcount = -1
if self._result is not None:
CTaosInterface.freeResult(self._result)
self._result = None
self._fields = None
self._block = None
......@@ -240,3 +238,4 @@ class TDengineCursor(object):
(ele['name'], ele['type'], None, None, None, None, False))
return self._result
......@@ -413,5 +413,5 @@ if __name__ == '__main__':
print(data)
cinter.freeresult(result)
cinter.freeResult(result)
cinter.close(conn)
\ No newline at end of file
......@@ -86,7 +86,6 @@ class TDengineCursor(object):
if self._connection is None:
return False
self._connection.clear_result_set()
self._reset_result()
self._connection = None
......@@ -102,7 +101,6 @@ class TDengineCursor(object):
# TODO : change the exception raised here
raise ProgrammingError("Cursor is not connected")
self._connection.clear_result_set()
self._reset_result()
stmt = operation
......@@ -149,7 +147,6 @@ class TDengineCursor(object):
for i in range(len(self._fields)):
buffer[i].extend(block[i])
self._connection.clear_result_set()
return list(map(tuple, zip(*buffer)))
......@@ -171,6 +168,8 @@ class TDengineCursor(object):
"""
self._description = None
self._rowcount = -1
if self._result is not None:
CTaosInterface.freeResult(self._result)
self._result = None
self._fields = None
self._block = None
......
......@@ -413,5 +413,5 @@ if __name__ == '__main__':
print(data)
cinter.freeresult(result)
cinter.freeResult(result)
cinter.close(conn)
\ No newline at end of file
......@@ -86,7 +86,6 @@ class TDengineCursor(object):
if self._connection is None:
return False
self._connection.clear_result_set()
self._reset_result()
self._connection = None
......@@ -102,7 +101,6 @@ class TDengineCursor(object):
# TODO : change the exception raised here
raise ProgrammingError("Cursor is not connected")
self._connection.clear_result_set()
self._reset_result()
stmt = operation
......@@ -149,7 +147,6 @@ class TDengineCursor(object):
for i in range(len(self._fields)):
buffer[i].extend(block[i])
self._connection.clear_result_set()
return list(map(tuple, zip(*buffer)))
......@@ -171,6 +168,8 @@ class TDengineCursor(object):
"""
self._description = None
self._rowcount = -1
if self._result is not None:
CTaosInterface.freeResult(self._result)
self._result = None
self._fields = None
self._block = None
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册