Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
dgr6878
TDengine
提交
f5a677e5
T
TDengine
项目概览
dgr6878
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f5a677e5
编写于
5月 14, 2020
作者:
H
Hongze Cheng
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' into feature/2.0tsdb
上级
431998ee
36973a50
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
58 addition
and
38 deletion
+58
-38
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+2
-34
tests/pytest/insert/multi.py
tests/pytest/insert/multi.py
+8
-2
tests/pytest/table/create.py
tests/pytest/table/create.py
+48
-0
tests/pytest/table/del_stable.py
tests/pytest/table/del_stable.py
+0
-2
未找到文件。
src/client/src/tscUtil.c
浏览文件 @
f5a677e5
...
@@ -1842,6 +1842,7 @@ SSqlObj* createSubqueryObj(SSqlObj* pSql, int16_t tableIndex, void (*fp)(), void
...
@@ -1842,6 +1842,7 @@ SSqlObj* createSubqueryObj(SSqlObj* pSql, int16_t tableIndex, void (*fp)(), void
pNew
->
fp
=
fp
;
pNew
->
fp
=
fp
;
pNew
->
param
=
param
;
pNew
->
param
=
param
;
pNew
->
maxRetry
=
TSDB_MAX_REPLICA_NUM
;
char
*
name
=
pTableMetaInfo
->
name
;
char
*
name
=
pTableMetaInfo
->
name
;
STableMetaInfo
*
pFinalInfo
=
NULL
;
STableMetaInfo
*
pFinalInfo
=
NULL
;
...
@@ -2068,47 +2069,14 @@ void tscTryQueryNextVnode(SSqlObj* pSql, __async_cb_func_t fp) {
...
@@ -2068,47 +2069,14 @@ void tscTryQueryNextVnode(SSqlObj* pSql, __async_cb_func_t fp) {
tscResetForNextRetrieve
(
pRes
);
tscResetForNextRetrieve
(
pRes
);
// in case of async query, set the callback function
// set the callback function
// void* fp1 = pSql->fp;
pSql
->
fp
=
fp
;
pSql
->
fp
=
fp
;
// if (fp1 != NULL) {
// assert(fp != NULL);
// }
int32_t
ret
=
tscProcessSql
(
pSql
);
int32_t
ret
=
tscProcessSql
(
pSql
);
if
(
ret
==
TSDB_CODE_SUCCESS
)
{
if
(
ret
==
TSDB_CODE_SUCCESS
)
{
return
;
return
;
}
else
{
// todo check for failure
}
else
{
// todo check for failure
}
}
// in case of async query, return now
// if (fp != NULL) {
// return;
// }
//
// if (ret != TSDB_CODE_SUCCESS) {
// pSql->res.code = ret;
// return;
// }
//
// // retrieve data
// assert(pCmd->command == TSDB_SQL_SELECT);
// pCmd->command = TSDB_SQL_FETCH;
//
// if ((ret = tscProcessSql(pSql)) != TSDB_CODE_SUCCESS) {
// pSql->res.code = ret;
// return;
// }
//
// // if the result from current virtual node are empty, try next if exists. otherwise, return the results.
// if (pRes->numOfRows > 0) {
// break;
// }
}
}
// if (pRes->numOfRows == 0) {
// tscTrace("%p all vnodes exhausted, prj query completed. total res:%d", pSql, totalVnode, pRes->numOfTotal);
// }
}
}
void
tscTryQueryNextClause
(
SSqlObj
*
pSql
,
void
(
*
queryFp
)())
{
void
tscTryQueryNextClause
(
SSqlObj
*
pSql
,
void
(
*
queryFp
)())
{
...
...
tests/pytest/insert/multi.py
浏览文件 @
f5a677e5
...
@@ -37,9 +37,15 @@ class TDTestCase:
...
@@ -37,9 +37,15 @@ class TDTestCase:
"CREATE TABLE if not exists dev_001 using st tags('dev_01')"
)
"CREATE TABLE if not exists dev_001 using st tags('dev_01')"
)
print
(
"==============step2"
)
print
(
"==============step2"
)
tdLog
.
info
(
"multiple inserts"
)
tdLog
.
info
(
"multiple inserts
by insert
"
)
tdSql
.
execute
(
tdSql
.
execute
(
"INSERT INTO dev_001 VALUES ('2020-05-13 10:00:00.000', 1),('2020-05-13 10:00:00.001', 1)"
)
"insert INTO dev_001 VALUES ('2020-05-13 10:00:00.000', 1),('2020-05-13 10:00:00.001', 1)"
)
tdSql
.
checkAffectedRows
(
2
)
print
(
"==============step3"
)
tdLog
.
info
(
"multiple inserts by import"
)
tdSql
.
execute
(
"import INTO dev_001 VALUES ('2020-05-13 10:00:00.000', 1),('2020-05-13 10:00:00.001', 1)"
)
tdSql
.
checkAffectedRows
(
2
)
tdSql
.
checkAffectedRows
(
2
)
def
stop
(
self
):
def
stop
(
self
):
...
...
tests/pytest/table/create.py
0 → 100644
浏览文件 @
f5a677e5
###################################################################
# 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
tdLog
from
util.cases
import
tdCases
from
util.sql
import
tdSql
class
TDTestCase
:
def
init
(
self
,
conn
):
tdLog
.
debug
(
"start to execute %s"
%
__file__
)
tdSql
.
init
(
conn
.
cursor
())
def
run
(
self
):
tdSql
.
prepare
()
print
(
"==============step1"
)
print
(
"prepare data"
)
tdSql
.
execute
(
"create table db.st (ts timestamp, i int) tags(j int)"
)
tdSql
.
execute
(
"create table db.tb using st tags(1)"
)
tdSql
.
execute
(
"insert into db.tb values(now, 1)"
)
print
(
"==============step2"
)
print
(
"create table as select"
)
try
:
tdSql
.
execute
(
"create table db.test as select * from db.st"
)
except
Exception
as
e
:
tdLog
.
exit
(
e
)
def
stop
(
self
):
tdSql
.
close
()
tdLog
.
success
(
"%s successfully executed"
%
__file__
)
tdCases
.
addWindows
(
__file__
,
TDTestCase
())
tdCases
.
addLinux
(
__file__
,
TDTestCase
())
tests/pytest/table/del_stable.py
浏览文件 @
f5a677e5
...
@@ -26,9 +26,7 @@ class TDTestCase:
...
@@ -26,9 +26,7 @@ class TDTestCase:
def
run
(
self
):
def
run
(
self
):
tdSql
.
prepare
()
tdSql
.
prepare
()
tdSql
.
execute
(
"drop database if exists db"
)
print
(
"==============step1"
)
print
(
"==============step1"
)
tdSql
.
execute
(
"create database db"
)
tdSql
.
execute
(
"create table db.st (ts timestamp, i int) tags(j int)"
)
tdSql
.
execute
(
"create table db.st (ts timestamp, i int) tags(j int)"
)
tdSql
.
execute
(
"create table db.tb using st tags(1)"
)
tdSql
.
execute
(
"create table db.tb using st tags(1)"
)
tdSql
.
execute
(
"insert into db.tb values(now, 1)"
)
tdSql
.
execute
(
"insert into db.tb values(now, 1)"
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录