[td-1603] add new error code at client side
This commit is contained in:
parent
100121251f
commit
c63ec824f3
|
@ -430,7 +430,7 @@ static int32_t tscGetTableTagValue(SCreateBuilder *builder, char *result) {
|
|||
SSqlObj* pSql = builder->pInterSql;
|
||||
|
||||
if (row == NULL) {
|
||||
return TSDB_CODE_MND_INVALID_TABLE_NAME;
|
||||
return TSDB_CODE_TSC_INVALID_TABLE_NAME;
|
||||
}
|
||||
|
||||
int32_t* lengths = taos_fetch_lengths(pSql);
|
||||
|
@ -458,7 +458,7 @@ static int32_t tscGetTableTagValue(SCreateBuilder *builder, char *result) {
|
|||
}
|
||||
|
||||
if (0 == strlen(result)) {
|
||||
return TSDB_CODE_MND_INVALID_TABLE_NAME;
|
||||
return TSDB_CODE_TSC_INVALID_TABLE_NAME;
|
||||
}
|
||||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
|
@ -554,7 +554,7 @@ int32_t tscRebuildCreateTableStatement(void *param,char *result) {
|
|||
static int32_t tscGetDBInfo(SCreateBuilder *builder, char *result) {
|
||||
TAOS_ROW row = tscFetchRow(builder);
|
||||
if (row == NULL) {
|
||||
return TSDB_CODE_MND_DB_NOT_SELECTED;
|
||||
return TSDB_CODE_TSC_DB_NOT_SELECTED;
|
||||
}
|
||||
const char *showColumns[] = {"REPLICA", "QUORUM", "DAYS", "KEEP", "BLOCKS", NULL};
|
||||
|
||||
|
@ -586,7 +586,7 @@ static int32_t tscGetDBInfo(SCreateBuilder *builder, char *result) {
|
|||
} while (row != NULL);
|
||||
|
||||
if (0 == strlen(result)) {
|
||||
return TSDB_CODE_MND_DB_NOT_SELECTED;
|
||||
return TSDB_CODE_TSC_DB_NOT_SELECTED;
|
||||
}
|
||||
|
||||
return TSDB_CODE_SUCCESS;
|
||||
|
|
|
@ -821,7 +821,7 @@ int32_t tscSetTableFullName(STableMetaInfo* pTableMetaInfo, SStrToken* pzTableNa
|
|||
SStrToken t = {0};
|
||||
getCurrentDBName(pSql, &t);
|
||||
if (t.n == 0) { // current database not available or not specified
|
||||
code = TSDB_CODE_MND_DB_NOT_SELECTED;
|
||||
code = TSDB_CODE_TSC_DB_NOT_SELECTED;
|
||||
} else {
|
||||
code = setObjFullName(pTableMetaInfo->name, NULL, &t, pzTableName, NULL);
|
||||
if (code != 0) {
|
||||
|
|
|
@ -99,6 +99,8 @@ TAOS_DEFINE_ERROR(TSDB_CODE_TSC_DISCONNECTED, 0, 0x0213, "Disconnect
|
|||
TAOS_DEFINE_ERROR(TSDB_CODE_TSC_NO_WRITE_AUTH, 0, 0x0214, "No write permission")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_TSC_CONN_KILLED, 0, 0x0215, "Connection killed")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_TSC_SQL_SYNTAX_ERROR, 0, 0x0216, "Syntax error in SQL")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_TSC_DB_NOT_SELECTED, 0, 0x0217, "Database not specified or available")
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_TSC_INVALID_TABLE_NAME, 0, 0x0218, "Table does not exist")
|
||||
|
||||
// mnode
|
||||
TAOS_DEFINE_ERROR(TSDB_CODE_MND_MSG_NOT_PROCESSED, 0, 0x0300, "Message not processed")
|
||||
|
|
Loading…
Reference in New Issue