add error
This commit is contained in:
parent
69e402d547
commit
ac2d9ab276
|
@ -1911,13 +1911,13 @@ SNode* createAlterTableAddModifyColOptions2(SAstCreateContext* pCxt, SNode* pRea
|
||||||
|
|
||||||
if (pOptions != NULL) {
|
if (pOptions != NULL) {
|
||||||
SColumnOptions* pOption = (SColumnOptions*)pOptions;
|
SColumnOptions* pOption = (SColumnOptions*)pOptions;
|
||||||
if (pOption->bPrimaryKey == false || pOption->commentNull == true) {
|
if (pOption->bPrimaryKey == false && pOption->commentNull == true) {
|
||||||
if (strlen(pOption->compress) != 0 || strlen(pOption->compressLevel) || strlen(pOption->encode) != 0) {
|
if (strlen(pOption->compress) != 0 || strlen(pOption->compressLevel) || strlen(pOption->encode) != 0) {
|
||||||
pStmt->alterType = TSDB_ALTER_TABLE_ADD_COLUMN_WITH_COMPRESS_OPTION;
|
pStmt->alterType = TSDB_ALTER_TABLE_ADD_COLUMN_WITH_COMPRESS_OPTION;
|
||||||
} else {
|
} else {
|
||||||
pCxt->errCode = generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR,
|
// pCxt->errCode = generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR,
|
||||||
"not support alter column with option except compress");
|
// "not support alter column with option except compress");
|
||||||
return NULL;
|
// return NULL;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pCxt->errCode = generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR,
|
pCxt->errCode = generateSyntaxErrMsgExt(&pCxt->msgBuf, TSDB_CODE_PAR_SYNTAX_ERROR,
|
||||||
|
|
Loading…
Reference in New Issue