Merge branch '3.0' into feat/TD-27463-3.0
This commit is contained in:
commit
fa7a09589e
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -70,6 +70,21 @@ typedef struct SUdfdData {
|
|||
int32_t dnodeId;
|
||||
} SUdfdData;
|
||||
|
||||
#ifndef TD_MODULE_OPTIMIZE
|
||||
typedef struct SDnode {
|
||||
int8_t once;
|
||||
bool stop;
|
||||
EDndRunStatus status;
|
||||
SStartupInfo startup;
|
||||
SDnodeData data;
|
||||
SUdfdData udfdData;
|
||||
TdThreadMutex mutex;
|
||||
TdFilePtr lockfile;
|
||||
STfs *pTfs;
|
||||
SMgmtWrapper wrappers[NODE_END];
|
||||
SDnodeTrans trans;
|
||||
} SDnode;
|
||||
#else
|
||||
typedef struct SDnode {
|
||||
int8_t once;
|
||||
bool stop;
|
||||
|
@ -83,6 +98,7 @@ typedef struct SDnode {
|
|||
STfs *pTfs;
|
||||
SMgmtWrapper wrappers[NODE_END];
|
||||
} SDnode;
|
||||
#endif
|
||||
|
||||
// dmEnv.c
|
||||
SDnode *dmInstance();
|
||||
|
|
|
@ -1097,7 +1097,8 @@ int32_t patternMatch(const char *pattern, size_t psize, const char *str, size_t
|
|||
c1 = str[j++];
|
||||
++nMatchChar;
|
||||
|
||||
if (c == '\\' && pattern[i] == '_' && c1 == '_') {
|
||||
if (c == '\\' && pattern[i] == c1 &&
|
||||
(c1 == '_' || c1 == '%')) {
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
|
|
|
@ -204,6 +204,11 @@ TEST(utilTest, char_pattern_match_test) {
|
|||
const char* str12 = NULL;
|
||||
ret = patternMatch(pattern12, 4, str12, 0, &pInfo);
|
||||
ASSERT_EQ(ret, TSDB_PATTERN_NOMATCH);
|
||||
|
||||
const char* pattern13 = "a\\%c";
|
||||
const char* str13 = "a%c";
|
||||
ret = patternMatch(pattern13, 5, str13, strlen(str13), &pInfo);
|
||||
ASSERT_EQ(ret, TSDB_PATTERN_MATCH);
|
||||
}
|
||||
|
||||
TEST(utilTest, char_pattern_match_no_terminated) {
|
||||
|
|
Loading…
Reference in New Issue