enh: optimize the error message for the case of the drop column
This commit is contained in:
parent
a11ad2a871
commit
ef50e5d407
|
@ -392,6 +392,7 @@ int32_t taosGetErrSize();
|
|||
#define TSDB_CODE_MND_INVALID_SCHEMA_VER TAOS_DEF_ERROR_CODE(0, 0x03C6)
|
||||
#define TSDB_CODE_MND_STABLE_UID_NOT_MATCH TAOS_DEF_ERROR_CODE(0, 0x03C7)
|
||||
#define TSDB_CODE_MND_FIELD_CONFLICT_WITH_TSMA TAOS_DEF_ERROR_CODE(0, 0x03C8)
|
||||
#define TSDB_CODE_MND_ONLY_TS_SCHEMA_NOT_ALLOW TAOS_DEF_ERROR_CODE(0, 0x03C9)
|
||||
|
||||
// mnode-trans
|
||||
#define TSDB_CODE_MND_TRANS_ALREADY_EXIST TAOS_DEF_ERROR_CODE(0, 0x03D0)
|
||||
|
|
|
@ -1928,7 +1928,7 @@ static int32_t mndDropSuperTableColumn(SMnode *pMnode, const SStbObj *pOld, SStb
|
|||
}
|
||||
|
||||
if (pOld->numOfColumns == 2) {
|
||||
code = TSDB_CODE_MND_INVALID_STB_ALTER_OPTION;
|
||||
code = TSDB_CODE_MND_ONLY_TS_SCHEMA_NOT_ALLOW;
|
||||
TAOS_RETURN(code);
|
||||
}
|
||||
|
||||
|
@ -4295,9 +4295,9 @@ static int32_t mndDropTbAdd(SMnode *pMnode, SHashObj *pVgHashMap, const SVgroupI
|
|||
return 0;
|
||||
}
|
||||
|
||||
int vgInfoCmp(const void* lp, const void* rp) {
|
||||
SVgroupInfo* pLeft = (SVgroupInfo*)lp;
|
||||
SVgroupInfo* pRight = (SVgroupInfo*)rp;
|
||||
int vgInfoCmp(const void *lp, const void *rp) {
|
||||
SVgroupInfo *pLeft = (SVgroupInfo *)lp;
|
||||
SVgroupInfo *pRight = (SVgroupInfo *)rp;
|
||||
if (pLeft->hashBegin < pRight->hashBegin) {
|
||||
return -1;
|
||||
} else if (pLeft->hashBegin > pRight->hashBegin) {
|
||||
|
|
|
@ -307,6 +307,7 @@ TAOS_DEFINE_ERROR(TSDB_CODE_MND_STABLE_UID_NOT_MATCH, "Invalid stable uid")
|
|||
TAOS_DEFINE_ERROR(TSDB_CODE_MND_FIELD_CONFLICT_WITH_TSMA, "Field used by tsma")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_MND_DNODE_IN_CREATING, "Dnode in creating status")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_MND_DNODE_IN_DROPPING, "Dnode in dropping status")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_MND_ONLY_TS_SCHEMA_NOT_ALLOW, "Schema with only ts field is not allowed")
|
||||
|
||||
// mnode-trans
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_MND_TRANS_ALREADY_EXIST, "Transaction already exists")
|
||||
|
|
Loading…
Reference in New Issue