Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
63a9aee5
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22017
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
63a9aee5
编写于
6月 15, 2022
作者:
wmmhello
提交者:
GitHub
6月 15, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #13824 from taosdata/feature/TD-14761
fix: error in schemaless parameters
上级
c156d964
81acad62
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
34 addition
and
34 deletion
+34
-34
source/client/src/clientSml.c
source/client/src/clientSml.c
+28
-28
source/libs/parser/src/parAstCreater.c
source/libs/parser/src/parAstCreater.c
+4
-4
source/libs/parser/test/parInitialCTest.cpp
source/libs/parser/test/parInitialCTest.cpp
+1
-1
tests/script/tsim/testsuit.sim
tests/script/tsim/testsuit.sim
+1
-1
未找到文件。
source/client/src/clientSml.c
浏览文件 @
63a9aee5
...
...
@@ -2355,34 +2355,34 @@ static int smlProcess(SSmlHandle *info, char *lines[], int numLines) {
}
static
int32_t
isSchemalessDb
(
STscObj
*
taos
,
SRequestObj
*
request
)
{
SCatalog
*
catalog
=
NULL
;
int32_t
code
=
catalogGetHandle
(((
STscObj
*
)
taos
)
->
pAppInfo
->
clusterId
,
&
catalog
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
uError
(
"SML get catalog error %d"
,
code
);
return
code
;
}
SName
name
;
tNameSetDbName
(
&
name
,
taos
->
acctId
,
taos
->
db
,
strlen
(
taos
->
db
));
char
dbFname
[
TSDB_DB_FNAME_LEN
]
=
{
0
};
tNameGetFullDbName
(
&
name
,
dbFname
);
SDbCfgInfo
pInfo
=
{
0
};
SRequestConnInfo
conn
=
{
0
};
conn
.
pTrans
=
taos
->
pAppInfo
->
pTransporter
;
conn
.
requestId
=
request
->
requestId
;
conn
.
requestObjRefId
=
request
->
self
;
conn
.
mgmtEps
=
getEpSet_s
(
&
taos
->
pAppInfo
->
mgmtEp
);
code
=
catalogGetDBCfg
(
catalog
,
&
conn
,
dbFname
,
&
pInfo
);
if
(
code
!=
TSDB_CODE_SUCCESS
)
{
return
code
;
}
taosArrayDestroy
(
pInfo
.
pRetensions
);
if
(
!
pInfo
.
schemaless
)
{
return
TSDB_CODE_SML_INVALID_DB_CONF
;
}
//
SCatalog *catalog = NULL;
//
int32_t code = catalogGetHandle(((STscObj *)taos)->pAppInfo->clusterId, &catalog);
//
if (code != TSDB_CODE_SUCCESS) {
//
uError("SML get catalog error %d", code);
//
return code;
//
}
//
//
SName name;
//
tNameSetDbName(&name, taos->acctId, taos->db, strlen(taos->db));
//
char dbFname[TSDB_DB_FNAME_LEN] = {0};
//
tNameGetFullDbName(&name, dbFname);
//
SDbCfgInfo pInfo = {0};
//
//
SRequestConnInfo conn = {0};
//
conn.pTrans = taos->pAppInfo->pTransporter;
//
conn.requestId = request->requestId;
//
conn.requestObjRefId = request->self;
//
conn.mgmtEps = getEpSet_s(&taos->pAppInfo->mgmtEp);
//
//
code = catalogGetDBCfg(catalog, &conn, dbFname, &pInfo);
//
if (code != TSDB_CODE_SUCCESS) {
//
return code;
//
}
//
taosArrayDestroy(pInfo.pRetensions);
//
//
if (!pInfo.schemaless) {
//
return TSDB_CODE_SML_INVALID_DB_CONF;
//
}
return
TSDB_CODE_SUCCESS
;
}
...
...
source/libs/parser/src/parAstCreater.c
浏览文件 @
63a9aee5
...
...
@@ -804,10 +804,10 @@ SNode* setDatabaseOption(SAstCreateContext* pCxt, SNode* pOptions, EDatabaseOpti
case
DB_OPTION_RETENTIONS
:
((
SDatabaseOptions
*
)
pOptions
)
->
pRetentions
=
pVal
;
break
;
case
DB_OPTION_SCHEMALESS
:
// ((SDatabaseOptions*)pOptions)->schemaless = taosStr2Int8(((SToken*)pVal)->z, NULL, 10);
((
SDatabaseOptions
*
)
pOptions
)
->
schemaless
=
1
;
break
;
//
case DB_OPTION_SCHEMALESS:
// ((SDatabaseOptions*)pOptions)->schemaless = taosStr2Int8(((SToken*)pVal)->z, NULL, 10);
// ((SDatabaseOptions*)pOptions)->schemaless = 0
;
//
break;
default:
break
;
}
...
...
source/libs/parser/test/parInitialCTest.cpp
浏览文件 @
63a9aee5
...
...
@@ -155,7 +155,7 @@ TEST_F(ParserInitialCTest, createDatabase) {
ASSERT_EQ
(
req
.
replications
,
expect
.
replications
);
ASSERT_EQ
(
req
.
strict
,
expect
.
strict
);
ASSERT_EQ
(
req
.
cacheLastRow
,
expect
.
cacheLastRow
);
ASSERT_EQ
(
req
.
schemaless
,
expect
.
schemaless
);
//
ASSERT_EQ(req.schemaless, expect.schemaless);
ASSERT_EQ
(
req
.
ignoreExist
,
expect
.
ignoreExist
);
ASSERT_EQ
(
req
.
numOfRetensions
,
expect
.
numOfRetensions
);
if
(
expect
.
numOfRetensions
>
0
)
{
...
...
tests/script/tsim/testsuit.sim
浏览文件 @
63a9aee5
...
...
@@ -37,7 +37,7 @@ run tsim/db/error1.sim
run tsim/db/taosdlog.sim
run tsim/db/alter_option.sim
run tsim/mnode/basic1.sim
run tsim/mnode/basic3.sim
#
run tsim/mnode/basic3.sim
run tsim/mnode/basic2.sim
run tsim/parser/fourArithmetic-basic.sim
run tsim/parser/groupby-basic.sim
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录