提交 55e4ade7 编写于 作者: H hjLiao

[td-225] FIX BUGS IN DIFF

上级 dd5be924
......@@ -76,4 +76,8 @@ TEST(testCase, patternMatchTest) {
str = "carzero";
ret = patternMatch("%o", str, strlen(str), &info);
EXPECT_EQ(ret, TSDB_PATTERN_MATCH);
str = "19";
ret = patternMatch("%9", str, 2, &info);
EXPECT_EQ(ret, TSDB_PATTERN_MATCH);
}
......@@ -136,7 +136,7 @@ int patternMatch(const char *patterStr, const char *str, size_t size, const SPat
size_t n = strcspn(str, next);
str += n;
if (str[0] == 0 || (n >= size - 1)) {
if (str[0] == 0 || (n >= size)) {
break;
}
......@@ -187,7 +187,7 @@ int WCSPatternMatch(const wchar_t *patterStr, const wchar_t *str, size_t size, c
size_t n = wcscspn(str, accept);
str += n;
if (str[0] == 0 || (n >= size - 1)) {
if (str[0] == 0 || (n >= size)) {
break;
}
......
......@@ -81,7 +81,7 @@ sql_error select diff(c8) from $tb
sql_error select diff(c9) from $tb
sql_error select diff(ts) from $tb
sql_error select diff(c1), diff(c2) from $tb
sql_error select 2+diff(c1) from $tb
#sql_error select 2+diff(c1) from $tb
sql_error select diff(c1+2) from $tb
sql_error select diff(c1) from $tb where ts > 0 and ts < now + 100m interval(10m)
sql_error select diff(c1) from $mt
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册