Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
acce71db
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
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看板
提交
acce71db
编写于
11月 11, 2019
作者:
H
hjxilinx
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[TBASE-1099] fix bug referred in issue #699, refactor some codes
上级
d609fe31
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
31 addition
and
19 deletion
+31
-19
src/client/inc/tsclient.h
src/client/inc/tsclient.h
+1
-0
src/client/src/TSDBJNIConnector.c
src/client/src/TSDBJNIConnector.c
+9
-7
src/client/src/tscAst.c
src/client/src/tscAst.c
+4
-5
src/client/src/tscUtil.c
src/client/src/tscUtil.c
+14
-0
src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBJNIConnector.java
...dbc/src/main/java/com/taosdata/jdbc/TSDBJNIConnector.java
+1
-1
src/inc/taos.h
src/inc/taos.h
+0
-3
src/inc/tutil.h
src/inc/tutil.h
+1
-1
src/system/detail/src/mgmtShell.c
src/system/detail/src/mgmtShell.c
+1
-2
未找到文件。
src/client/inc/tsclient.h
浏览文件 @
acce71db
...
...
@@ -479,6 +479,7 @@ void tscProcessMultiVnodesInsertForFile(SSqlObj *pSql);
void
tscKillMetricQuery
(
SSqlObj
*
pSql
);
void
tscInitResObjForLocalQuery
(
SSqlObj
*
pObj
,
int32_t
numOfRes
,
int32_t
rowLen
);
int32_t
tscBuildResultsForEmptyRetrieval
(
SSqlObj
*
pSql
);
bool
tscIsUpdateQuery
(
STscObj
*
pObj
);
// transfer SSqlInfo to SqlCmd struct
int32_t
tscToSQLCmd
(
SSqlObj
*
pSql
,
struct
SSqlInfo
*
pInfo
);
...
...
src/client/src/TSDBJNIConnector.c
浏览文件 @
acce71db
...
...
@@ -289,15 +289,17 @@ JNIEXPORT jlong JNICALL Java_com_taosdata_jdbc_TSDBJNIConnector_getResultSetImp(
return
JNI_CONNECTION_NULL
;
}
int
num_fields
=
taos_field_count
(
tscon
);
if
(
num_fields
!=
0
)
{
jlong
ret
=
(
jlong
)
taos_use_result
(
tscon
);
jniTrace
(
"jobj:%p, taos:%p, get resultset:%p"
,
jobj
,
tscon
,
(
void
*
)
ret
);
return
ret
;
jlong
ret
=
0
;
if
(
tscIsUpdateQuery
(
tscon
))
{
ret
=
0
;
// for update query, no result pointer
jniTrace
(
"jobj:%p, taos:%p, no result"
,
jobj
,
tscon
);
}
else
{
ret
=
(
jlong
)
taos_use_result
(
tscon
);
jniTrace
(
"jobj:%p, taos:%p, get resultset:%p"
,
jobj
,
tscon
,
(
void
*
)
ret
);
}
jniTrace
(
"jobj:%p, taos:%p, no resultset"
,
jobj
,
tscon
);
return
0
;
return
ret
;
}
JNIEXPORT
jint
JNICALL
Java_com_taosdata_jdbc_TSDBJNIConnector_freeResultSetImp
(
JNIEnv
*
env
,
jobject
jobj
,
jlong
con
,
...
...
src/client/src/tscAst.c
浏览文件 @
acce71db
...
...
@@ -255,8 +255,7 @@ static tSQLSyntaxNode *createSyntaxTree(SSchema *pSchema, int32_t numOfCols, cha
t0
=
tStrGetToken
(
str
,
i
,
false
,
0
,
NULL
);
if
(
t0
.
n
==
0
||
t0
.
type
==
TK_RP
)
{
if
(
pLeft
->
nodeType
!=
TSQL_NODE_EXPR
)
{
// if left is not the expr, it is not a legal expr
if
(
pLeft
->
nodeType
!=
TSQL_NODE_EXPR
)
{
// if left is not the expr, it is not a legal expr
tSQLSyntaxNodeDestroy
(
pLeft
,
NULL
);
return
NULL
;
}
...
...
@@ -320,13 +319,13 @@ static tSQLSyntaxNode *createSyntaxTree(SSchema *pSchema, int32_t numOfCols, cha
pn
->
colId
=
-
1
;
return
pn
;
}
else
{
int32_t
o
ptr
=
getBinaryExprOptr
(
&
t0
);
if
(
o
ptr
<=
0
)
{
uint8_t
localO
ptr
=
getBinaryExprOptr
(
&
t0
);
if
(
localO
ptr
<=
0
)
{
pError
(
"not support binary operator:%d"
,
t0
.
type
);
return
NULL
;
}
return
parseRemainStr
(
str
,
pBinExpr
,
pSchema
,
o
ptr
,
numOfCols
,
i
);
return
parseRemainStr
(
str
,
pBinExpr
,
pSchema
,
localO
ptr
,
numOfCols
,
i
);
}
}
...
...
src/client/src/tscUtil.c
浏览文件 @
acce71db
...
...
@@ -1817,3 +1817,17 @@ int16_t tscGetJoinTagColIndexByUid(SSqlCmd* pCmd, uint64_t uid) {
return
pTagCond
->
joinInfo
.
right
.
tagCol
;
}
}
bool
tscIsUpdateQuery
(
STscObj
*
pObj
)
{
if
(
pObj
==
NULL
||
pObj
->
signature
!=
pObj
)
{
globalCode
=
TSDB_CODE_DISCONNECTED
;
return
TSDB_CODE_DISCONNECTED
;
}
SSqlCmd
*
pCmd
=
&
(
pObj
->
pSql
->
cmd
);
if
(
pCmd
->
command
>=
TSDB_SQL_INSERT
&&
pCmd
->
command
<=
TSDB_SQL_DROP_DNODE
)
{
return
1
;
}
return
0
;
}
src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBJNIConnector.java
浏览文件 @
acce71db
...
...
@@ -134,7 +134,7 @@ public class TSDBJNIConnector {
}
}
// Try retrieving result set for the executed SQLusing the current connection pointer. If the executed
// Try retrieving result set for the executed SQL
using the current connection pointer. If the executed
// SQL is a DML/DDL which doesn't return a result set, then taosResultSetPointer should be 0L. Otherwise,
// taosResultSetPointer should be a non-zero value.
taosResultSetPointer
=
this
.
getResultSetImp
(
this
.
taos
);
...
...
src/inc/taos.h
浏览文件 @
acce71db
...
...
@@ -122,9 +122,6 @@ void taos_close_stream(TAOS_STREAM *tstr);
int
taos_load_table_info
(
TAOS
*
taos
,
const
char
*
tableNameList
);
// TODO: `configDir` should not be declared here
extern
char
configDir
[];
// the path to global configuration
#ifdef __cplusplus
}
#endif
...
...
src/inc/tutil.h
浏览文件 @
acce71db
...
...
@@ -89,7 +89,7 @@ extern "C" {
} else { \
return (x) < (y) ? -1 : 1; \
} \
} while (0)
;
} while (0)
#define GET_INT8_VAL(x) (*(int8_t *)(x))
#define GET_INT16_VAL(x) (*(int16_t *)(x))
...
...
src/system/detail/src/mgmtShell.c
浏览文件 @
acce71db
...
...
@@ -1140,7 +1140,7 @@ int mgmtProcessConnectMsg(char *pMsg, int msgLen, SConnObj *pConn) {
SAcctObj
*
pAcct
=
NULL
;
SUserObj
*
pUser
=
NULL
;
SDbObj
*
pDb
=
NULL
;
char
dbName
[
TSDB_METER_ID_LEN
]
;
char
dbName
[
256
]
=
{
0
}
;
pConnectMsg
=
(
SConnectMsg
*
)
pMsg
;
...
...
@@ -1158,7 +1158,6 @@ int mgmtProcessConnectMsg(char *pMsg, int msgLen, SConnObj *pConn) {
pAcct
=
mgmtGetAcct
(
pUser
->
acct
);
if
(
pConnectMsg
->
db
[
0
])
{
memset
(
dbName
,
0
,
sizeof
(
dbName
));
sprintf
(
dbName
,
"%x%s%s"
,
pAcct
->
acctId
,
TS_PATH_DELIMITER
,
pConnectMsg
->
db
);
pDb
=
mgmtGetDb
(
dbName
);
if
(
pDb
==
NULL
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录