[td-225] add log for debug purpose
This commit is contained in:
parent
162c01243d
commit
75ca521a86
|
@ -1348,15 +1348,10 @@ 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);
|
|
||||||
ret = tsParseInsertSql(pSql);
|
ret = tsParseInsertSql(pSql);
|
||||||
if ((sqlstr == NULL) || (pSql->parseRetry >= 1) ||
|
if ((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);
|
||||||
|
@ -1365,9 +1360,11 @@ int tsParseSql(SSqlObj *pSql, bool initial) {
|
||||||
} else {
|
} else {
|
||||||
SSqlInfo SQLInfo = qSqlParse(pSql->sqlstr);
|
SSqlInfo SQLInfo = qSqlParse(pSql->sqlstr);
|
||||||
ret = tscToSQLCmd(pSql, &SQLInfo);
|
ret = tscToSQLCmd(pSql, &SQLInfo);
|
||||||
if (ret == TSDB_CODE_TSC_INVALID_SQL && pSql->parseRetry == 0 && SQLInfo.type == TSDB_SQL_NULL) {
|
if (ret == TSDB_CODE_TSC_INVALID_SQL && pSql->parseRetry == 0/* && SQLInfo.type == TSDB_SQL_NULL*/) {
|
||||||
|
tscDebug("0x%"PRIx64 " parse sql failed, retry again after clear local meta cache", pSql->self);
|
||||||
tscResetSqlCmd(pCmd, true);
|
tscResetSqlCmd(pCmd, true);
|
||||||
pSql->parseRetry++;
|
pSql->parseRetry++;
|
||||||
|
|
||||||
ret = tscToSQLCmd(pSql, &SQLInfo);
|
ret = tscToSQLCmd(pSql, &SQLInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2517,7 +2517,7 @@ static int32_t getTableMetaFromMnode(SSqlObj *pSql, STableMetaInfo *pTableMetaIn
|
||||||
pNew->fp = tscTableMetaCallBack;
|
pNew->fp = tscTableMetaCallBack;
|
||||||
pNew->param = (void *)pSql->self;
|
pNew->param = (void *)pSql->self;
|
||||||
|
|
||||||
tscDebug("0x%"PRIx64" metaRid from %" PRId64 " to %" PRId64 , pSql->self, pSql->metaRid, pNew->self);
|
tscDebug("0x%"PRIx64" metaRid from %" PRId64 " to 0x%" PRIx64 , pSql->self, pSql->metaRid, pNew->self);
|
||||||
|
|
||||||
pSql->metaRid = pNew->self;
|
pSql->metaRid = pNew->self;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue