reset code
This commit is contained in:
parent
9cd45522cc
commit
cf3b1b12fd
|
@ -1345,12 +1345,15 @@ int tsParseSql(SSqlObj *pSql, bool initial) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// make a backup as tsParseInsertSql may modify the string
|
// make a backup as tsParseInsertSql may modify the string
|
||||||
// char* sqlstr = strdup(pSql->sqlstr);
|
char* sqlstr = strdup(pSql->sqlstr);
|
||||||
ret = tsParseInsertSql(pSql);
|
ret = tsParseInsertSql(pSql);
|
||||||
if (/*(sqlstr == NULL) || */(pSql->parseRetry >= 1) ||
|
if ((sqlstr == NULL) || (pSql->parseRetry >= 1) ||
|
||||||
(ret != TSDB_CODE_TSC_SQL_SYNTAX_ERROR && ret != TSDB_CODE_TSC_INVALID_SQL)) {
|
(ret != TSDB_CODE_TSC_SQL_SYNTAX_ERROR && ret != TSDB_CODE_TSC_INVALID_SQL)) {
|
||||||
|
free(sqlstr);
|
||||||
} else {
|
} else {
|
||||||
tscResetSqlCmd(pCmd, true);
|
tscResetSqlCmd(pCmd, true);
|
||||||
|
free(pSql->sqlstr);
|
||||||
|
pSql->sqlstr = sqlstr;
|
||||||
pSql->parseRetry++;
|
pSql->parseRetry++;
|
||||||
if ((ret = tsInsertInitialCheck(pSql)) == TSDB_CODE_SUCCESS) {
|
if ((ret = tsInsertInitialCheck(pSql)) == TSDB_CODE_SUCCESS) {
|
||||||
ret = tsParseInsertSql(pSql);
|
ret = tsParseInsertSql(pSql);
|
||||||
|
|
Loading…
Reference in New Issue