Merge pull request #3854 from taosdata/hotfix/TD-1711
[TD-1711]<fix>: func taos_validate_sql cause deadlocked
This commit is contained in:
commit
1531995307
|
@ -844,6 +844,8 @@ int taos_validate_sql(TAOS *taos, const char *sql) {
|
||||||
pSql->fp = asyncCallback;
|
pSql->fp = asyncCallback;
|
||||||
pSql->fetchFp = asyncCallback;
|
pSql->fetchFp = asyncCallback;
|
||||||
pSql->param = pSql;
|
pSql->param = pSql;
|
||||||
|
|
||||||
|
registerSqlObj(pSql);
|
||||||
int code = tsParseSql(pSql, true);
|
int code = tsParseSql(pSql, true);
|
||||||
if (code == TSDB_CODE_TSC_ACTION_IN_PROGRESS) {
|
if (code == TSDB_CODE_TSC_ACTION_IN_PROGRESS) {
|
||||||
tsem_wait(&pSql->rspSem);
|
tsem_wait(&pSql->rspSem);
|
||||||
|
|
Loading…
Reference in New Issue