Skip to content

Commit

Permalink
fix: taosdump handle update for tdengine 3.x better (#676)
Browse files Browse the repository at this point in the history
* fix: taosdump handle update for tdengine 3.x better

* fix: special bug in old taosdump to generate update adhere with minrows
  • Loading branch information
sangshuduo committed Jun 13, 2023
1 parent 50c259c commit ca353a9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/taosdump.c
Original file line number Diff line number Diff line change
Expand Up @@ -9909,13 +9909,20 @@ bool convertDbClauseForV3(char **cmd) {

int pos = 0;
while (sub_str) {
if ((0 == strncmp(sub_str, "UPDATE1", strlen("UPDATE1")))
|| (0 == strncmp(sub_str, "UPDATE2", strlen("UPDATE2")))) {
sub_str += strlen("UPDATE1");
}

if (0 == strcmp(sub_str, "QUORUM")) {
sub_str = strsep(&running, " ");
} else if (0 == strcmp(sub_str, "DAYS")) {
sub_str = strsep(&running, " ");
pos += sprintf(*cmd + pos, "DURATION %dm ", atoi(sub_str)*24*60);
} else if (0 == strcmp(sub_str, "CACHE")) {
sub_str = strsep(&running, " ");
} else if (0 == strcmp(sub_str, "UPDATE")) {
sub_str = strsep(&running, " ");
} else if (0 == strcmp(sub_str, "BLOCKS")) {
sub_str = strsep(&running, " ");
} else if (0 == strcmp(sub_str, "FSYNC")) {
Expand Down

0 comments on commit ca353a9

Please sign in to comment.