Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
27370baa
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
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看板
未验证
提交
27370baa
编写于
12月 19, 2022
作者:
S
Shengliang Guan
提交者:
GitHub
12月 19, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #19017 from taosdata/fix/main_bugfix_wxy
fix: disable insert csv statements on cloud services
上级
5cb7ee27
f6d953e6
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
21 addition
and
9 deletion
+21
-9
include/client/taos.h
include/client/taos.h
+9
-6
include/common/tglobal.h
include/common/tglobal.h
+1
-0
source/client/src/clientEnv.c
source/client/src/clientEnv.c
+3
-0
source/common/src/tglobal.c
source/common/src/tglobal.c
+4
-3
source/libs/parser/src/parInsertSql.c
source/libs/parser/src/parInsertSql.c
+4
-0
未找到文件。
include/client/taos.h
浏览文件 @
27370baa
...
...
@@ -59,6 +59,7 @@ typedef enum {
TSDB_OPTION_TIMEZONE
,
TSDB_OPTION_CONFIGDIR
,
TSDB_OPTION_SHELL_ACTIVITY_TIMER
,
TSDB_OPTION_USE_ADAPTER
,
TSDB_MAX_OPTIONS
}
TSDB_OPTION
;
...
...
@@ -218,7 +219,7 @@ DLL_EXPORT const void *taos_get_raw_block(TAOS_RES *res);
DLL_EXPORT
int
taos_get_db_route_info
(
TAOS
*
taos
,
const
char
*
db
,
TAOS_DB_ROUTE_INFO
*
dbInfo
);
DLL_EXPORT
int
taos_get_table_vgId
(
TAOS
*
taos
,
const
char
*
db
,
const
char
*
table
,
int
*
vgId
);
DLL_EXPORT
int
taos_load_table_info
(
TAOS
*
taos
,
const
char
*
tableNameList
);
DLL_EXPORT
int
taos_load_table_info
(
TAOS
*
taos
,
const
char
*
tableNameList
);
/* --------------------------schemaless INTERFACE------------------------------- */
...
...
@@ -229,13 +230,14 @@ DLL_EXPORT TAOS_RES *taos_schemaless_insert_raw(TAOS *taos, char *lines, int len
int
precision
);
DLL_EXPORT
TAOS_RES
*
taos_schemaless_insert_raw_with_reqid
(
TAOS
*
taos
,
char
*
lines
,
int
len
,
int32_t
*
totalRows
,
int
protocol
,
int
precision
,
int64_t
reqid
);
DLL_EXPORT
TAOS_RES
*
taos_schemaless_insert_ttl
(
TAOS
*
taos
,
char
*
lines
[],
int
numLines
,
int
protocol
,
int
precision
,
int32_t
ttl
);
DLL_EXPORT
TAOS_RES
*
taos_schemaless_insert_ttl
(
TAOS
*
taos
,
char
*
lines
[],
int
numLines
,
int
protocol
,
int
precision
,
int32_t
ttl
);
DLL_EXPORT
TAOS_RES
*
taos_schemaless_insert_ttl_with_reqid
(
TAOS
*
taos
,
char
*
lines
[],
int
numLines
,
int
protocol
,
int
precision
,
int32_t
ttl
,
int64_t
reqid
);
int
precision
,
int32_t
ttl
,
int64_t
reqid
);
DLL_EXPORT
TAOS_RES
*
taos_schemaless_insert_raw_ttl
(
TAOS
*
taos
,
char
*
lines
,
int
len
,
int32_t
*
totalRows
,
int
protocol
,
int
precision
,
int32_t
ttl
);
int
precision
,
int32_t
ttl
);
DLL_EXPORT
TAOS_RES
*
taos_schemaless_insert_raw_ttl_with_reqid
(
TAOS
*
taos
,
char
*
lines
,
int
len
,
int32_t
*
totalRows
,
int
protocol
,
int
precision
,
int32_t
ttl
,
int64_t
reqid
);
int
protocol
,
int
precision
,
int32_t
ttl
,
int64_t
reqid
);
/* --------------------------TMQ INTERFACE------------------------------- */
...
...
@@ -308,7 +310,8 @@ DLL_EXPORT tmq_res_t tmq_get_res_type(TAOS_RES *res);
DLL_EXPORT
int32_t
tmq_get_raw
(
TAOS_RES
*
res
,
tmq_raw_data
*
raw
);
DLL_EXPORT
int32_t
tmq_write_raw
(
TAOS
*
taos
,
tmq_raw_data
raw
);
DLL_EXPORT
int
taos_write_raw_block
(
TAOS
*
taos
,
int
numOfRows
,
char
*
pData
,
const
char
*
tbname
);
DLL_EXPORT
int
taos_write_raw_block_with_fields
(
TAOS
*
taos
,
int
rows
,
char
*
pData
,
const
char
*
tbname
,
TAOS_FIELD
*
fields
,
int
numFields
);
DLL_EXPORT
int
taos_write_raw_block_with_fields
(
TAOS
*
taos
,
int
rows
,
char
*
pData
,
const
char
*
tbname
,
TAOS_FIELD
*
fields
,
int
numFields
);
DLL_EXPORT
void
tmq_free_raw
(
tmq_raw_data
raw
);
// Returning null means error. Returned result need to be freed by tmq_free_json_meta
DLL_EXPORT
char
*
tmq_get_json_meta
(
TAOS_RES
*
res
);
...
...
include/common/tglobal.h
浏览文件 @
27370baa
...
...
@@ -101,6 +101,7 @@ extern int32_t tsRedirectPeriod;
extern
int32_t
tsRedirectFactor
;
extern
int32_t
tsRedirectMaxPeriod
;
extern
int32_t
tsMaxRetryWaitTime
;
extern
bool
tsUseAdapter
;
// client
extern
int32_t
tsMinSlidingTime
;
...
...
source/client/src/clientEnv.c
浏览文件 @
27370baa
...
...
@@ -469,6 +469,9 @@ int taos_options_imp(TSDB_OPTION option, const char *str) {
case
TSDB_OPTION_TIMEZONE
:
pItem
=
cfgGetItem
(
pCfg
,
"timezone"
);
break
;
case
TSDB_OPTION_USE_ADAPTER
:
pItem
=
cfgGetItem
(
pCfg
,
"useAdapter"
);
break
;
default:
break
;
}
...
...
source/common/src/tglobal.c
浏览文件 @
27370baa
...
...
@@ -96,6 +96,7 @@ int32_t tsRedirectPeriod = 10;
int32_t
tsRedirectFactor
=
2
;
int32_t
tsRedirectMaxPeriod
=
1000
;
int32_t
tsMaxRetryWaitTime
=
10000
;
bool
tsUseAdapter
=
false
;
/*
* denote if the server needs to compress response message at the application layer to client, including query rsp,
...
...
@@ -201,9 +202,7 @@ int32_t taosSetTfsCfg(SConfig *pCfg) {
int32_t
taosSetTfsCfg
(
SConfig
*
pCfg
);
#endif
struct
SConfig
*
taosGetCfg
()
{
return
tsCfg
;
}
struct
SConfig
*
taosGetCfg
()
{
return
tsCfg
;
}
static
int32_t
taosLoadCfg
(
SConfig
*
pCfg
,
const
char
**
envCmd
,
const
char
*
inputCfgDir
,
const
char
*
envFile
,
char
*
apolloUrl
)
{
...
...
@@ -314,6 +313,7 @@ static int32_t taosAddClientCfg(SConfig *pCfg) {
if
(
cfgAddInt32
(
pCfg
,
"smlBatchSize"
,
tsSmlBatchSize
,
1
,
INT32_MAX
,
true
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"maxMemUsedByInsert"
,
tsMaxMemUsedByInsert
,
1
,
INT32_MAX
,
true
)
!=
0
)
return
-
1
;
if
(
cfgAddInt32
(
pCfg
,
"maxRetryWaitTime"
,
tsMaxRetryWaitTime
,
0
,
86400000
,
0
)
!=
0
)
return
-
1
;
if
(
cfgAddBool
(
pCfg
,
"useAdapter"
,
tsUseAdapter
,
true
)
!=
0
)
return
-
1
;
tsNumOfTaskQueueThreads
=
tsNumOfCores
/
2
;
tsNumOfTaskQueueThreads
=
TMAX
(
tsNumOfTaskQueueThreads
,
4
);
...
...
@@ -668,6 +668,7 @@ static int32_t taosSetClientCfg(SConfig *pCfg) {
tsQueryNodeChunkSize
=
cfgGetItem
(
pCfg
,
"queryNodeChunkSize"
)
->
i32
;
tsQueryUseNodeAllocator
=
cfgGetItem
(
pCfg
,
"queryUseNodeAllocator"
)
->
bval
;
tsKeepColumnName
=
cfgGetItem
(
pCfg
,
"keepColumnName"
)
->
bval
;
tsUseAdapter
=
cfgGetItem
(
pCfg
,
"useAdapter"
)
->
bval
;
tsMaxRetryWaitTime
=
cfgGetItem
(
pCfg
,
"maxRetryWaitTime"
)
->
i32
;
return
0
;
...
...
source/libs/parser/src/parInsertSql.c
浏览文件 @
27370baa
...
...
@@ -1494,6 +1494,10 @@ static int32_t parseDataFromFile(SInsertParseContext* pCxt, SVnodeModifOpStmt* p
static
int32_t
parseFileClause
(
SInsertParseContext
*
pCxt
,
SVnodeModifOpStmt
*
pStmt
,
STableDataBlocks
*
pDataBuf
,
SToken
*
pToken
)
{
if
(
tsUseAdapter
)
{
return
buildInvalidOperationMsg
(
&
pCxt
->
msg
,
"proxy mode does not support csv loading"
);
}
NEXT_TOKEN
(
pStmt
->
pSql
,
*
pToken
);
if
(
0
==
pToken
->
n
||
(
TK_NK_STRING
!=
pToken
->
type
&&
TK_NK_ID
!=
pToken
->
type
))
{
return
buildSyntaxErrMsg
(
&
pCxt
->
msg
,
"file path is required following keyword FILE"
,
pToken
->
z
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录