Merge pull request #3854 from taosdata/hotfix/TD-1711

[TD-1711]<fix>: func taos_validate_sql cause deadlocked
This commit is contained in:
Shengliang Guan 2020-10-15 12:11:06 +08:00 committed by GitHub
commit 1531995307
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -844,6 +844,8 @@ int taos_validate_sql(TAOS *taos, const char *sql) {
pSql->fp = asyncCallback;
pSql->fetchFp = asyncCallback;
pSql->param = pSql;
registerSqlObj(pSql);
int code = tsParseSql(pSql, true);
if (code == TSDB_CODE_TSC_ACTION_IN_PROGRESS) {
tsem_wait(&pSql->rspSem);