Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
e491a890
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1187
Star
22018
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
e491a890
编写于
10月 20, 2020
作者:
B
Bomin Zhang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix TD-1471
上级
55b07abe
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
93 addition
and
6 deletion
+93
-6
src/client/src/tscSql.c
src/client/src/tscSql.c
+5
-2
src/connector/python/linux/python2/taos/cursor.py
src/connector/python/linux/python2/taos/cursor.py
+4
-2
src/connector/python/linux/python3/taos/cursor.py
src/connector/python/linux/python3/taos/cursor.py
+4
-2
src/connector/python/windows/python2/taos/cursor.py
src/connector/python/windows/python2/taos/cursor.py
+3
-0
src/connector/python/windows/python3/taos/cursor.py
src/connector/python/windows/python3/taos/cursor.py
+3
-0
tests/pytest/fulltest.sh
tests/pytest/fulltest.sh
+1
-0
tests/pytest/query/bug1471.py
tests/pytest/query/bug1471.py
+73
-0
未找到文件。
src/client/src/tscSql.c
浏览文件 @
e491a890
...
...
@@ -479,8 +479,11 @@ TAOS_ROW taos_fetch_row(TAOS_RES *res) {
SSqlCmd
*
pCmd
=
&
pSql
->
cmd
;
SSqlRes
*
pRes
=
&
pSql
->
res
;
if
(
pRes
->
qhandle
==
0
||
pRes
->
code
==
TSDB_CODE_TSC_QUERY_CANCELLED
||
if
(
pRes
->
qhandle
==
0
)
{
pRes
->
code
=
TSDB_CODE_TSC_INVALID_QHANDLE
;
return
NULL
;
}
if
(
pRes
->
code
==
TSDB_CODE_TSC_QUERY_CANCELLED
||
pCmd
->
command
==
TSDB_SQL_RETRIEVE_EMPTY_RESULT
||
pCmd
->
command
==
TSDB_SQL_INSERT
)
{
return
NULL
;
...
...
src/connector/python/linux/python2/taos/cursor.py
浏览文件 @
e491a890
...
...
@@ -192,8 +192,10 @@ class TDengineCursor(object):
buffer
=
[[]
for
i
in
range
(
len
(
self
.
_fields
))]
self
.
_rowcount
=
0
while
True
:
block
,
num_of_fields
=
CTaosInterface
.
fetchBlock
(
self
.
_result
,
self
.
_fields
)
block
,
num_of_fields
=
CTaosInterface
.
fetchBlock
(
self
.
_result
,
self
.
_fields
)
errno
=
CTaosInterface
.
libtaos
.
taos_errno
(
self
.
_result
)
if
errno
!=
0
:
raise
ProgrammingError
(
CTaosInterface
.
errStr
(
self
.
_result
),
errno
)
if
num_of_fields
==
0
:
break
self
.
_rowcount
+=
num_of_fields
...
...
src/connector/python/linux/python3/taos/cursor.py
浏览文件 @
e491a890
...
...
@@ -207,8 +207,10 @@ class TDengineCursor(object):
buffer
=
[[]
for
i
in
range
(
len
(
self
.
_fields
))]
self
.
_rowcount
=
0
while
True
:
block
,
num_of_fields
=
CTaosInterface
.
fetchBlock
(
self
.
_result
,
self
.
_fields
)
block
,
num_of_fields
=
CTaosInterface
.
fetchBlock
(
self
.
_result
,
self
.
_fields
)
errno
=
CTaosInterface
.
libtaos
.
taos_errno
(
self
.
_result
)
if
errno
!=
0
:
raise
ProgrammingError
(
CTaosInterface
.
errStr
(
self
.
_result
),
errno
)
if
num_of_fields
==
0
:
break
self
.
_rowcount
+=
num_of_fields
...
...
src/connector/python/windows/python2/taos/cursor.py
浏览文件 @
e491a890
...
...
@@ -142,6 +142,9 @@ class TDengineCursor(object):
self
.
_rowcount
=
0
while
True
:
block
,
num_of_fields
=
CTaosInterface
.
fetchBlock
(
self
.
_result
,
self
.
_fields
)
errno
=
CTaosInterface
.
libtaos
.
taos_errno
(
self
.
_result
)
if
errno
!=
0
:
raise
ProgrammingError
(
CTaosInterface
.
errStr
(
self
.
_result
),
errno
)
if
num_of_fields
==
0
:
break
self
.
_rowcount
+=
num_of_fields
for
i
in
range
(
len
(
self
.
_fields
)):
...
...
src/connector/python/windows/python3/taos/cursor.py
浏览文件 @
e491a890
...
...
@@ -142,6 +142,9 @@ class TDengineCursor(object):
self
.
_rowcount
=
0
while
True
:
block
,
num_of_fields
=
CTaosInterface
.
fetchBlock
(
self
.
_result
,
self
.
_fields
)
errno
=
CTaosInterface
.
libtaos
.
taos_errno
(
self
.
_result
)
if
errno
!=
0
:
raise
ProgrammingError
(
CTaosInterface
.
errStr
(
self
.
_result
),
errno
)
if
num_of_fields
==
0
:
break
self
.
_rowcount
+=
num_of_fields
for
i
in
range
(
len
(
self
.
_fields
)):
...
...
tests/pytest/fulltest.sh
浏览文件 @
e491a890
...
...
@@ -149,6 +149,7 @@ python3 ./test.py -f query/queryNullValueTest.py
python3 ./test.py
-f
query/queryInsertValue.py
python3 ./test.py
-f
query/queryConnection.py
python3 ./test.py
-f
query/natualInterval.py
python3 ./test.py
-f
query/bug1471.py
#stream
python3 ./test.py
-f
stream/metric_1.py
...
...
tests/pytest/query/bug1471.py
0 → 100644
浏览文件 @
e491a890
###################################################################
# Copyright (c) 2016 by TAOS Technologies, Inc.
# All rights reserved.
#
# This file is proprietary and confidential to TAOS Technologies.
# No part of this file may be reproduced, stored, transmitted,
# disclosed or used in any form or by any means other than as
# expressly provided by the written permission from Jianhui Tao
#
###################################################################
# -*- coding: utf-8 -*-
import
sys
import
taos
from
util.log
import
*
from
util.cases
import
*
from
util.sql
import
*
import
time
import
threading
class
myThread
(
threading
.
Thread
):
def
__init__
(
self
,
conn
):
threading
.
Thread
.
__init__
(
self
)
self
.
event
=
threading
.
Event
()
self
.
conn
=
taos
.
connect
(
conn
.
_host
,
port
=
conn
.
_port
,
config
=
conn
.
_config
)
def
run
(
self
):
cur
=
self
.
conn
.
cursor
()
self
.
event
.
wait
()
cur
.
execute
(
"drop database db"
)
cur
.
close
()
self
.
conn
.
close
()
class
TDTestCase
:
def
init
(
self
,
conn
,
logSql
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
def
run
(
self
):
for
i
in
range
(
50
):
print
(
"round"
,
i
)
thread
=
myThread
(
tdSql
.
cursor
.
_connection
)
thread
.
start
()
tdSql
.
execute
(
'reset query cache'
)
tdSql
.
execute
(
'drop database if exists db'
)
tdSql
.
execute
(
'create database db'
)
tdSql
.
execute
(
'use db'
)
tdSql
.
execute
(
"create table car (ts timestamp, s int)"
)
tdSql
.
execute
(
"insert into car values('2020-10-19 17:00:00', 123)"
)
thread
.
event
.
set
()
try
:
tdSql
.
query
(
"select s from car where ts = '2020-10-19 17:00:00'"
)
except
Exception
as
e
:
pass
else
:
tdSql
.
checkData
(
0
,
0
,
123
)
thread
.
join
()
time
.
sleep
(
0.2
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录