Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
84911399
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看板
提交
84911399
编写于
2月 08, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update stb
上级
c0b8234f
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
47 addition
and
47 deletion
+47
-47
include/common/tmsg.h
include/common/tmsg.h
+4
-4
source/dnode/mnode/impl/src/mndStb.c
source/dnode/mnode/impl/src/mndStb.c
+30
-30
source/libs/parser/inc/sql.y
source/libs/parser/inc/sql.y
+6
-6
source/libs/parser/src/astGenerator.c
source/libs/parser/src/astGenerator.c
+1
-1
source/libs/parser/src/sql.c
source/libs/parser/src/sql.c
+6
-6
未找到文件。
include/common/tmsg.h
浏览文件 @
84911399
...
...
@@ -113,13 +113,13 @@ typedef enum _mgmt_table {
#define TSDB_ALTER_TABLE_ADD_TAG_COLUMN 1
#define TSDB_ALTER_TABLE_DROP_TAG_COLUMN 2
#define TSDB_ALTER_TABLE_
CHANGE_TAG_COLUMN
3
#define TSDB_ALTER_TABLE_
UPDATE_TAG_NAME
3
#define TSDB_ALTER_TABLE_UPDATE_TAG_VAL 4
#define TSDB_ALTER_TABLE_ADD_COLUMN 5
#define TSDB_ALTER_TABLE_DROP_COLUMN 6
#define TSDB_ALTER_TABLE_
CHANGE_COLUMN
7
#define TSDB_ALTER_TABLE_
MODIFY_TAG_COLUMN
8
#define TSDB_ALTER_TABLE_
UPDATE_COLUMN_BYTES
7
#define TSDB_ALTER_TABLE_
UPDATE_TAG_BYTES
8
#define TSDB_FILL_NONE 0
#define TSDB_FILL_NULL 1
...
...
@@ -267,7 +267,7 @@ typedef struct {
int8_t
alterType
;
int32_t
numOfColumns
;
SSchema
pSchema
[];
}
SM
Alter
StbReq
;
}
SM
Update
StbReq
;
typedef
struct
{
int32_t
pid
;
...
...
source/dnode/mnode/impl/src/mndStb.c
浏览文件 @
84911399
...
...
@@ -575,11 +575,11 @@ static int32_t mndProcessVCreateStbRsp(SMnodeMsg *pRsp) {
return
0
;
}
static
int32_t
mndCheckAlterStbReq
(
SM
AlterStbReq
*
pAlter
)
{
p
Alter
->
numOfColumns
=
htonl
(
pAlter
->
numOfColumns
);
static
int32_t
mndCheckAlterStbReq
(
SM
UpdateStbReq
*
pUpdate
)
{
p
Update
->
numOfColumns
=
htonl
(
pUpdate
->
numOfColumns
);
for
(
int32_t
i
=
0
;
i
<
p
Alter
->
numOfColumns
;
++
i
)
{
SSchema
*
pSchema
=
&
p
Alter
->
pSchema
[
i
];
for
(
int32_t
i
=
0
;
i
<
p
Update
->
numOfColumns
;
++
i
)
{
SSchema
*
pSchema
=
&
p
Update
->
pSchema
[
i
];
pSchema
->
colId
=
htonl
(
pSchema
->
colId
);
pSchema
->
bytes
=
htonl
(
pSchema
->
bytes
);
...
...
@@ -696,7 +696,7 @@ static int32_t mndDropSuperTableTag(const SStbObj *pOld, SStbObj *pNew, const ch
return
0
;
}
static
int32_t
mnd
ModifySuperTable
TagName
(
const
SStbObj
*
pOld
,
SStbObj
*
pNew
,
const
char
*
oldTagName
,
static
int32_t
mnd
UpdateStb
TagName
(
const
SStbObj
*
pOld
,
SStbObj
*
pNew
,
const
char
*
oldTagName
,
const
char
*
newTagName
)
{
int32_t
tag
=
mndFindSuperTableTagIndex
(
pOld
,
oldTagName
);
if
(
tag
<
0
)
{
...
...
@@ -727,7 +727,7 @@ static int32_t mndModifySuperTableTagName(const SStbObj *pOld, SStbObj *pNew, co
return
0
;
}
static
int32_t
mnd
ChangeSuperTableTag
(
const
SStbObj
*
pOld
,
SStbObj
*
pNew
,
const
SSchema
*
pSchema
)
{
static
int32_t
mnd
UpdateStbTagBytes
(
const
SStbObj
*
pOld
,
SStbObj
*
pNew
,
const
SSchema
*
pSchema
)
{
int32_t
tag
=
mndFindSuperTableTagIndex
(
pOld
,
pSchema
->
name
);
if
(
tag
<
0
)
{
terrno
=
TSDB_CODE_MND_TAG_NOT_EXIST
;
...
...
@@ -810,7 +810,7 @@ static int32_t mndDropSuperTableColumn(const SStbObj *pOld, SStbObj *pNew, const
return
0
;
}
static
int32_t
mnd
ChangeSuperTableColumn
(
const
SStbObj
*
pOld
,
SStbObj
*
pNew
,
const
SSchema
*
pSchema
)
{
static
int32_t
mnd
UpdateStbColumnBytes
(
const
SStbObj
*
pOld
,
SStbObj
*
pNew
,
const
SSchema
*
pSchema
)
{
int32_t
col
=
mndFindSuperTableColumnIndex
(
pOld
,
pSchema
->
name
);
if
(
col
<
0
)
{
terrno
=
TSDB_CODE_MND_COLUMN_NOT_EXIST
;
...
...
@@ -905,7 +905,7 @@ static int32_t mndSetUpdateStbRedoActions(SMnode *pMnode, STrans *pTrans, SDbObj
return
0
;
}
static
int32_t
mndUpdateStb
(
SMnode
*
pMnode
,
SMnodeMsg
*
pReq
,
const
SM
AlterStbReq
*
pAlter
,
SDbObj
*
pDb
,
SStbObj
*
pOld
)
{
static
int32_t
mndUpdateStb
(
SMnode
*
pMnode
,
SMnodeMsg
*
pReq
,
const
SM
UpdateStbReq
*
pUpdate
,
SDbObj
*
pDb
,
SStbObj
*
pOld
)
{
SStbObj
stbObj
=
{
0
};
taosRLockLatch
(
&
pOld
->
lock
);
memcpy
(
&
stbObj
,
pOld
,
sizeof
(
SStbObj
));
...
...
@@ -916,27 +916,27 @@ static int32_t mndUpdateStb(SMnode *pMnode, SMnodeMsg *pReq, const SMAlterStbReq
int32_t
code
=
-
1
;
switch
(
p
Alter
->
alterType
)
{
switch
(
p
Update
->
alterType
)
{
case
TSDB_ALTER_TABLE_ADD_TAG_COLUMN
:
code
=
mndAddSuperTableTag
(
pOld
,
&
stbObj
,
p
Alter
->
pSchema
,
1
);
code
=
mndAddSuperTableTag
(
pOld
,
&
stbObj
,
p
Update
->
pSchema
,
1
);
break
;
case
TSDB_ALTER_TABLE_DROP_TAG_COLUMN
:
code
=
mndDropSuperTableTag
(
pOld
,
&
stbObj
,
p
Alter
->
pSchema
[
0
].
name
);
code
=
mndDropSuperTableTag
(
pOld
,
&
stbObj
,
p
Update
->
pSchema
[
0
].
name
);
break
;
case
TSDB_ALTER_TABLE_
CHANGE_TAG_COLUMN
:
code
=
mnd
ModifySuperTableTagName
(
pOld
,
&
stbObj
,
pAlter
->
pSchema
[
0
].
name
,
pAlter
->
pSchema
[
1
].
name
);
case
TSDB_ALTER_TABLE_
UPDATE_TAG_NAME
:
code
=
mnd
UpdateStbTagName
(
pOld
,
&
stbObj
,
pUpdate
->
pSchema
[
0
].
name
,
pUpdate
->
pSchema
[
1
].
name
);
break
;
case
TSDB_ALTER_TABLE_
MODIFY_TAG_COLUMN
:
code
=
mnd
ChangeSuperTableTag
(
pOld
,
&
stbObj
,
&
pAlter
->
pSchema
[
0
]);
case
TSDB_ALTER_TABLE_
UPDATE_TAG_BYTES
:
code
=
mnd
UpdateStbTagBytes
(
pOld
,
&
stbObj
,
&
pUpdate
->
pSchema
[
0
]);
break
;
case
TSDB_ALTER_TABLE_ADD_COLUMN
:
code
=
mndAddSuperTableColumn
(
pOld
,
&
stbObj
,
p
Alter
->
pSchema
,
1
);
code
=
mndAddSuperTableColumn
(
pOld
,
&
stbObj
,
p
Update
->
pSchema
,
1
);
break
;
case
TSDB_ALTER_TABLE_DROP_COLUMN
:
code
=
mndDropSuperTableColumn
(
pOld
,
&
stbObj
,
p
Alter
->
pSchema
[
0
].
name
);
code
=
mndDropSuperTableColumn
(
pOld
,
&
stbObj
,
p
Update
->
pSchema
[
0
].
name
);
break
;
case
TSDB_ALTER_TABLE_
CHANGE_COLUMN
:
code
=
mnd
ChangeSuperTableColumn
(
pOld
,
&
stbObj
,
&
pAlter
->
pSchema
[
0
]);
case
TSDB_ALTER_TABLE_
UPDATE_COLUMN_BYTES
:
code
=
mnd
UpdateStbColumnBytes
(
pOld
,
&
stbObj
,
&
pUpdate
->
pSchema
[
0
]);
break
;
default:
terrno
=
TSDB_CODE_MND_INVALID_STB_OPTION
;
...
...
@@ -949,7 +949,7 @@ static int32_t mndUpdateStb(SMnode *pMnode, SMnodeMsg *pReq, const SMAlterStbReq
STrans
*
pTrans
=
mndTransCreate
(
pMnode
,
TRN_POLICY_RETRY
,
&
pReq
->
rpcMsg
);
if
(
pTrans
==
NULL
)
goto
UPDATE_STB_OVER
;
mDebug
(
"trans:%d, used to update stb:%s"
,
pTrans
->
id
,
p
Alter
->
name
);
mDebug
(
"trans:%d, used to update stb:%s"
,
pTrans
->
id
,
p
Update
->
name
);
if
(
mndSetUpdateStbRedoLogs
(
pMnode
,
pTrans
,
pDb
,
&
stbObj
)
!=
0
)
goto
UPDATE_STB_OVER
;
if
(
mndSetUpdateStbCommitLogs
(
pMnode
,
pTrans
,
pDb
,
&
stbObj
)
!=
0
)
goto
UPDATE_STB_OVER
;
...
...
@@ -967,35 +967,35 @@ UPDATE_STB_OVER:
static
int32_t
mndProcessMAlterStbReq
(
SMnodeMsg
*
pReq
)
{
SMnode
*
pMnode
=
pReq
->
pMnode
;
SM
AlterStbReq
*
pAlter
=
pReq
->
rpcMsg
.
pCont
;
SM
UpdateStbReq
*
pUpdate
=
pReq
->
rpcMsg
.
pCont
;
mDebug
(
"stb:%s, start to alter"
,
p
Alter
->
name
);
mDebug
(
"stb:%s, start to alter"
,
p
Update
->
name
);
if
(
mndCheckAlterStbReq
(
p
Alter
)
!=
0
)
{
mError
(
"stb:%s, failed to alter since %s"
,
p
Alter
->
name
,
terrstr
());
if
(
mndCheckAlterStbReq
(
p
Update
)
!=
0
)
{
mError
(
"stb:%s, failed to alter since %s"
,
p
Update
->
name
,
terrstr
());
return
-
1
;
}
SStbObj
*
pStb
=
mndAcquireStb
(
pMnode
,
p
Alter
->
name
);
SStbObj
*
pStb
=
mndAcquireStb
(
pMnode
,
p
Update
->
name
);
if
(
pStb
==
NULL
)
{
terrno
=
TSDB_CODE_MND_STB_NOT_EXIST
;
mError
(
"stb:%s, failed to alter since %s"
,
p
Alter
->
name
,
terrstr
());
mError
(
"stb:%s, failed to alter since %s"
,
p
Update
->
name
,
terrstr
());
return
-
1
;
}
SDbObj
*
pDb
=
mndAcquireDbByStb
(
pMnode
,
p
Alter
->
name
);
SDbObj
*
pDb
=
mndAcquireDbByStb
(
pMnode
,
p
Update
->
name
);
if
(
pDb
==
NULL
)
{
mndReleaseStb
(
pMnode
,
pStb
);
terrno
=
TSDB_CODE_MND_DB_NOT_SELECTED
;
mError
(
"stb:%s, failed to update since %s"
,
p
Alter
->
name
,
terrstr
());
mError
(
"stb:%s, failed to update since %s"
,
p
Update
->
name
,
terrstr
());
return
-
1
;
}
int32_t
code
=
mndUpdateStb
(
pMnode
,
pReq
,
p
Alter
,
pDb
,
pStb
);
int32_t
code
=
mndUpdateStb
(
pMnode
,
pReq
,
p
Update
,
pDb
,
pStb
);
mndReleaseStb
(
pMnode
,
pStb
);
if
(
code
!=
0
)
{
mError
(
"stb:%s, failed to alter since %s"
,
p
Alter
->
name
,
tstrerror
(
code
));
mError
(
"stb:%s, failed to alter since %s"
,
p
Update
->
name
,
tstrerror
(
code
));
return
code
;
}
...
...
source/libs/parser/inc/sql.y
浏览文件 @
84911399
...
...
@@ -813,7 +813,7 @@ cmd ::= ALTER TABLE ids(X) cpxName(F) DROP COLUMN ids(A). {
cmd ::= ALTER TABLE ids(X) cpxName(F) MODIFY COLUMN columnlist(A). {
X.n += F.n;
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&X, A, NULL, TSDB_ALTER_TABLE_
CHANGE_COLUMN
, -1);
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&X, A, NULL, TSDB_ALTER_TABLE_
UPDATE_COLUMN_BYTES
, -1);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
...
...
@@ -842,7 +842,7 @@ cmd ::= ALTER TABLE ids(X) cpxName(F) CHANGE TAG ids(Y) ids(Z). {
toTSDBType(Z.type);
A = tListItemAppendToken(A, &Z, -1);
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&X, NULL, A, TSDB_ALTER_TABLE_
CHANGE_TAG_COLUMN
, -1);
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&X, NULL, A, TSDB_ALTER_TABLE_
UPDATE_TAG_NAME
, -1);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
...
...
@@ -859,7 +859,7 @@ cmd ::= ALTER TABLE ids(X) cpxName(F) SET TAG ids(Y) EQ tagitem(Z). {
cmd ::= ALTER TABLE ids(X) cpxName(F) MODIFY TAG columnlist(A). {
X.n += F.n;
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&X, A, NULL, TSDB_ALTER_TABLE_
MODIFY_TAG_COLUMN
, -1);
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&X, A, NULL, TSDB_ALTER_TABLE_
UPDATE_TAG_BYTES
, -1);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
...
...
@@ -882,7 +882,7 @@ cmd ::= ALTER STABLE ids(X) cpxName(F) DROP COLUMN ids(A). {
cmd ::= ALTER STABLE ids(X) cpxName(F) MODIFY COLUMN columnlist(A). {
X.n += F.n;
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&X, A, NULL, TSDB_ALTER_TABLE_
CHANGE_COLUMN
, TSDB_SUPER_TABLE);
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&X, A, NULL, TSDB_ALTER_TABLE_
UPDATE_COLUMN_BYTES
, TSDB_SUPER_TABLE);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
...
...
@@ -911,7 +911,7 @@ cmd ::= ALTER STABLE ids(X) cpxName(F) CHANGE TAG ids(Y) ids(Z). {
toTSDBType(Z.type);
A = tListItemAppendToken(A, &Z, -1);
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&X, NULL, A, TSDB_ALTER_TABLE_
CHANGE_TAG_COLUMN
, TSDB_SUPER_TABLE);
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&X, NULL, A, TSDB_ALTER_TABLE_
UPDATE_TAG_NAME
, TSDB_SUPER_TABLE);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
...
...
@@ -928,7 +928,7 @@ cmd ::= ALTER STABLE ids(X) cpxName(F) SET TAG ids(Y) EQ tagitem(Z). {
cmd ::= ALTER STABLE ids(X) cpxName(F) MODIFY TAG columnlist(A). {
X.n += F.n;
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&X, A, NULL, TSDB_ALTER_TABLE_
MODIFY_TAG_COLUMN
, TSDB_SUPER_TABLE);
SAlterTableInfo* pAlterTable = tSetAlterTableInfo(&X, A, NULL, TSDB_ALTER_TABLE_
UPDATE_TAG_BYTES
, TSDB_SUPER_TABLE);
setSqlInfo(pInfo, pAlterTable, NULL, TSDB_SQL_ALTER_TABLE);
}
...
...
source/libs/parser/src/astGenerator.c
浏览文件 @
84911399
...
...
@@ -610,7 +610,7 @@ SAlterTableInfo *tSetAlterTableInfo(SToken *pTableName, SArray *pCols, SArray *p
pAlterTable
->
type
=
type
;
pAlterTable
->
tableType
=
tableType
;
if
(
type
==
TSDB_ALTER_TABLE_ADD_COLUMN
||
type
==
TSDB_ALTER_TABLE_ADD_TAG_COLUMN
||
type
==
TSDB_ALTER_TABLE_
CHANGE_COLUMN
||
type
==
TSDB_ALTER_TABLE_MODIFY_TAG_COLUMN
)
{
if
(
type
==
TSDB_ALTER_TABLE_ADD_COLUMN
||
type
==
TSDB_ALTER_TABLE_ADD_TAG_COLUMN
||
type
==
TSDB_ALTER_TABLE_
UPDATE_COLUMN_BYTES
||
type
==
TSDB_ALTER_TABLE_UPDATE_TAG_BYTES
)
{
pAlterTable
->
pAddColumns
=
pCols
;
assert
(
pVals
==
NULL
);
}
else
{
...
...
source/libs/parser/src/sql.c
浏览文件 @
84911399
...
...
@@ -3199,7 +3199,7 @@ static void yy_reduce(
case
285
:
/* cmd ::= ALTER TABLE ids cpxName MODIFY COLUMN columnlist */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy165
,
NULL
,
TSDB_ALTER_TABLE_
CHANGE_COLUMN
,
-
1
);
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy165
,
NULL
,
TSDB_ALTER_TABLE_
UPDATE_COLUMN_BYTES
,
-
1
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
...
...
@@ -3231,7 +3231,7 @@ static void yy_reduce(
toTSDBType
(
yymsp
[
0
].
minor
.
yy0
.
type
);
A
=
tListItemAppendToken
(
A
,
&
yymsp
[
0
].
minor
.
yy0
,
-
1
);
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
5
].
minor
.
yy0
,
NULL
,
A
,
TSDB_ALTER_TABLE_
CHANGE_TAG_COLUMN
,
-
1
);
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
5
].
minor
.
yy0
,
NULL
,
A
,
TSDB_ALTER_TABLE_
UPDATE_TAG_NAME
,
-
1
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
...
...
@@ -3250,7 +3250,7 @@ static void yy_reduce(
case
290
:
/* cmd ::= ALTER TABLE ids cpxName MODIFY TAG columnlist */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy165
,
NULL
,
TSDB_ALTER_TABLE_
MODIFY_TAG_COLUMN
,
-
1
);
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy165
,
NULL
,
TSDB_ALTER_TABLE_
UPDATE_TAG_BYTES
,
-
1
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
...
...
@@ -3275,7 +3275,7 @@ static void yy_reduce(
case
293
:
/* cmd ::= ALTER STABLE ids cpxName MODIFY COLUMN columnlist */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy165
,
NULL
,
TSDB_ALTER_TABLE_
CHANGE_COLUMN
,
TSDB_SUPER_TABLE
);
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy165
,
NULL
,
TSDB_ALTER_TABLE_
UPDATE_COLUMN_BYTES
,
TSDB_SUPER_TABLE
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
...
...
@@ -3307,7 +3307,7 @@ static void yy_reduce(
toTSDBType
(
yymsp
[
0
].
minor
.
yy0
.
type
);
A
=
tListItemAppendToken
(
A
,
&
yymsp
[
0
].
minor
.
yy0
,
-
1
);
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
5
].
minor
.
yy0
,
NULL
,
A
,
TSDB_ALTER_TABLE_
CHANGE_TAG_COLUMN
,
TSDB_SUPER_TABLE
);
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
5
].
minor
.
yy0
,
NULL
,
A
,
TSDB_ALTER_TABLE_
UPDATE_TAG_NAME
,
TSDB_SUPER_TABLE
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
...
...
@@ -3326,7 +3326,7 @@ static void yy_reduce(
case
298
:
/* cmd ::= ALTER STABLE ids cpxName MODIFY TAG columnlist */
{
yymsp
[
-
4
].
minor
.
yy0
.
n
+=
yymsp
[
-
3
].
minor
.
yy0
.
n
;
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy165
,
NULL
,
TSDB_ALTER_TABLE_
MODIFY_TAG_COLUMN
,
TSDB_SUPER_TABLE
);
SAlterTableInfo
*
pAlterTable
=
tSetAlterTableInfo
(
&
yymsp
[
-
4
].
minor
.
yy0
,
yymsp
[
0
].
minor
.
yy165
,
NULL
,
TSDB_ALTER_TABLE_
UPDATE_TAG_BYTES
,
TSDB_SUPER_TABLE
);
setSqlInfo
(
pInfo
,
pAlterTable
,
NULL
,
TSDB_SQL_ALTER_TABLE
);
}
break
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录