fix bug
This commit is contained in:
parent
048a61e2f5
commit
d6635a0d12
|
@ -1528,13 +1528,14 @@ int taos_stmt_prepare(TAOS_STMT* stmt, const char* sql, unsigned long length) {
|
||||||
|
|
||||||
int taos_stmt_set_tbname_tags(TAOS_STMT* stmt, const char* name, TAOS_BIND* tags) {
|
int taos_stmt_set_tbname_tags(TAOS_STMT* stmt, const char* name, TAOS_BIND* tags) {
|
||||||
STscStmt* pStmt = (STscStmt*)stmt;
|
STscStmt* pStmt = (STscStmt*)stmt;
|
||||||
SSqlObj* pSql = pStmt->pSql;
|
|
||||||
SSqlCmd* pCmd = &pSql->cmd;
|
|
||||||
|
|
||||||
if (stmt == NULL || pStmt->pSql == NULL || pStmt->taos == NULL) {
|
if (stmt == NULL || pStmt->pSql == NULL || pStmt->taos == NULL) {
|
||||||
STMT_RET(TSDB_CODE_TSC_DISCONNECTED);
|
STMT_RET(TSDB_CODE_TSC_DISCONNECTED);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SSqlObj* pSql = pStmt->pSql;
|
||||||
|
SSqlCmd* pCmd = &pSql->cmd;
|
||||||
|
|
||||||
if (name == NULL) {
|
if (name == NULL) {
|
||||||
tscError("0x%"PRIx64" name is NULL", pSql->self);
|
tscError("0x%"PRIx64" name is NULL", pSql->self);
|
||||||
STMT_RET(invalidOperationMsg(tscGetErrorMsgPayload(&pStmt->pSql->cmd), "name is NULL"));
|
STMT_RET(invalidOperationMsg(tscGetErrorMsgPayload(&pStmt->pSql->cmd), "name is NULL"));
|
||||||
|
|
Loading…
Reference in New Issue