Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_54624550
TDengine
提交
be4904b5
T
TDengine
项目概览
weixin_54624550
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
4
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,发现更多精彩内容 >>
提交
be4904b5
编写于
3月 05, 2021
作者:
P
Ping Xiao
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop' into xiaoping/add_test_case
上级
c95c0d78
00d6bb39
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
40 addition
and
22 deletion
+40
-22
.gitignore
.gitignore
+0
-1
src/mnode/src/mnodeTable.c
src/mnode/src/mnodeTable.c
+6
-2
src/mnode/src/mnodeVgroup.c
src/mnode/src/mnodeVgroup.c
+3
-0
src/os/inc/osDef.h
src/os/inc/osDef.h
+14
-0
src/query/src/qExtbuffer.c
src/query/src/qExtbuffer.c
+2
-12
src/query/src/qParserImpl.c
src/query/src/qParserImpl.c
+9
-0
src/util/src/tcompare.c
src/util/src/tcompare.c
+2
-2
tests/examples/c/demo.c
tests/examples/c/demo.c
+4
-5
未找到文件。
.gitignore
浏览文件 @
be4904b5
...
...
@@ -27,7 +27,6 @@ tests/hdfs/
nmake/
sln/
hdfs/
c/
taoshebei/
taosdalipu/
Target/
...
...
src/mnode/src/mnodeTable.c
浏览文件 @
be4904b5
...
...
@@ -832,12 +832,13 @@ static int32_t mnodeProcessBatchCreateTableMsg(SMnodeMsg *pMsg) {
return
code
;
}
else
if
(
code
!=
TSDB_CODE_MND_ACTION_IN_PROGRESS
)
{
++
pMsg
->
pBatchMasterMsg
->
received
;
pMsg
->
pBatchMasterMsg
->
code
=
code
;
mnodeDestroySubMsg
(
pMsg
);
}
if
(
pMsg
->
pBatchMasterMsg
->
successed
+
pMsg
->
pBatchMasterMsg
->
received
>=
pMsg
->
pBatchMasterMsg
->
expected
)
{
dnodeSendRpcMWriteRsp
(
pMsg
->
pBatchMasterMsg
,
TSDB_CODE_SUCCESS
);
dnodeSendRpcMWriteRsp
(
pMsg
->
pBatchMasterMsg
,
pMsg
->
pBatchMasterMsg
->
code
);
}
return
TSDB_CODE_MND_ACTION_IN_PROGRESS
;
...
...
@@ -1908,7 +1909,8 @@ static int32_t mnodeDoCreateChildTableCb(SMnodeMsg *pMsg, int32_t code) {
sdbDeleteRow
(
&
desc
);
if
(
pMsg
->
pBatchMasterMsg
)
{
++
pMsg
->
pBatchMasterMsg
->
successed
;
++
pMsg
->
pBatchMasterMsg
->
received
;
pMsg
->
pBatchMasterMsg
->
code
=
code
;
if
(
pMsg
->
pBatchMasterMsg
->
successed
+
pMsg
->
pBatchMasterMsg
->
received
>=
pMsg
->
pBatchMasterMsg
->
expected
)
{
dnodeSendRpcMWriteRsp
(
pMsg
->
pBatchMasterMsg
,
code
);
...
...
@@ -2690,6 +2692,7 @@ static void mnodeProcessCreateChildTableRsp(SRpcMsg *rpcMsg) {
if
(
pMsg
->
pBatchMasterMsg
)
{
++
pMsg
->
pBatchMasterMsg
->
received
;
pMsg
->
pBatchMasterMsg
->
code
=
code
;
if
(
pMsg
->
pBatchMasterMsg
->
successed
+
pMsg
->
pBatchMasterMsg
->
received
>=
pMsg
->
pBatchMasterMsg
->
expected
)
{
dnodeSendRpcMWriteRsp
(
pMsg
->
pBatchMasterMsg
,
code
);
...
...
@@ -2728,6 +2731,7 @@ static void mnodeProcessCreateChildTableRsp(SRpcMsg *rpcMsg) {
if
(
pMsg
->
pBatchMasterMsg
)
{
++
pMsg
->
pBatchMasterMsg
->
received
;
pMsg
->
pBatchMasterMsg
->
code
=
rpcMsg
->
code
;
if
(
pMsg
->
pBatchMasterMsg
->
successed
+
pMsg
->
pBatchMasterMsg
->
received
>=
pMsg
->
pBatchMasterMsg
->
expected
)
{
dnodeSendRpcMWriteRsp
(
pMsg
->
pBatchMasterMsg
,
rpcMsg
->
code
);
...
...
src/mnode/src/mnodeVgroup.c
浏览文件 @
be4904b5
...
...
@@ -537,6 +537,7 @@ static int32_t mnodeCreateVgroupCb(SMnodeMsg *pMsg, int32_t code) {
if
(
pMsg
->
pBatchMasterMsg
)
{
++
pMsg
->
pBatchMasterMsg
->
received
;
pMsg
->
pBatchMasterMsg
->
code
=
pMsg
->
code
;
if
(
pMsg
->
pBatchMasterMsg
->
successed
+
pMsg
->
pBatchMasterMsg
->
received
>=
pMsg
->
pBatchMasterMsg
->
expected
)
{
dnodeSendRpcMWriteRsp
(
pMsg
->
pBatchMasterMsg
,
pMsg
->
code
);
...
...
@@ -1002,6 +1003,7 @@ static void mnodeProcessCreateVnodeRsp(SRpcMsg *rpcMsg) {
if
(
mnodeMsg
->
pBatchMasterMsg
)
{
++
mnodeMsg
->
pBatchMasterMsg
->
received
;
mnodeMsg
->
pBatchMasterMsg
->
code
=
code
;
if
(
mnodeMsg
->
pBatchMasterMsg
->
successed
+
mnodeMsg
->
pBatchMasterMsg
->
received
>=
mnodeMsg
->
pBatchMasterMsg
->
expected
)
{
dnodeSendRpcMWriteRsp
(
mnodeMsg
->
pBatchMasterMsg
,
code
);
...
...
@@ -1024,6 +1026,7 @@ static void mnodeProcessCreateVnodeRsp(SRpcMsg *rpcMsg) {
if
(
mnodeMsg
->
pBatchMasterMsg
)
{
++
mnodeMsg
->
pBatchMasterMsg
->
received
;
mnodeMsg
->
pBatchMasterMsg
->
code
=
mnodeMsg
->
code
;
if
(
mnodeMsg
->
pBatchMasterMsg
->
successed
+
mnodeMsg
->
pBatchMasterMsg
->
received
>=
mnodeMsg
->
pBatchMasterMsg
->
expected
)
{
dnodeSendRpcMWriteRsp
(
mnodeMsg
->
pBatchMasterMsg
,
mnodeMsg
->
code
);
...
...
src/os/inc/osDef.h
浏览文件 @
be4904b5
...
...
@@ -83,6 +83,20 @@ extern "C" {
} \
} while (0)
#define DEFAULT_DOUBLE_COMP(x, y) \
do { \
if (isnan(x) && isnan(y)) { return 0; } \
if (isnan(x)) { return -1; } \
if (isnan(y)) { return 1; } \
if ((x) == (y)) { \
return 0; \
} else { \
return (x) < (y) ? -1 : 1; \
} \
} while (0)
#define DEFAULT_FLOAT_COMP(x, y) DEFAULT_DOUBLE_COMP(x, y)
#define ALIGN_NUM(n, align) (((n) + ((align)-1)) & (~((align)-1)))
// align to 8bytes
...
...
src/query/src/qExtbuffer.c
浏览文件 @
be4904b5
...
...
@@ -362,20 +362,10 @@ static FORCE_INLINE int32_t columnValueAscendingComparator(char *f1, char *f2, i
return
(
first
<
second
)
?
-
1
:
1
;
};
case
TSDB_DATA_TYPE_DOUBLE
:
{
double
first
=
GET_DOUBLE_VAL
(
f1
);
double
second
=
GET_DOUBLE_VAL
(
f2
);
if
(
first
==
second
)
{
return
0
;
}
return
(
first
<
second
)
?
-
1
:
1
;
DEFAULT_DOUBLE_COMP
(
GET_DOUBLE_VAL
(
f1
),
GET_DOUBLE_VAL
(
f2
));
};
case
TSDB_DATA_TYPE_FLOAT
:
{
float
first
=
GET_FLOAT_VAL
(
f1
);
float
second
=
GET_FLOAT_VAL
(
f2
);
if
(
first
==
second
)
{
return
0
;
}
return
(
first
<
second
)
?
-
1
:
1
;
DEFAULT_FLOAT_COMP
(
GET_FLOAT_VAL
(
f1
),
GET_FLOAT_VAL
(
f2
));
};
case
TSDB_DATA_TYPE_BIGINT
:
{
int64_t
first
=
*
(
int64_t
*
)
f1
;
...
...
src/query/src/qParserImpl.c
浏览文件 @
be4904b5
...
...
@@ -58,6 +58,15 @@ SSqlInfo qSQLParse(const char *pStr) {
sqlInfo
.
valid
=
false
;
goto
abort_parse
;
}
case
TK_HEX
:
case
TK_OCT
:
case
TK_BIN
:{
snprintf
(
sqlInfo
.
msg
,
tListLen
(
sqlInfo
.
msg
),
"unsupported token:
\"
%s
\"
"
,
t0
.
z
);
sqlInfo
.
valid
=
false
;
goto
abort_parse
;
}
default:
Parse
(
pParser
,
t0
.
type
,
t0
,
&
sqlInfo
);
if
(
sqlInfo
.
valid
==
false
)
{
...
...
src/util/src/tcompare.c
浏览文件 @
be4904b5
...
...
@@ -392,8 +392,8 @@ __compar_fn_t getKeyComparFunc(int32_t keyType) {
int32_t
doCompare
(
const
char
*
f1
,
const
char
*
f2
,
int32_t
type
,
size_t
size
)
{
switch
(
type
)
{
case
TSDB_DATA_TYPE_INT
:
DEFAULT_COMP
(
GET_INT32_VAL
(
f1
),
GET_INT32_VAL
(
f2
));
case
TSDB_DATA_TYPE_DOUBLE
:
DEFAULT_COMP
(
GET_DOUBLE_VAL
(
f1
),
GET_DOUBLE_VAL
(
f2
));
case
TSDB_DATA_TYPE_FLOAT
:
DEFAULT_COMP
(
GET_FLOAT_VAL
(
f1
),
GET_FLOAT_VAL
(
f2
));
case
TSDB_DATA_TYPE_DOUBLE
:
DEFAULT_
DOUBLE_
COMP
(
GET_DOUBLE_VAL
(
f1
),
GET_DOUBLE_VAL
(
f2
));
case
TSDB_DATA_TYPE_FLOAT
:
DEFAULT_
FLOAT_
COMP
(
GET_FLOAT_VAL
(
f1
),
GET_FLOAT_VAL
(
f2
));
case
TSDB_DATA_TYPE_BIGINT
:
DEFAULT_COMP
(
GET_INT64_VAL
(
f1
),
GET_INT64_VAL
(
f2
));
case
TSDB_DATA_TYPE_SMALLINT
:
DEFAULT_COMP
(
GET_INT16_VAL
(
f1
),
GET_INT16_VAL
(
f2
));
case
TSDB_DATA_TYPE_TINYINT
:
...
...
tests/examples/c/demo.c
浏览文件 @
be4904b5
...
...
@@ -92,15 +92,14 @@ void Test(TAOS *taos, char *qstr, int index) {
// printf("insert row: %i, reason:%s\n", i, taos_errstr(taos));
// }
TAOS_RES
*
result1
=
taos_query
(
taos
,
qstr
);
if
(
result1
)
{
printf
(
"insert row: %i
\n
"
,
i
);
}
else
{
printf
(
"failed to insert row: %i, reason:%s
\n
"
,
i
,
"null result"
/*taos_errstr(result)*/
);
if
(
result1
==
NULL
||
taos_errno
(
result1
)
!=
0
)
{
printf
(
"failed to insert row, reason:%s
\n
"
,
taos_errstr
(
result1
));
taos_free_result
(
result1
);
exit
(
1
);
}
else
{
printf
(
"insert row: %i
\n
"
,
i
);
}
taos_free_result
(
result1
);
}
printf
(
"success to insert rows, total %d rows
\n
"
,
i
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录