fix(tsim/less): use int64_t instead of int32_t for 13 digits ts
This commit is contained in:
parent
41e8a6996f
commit
214c22d44d
|
@ -37,15 +37,15 @@ void simLogSql(char *sql, bool useSharp) {
|
||||||
|
|
||||||
char *simParseHostName(char *varName) {
|
char *simParseHostName(char *varName) {
|
||||||
static char hostName[140];
|
static char hostName[140];
|
||||||
//#ifdef WINDOWS
|
//#ifdef WINDOWS
|
||||||
// hostName[0] = '\"';
|
// hostName[0] = '\"';
|
||||||
// taosGetFqdn(&hostName[1]);
|
// taosGetFqdn(&hostName[1]);
|
||||||
// int strEndIndex = strlen(hostName);
|
// int strEndIndex = strlen(hostName);
|
||||||
// hostName[strEndIndex] = '\"';
|
// hostName[strEndIndex] = '\"';
|
||||||
// hostName[strEndIndex + 1] = '\0';
|
// hostName[strEndIndex + 1] = '\0';
|
||||||
//#else
|
//#else
|
||||||
sprintf(hostName, "%s", "localhost");
|
sprintf(hostName, "%s", "localhost");
|
||||||
//#endif
|
//#endif
|
||||||
return hostName;
|
return hostName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -276,12 +276,16 @@ int32_t simExecuteExpression(SScript *script, char *exp) {
|
||||||
if (op1[0] == '=') {
|
if (op1[0] == '=') {
|
||||||
strcpy(simGetVariable(script, var1 + 1, var1Len - 1), t3);
|
strcpy(simGetVariable(script, var1 + 1, var1Len - 1), t3);
|
||||||
} else if (op1[0] == '<') {
|
} else if (op1[0] == '<') {
|
||||||
val0 = atoi(t0);
|
int64_t val0 = atoll(t0);
|
||||||
val1 = atoi(t3);
|
int64_t val1 = atoll(t3);
|
||||||
|
// val0 = atoi(t0);
|
||||||
|
// val1 = atoi(t3);
|
||||||
if (val0 >= val1) result = -1;
|
if (val0 >= val1) result = -1;
|
||||||
} else if (op1[0] == '>') {
|
} else if (op1[0] == '>') {
|
||||||
val0 = atoi(t0);
|
int64_t val0 = atoll(t0);
|
||||||
val1 = atoi(t3);
|
int64_t val1 = atoll(t3);
|
||||||
|
// val0 = atoi(t0);
|
||||||
|
// val1 = atoi(t3);
|
||||||
if (val0 <= val1) result = -1;
|
if (val0 <= val1) result = -1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -378,16 +382,14 @@ bool simExecuteRunBackCmd(SScript *script, char *option) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void simReplaceDirSep (char *buf){
|
void simReplaceDirSep(char *buf) {
|
||||||
#ifdef WINDOWS
|
#ifdef WINDOWS
|
||||||
int i=0;
|
int i = 0;
|
||||||
while(buf[i] != '\0')
|
while (buf[i] != '\0') {
|
||||||
{
|
if (buf[i] == '/') {
|
||||||
if(buf[i] == '/')
|
buf[i] = '\\';
|
||||||
{
|
}
|
||||||
buf[i] = '\\';
|
i++;
|
||||||
}
|
|
||||||
i++;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -505,7 +507,7 @@ bool simExecuteSystemContentCmd(SScript *script, char *option) {
|
||||||
}
|
}
|
||||||
|
|
||||||
bool simExecuteSetBIModeCmd(SScript *script, char *option) {
|
bool simExecuteSetBIModeCmd(SScript *script, char *option) {
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
|
|
||||||
simVisuallizeOption(script, option, buf);
|
simVisuallizeOption(script, option, buf);
|
||||||
option = buf;
|
option = buf;
|
||||||
|
|
Loading…
Reference in New Issue