We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2032773 commit 4ccad73Copy full SHA for 4ccad73
sql.c
@@ -50,6 +50,7 @@ int reportid = 0;
50
int reportchanges = 0;
51
int statuschanges = 0;
52
int ret = 0;
53
+unsigned long long changed = 0;
54
int linesplit = 0;
55
int safe = 0;
56
int unsafe = 0;
@@ -329,8 +330,7 @@ dosql (const char *origquery)
329
330
else if (*uuid)
331
printf ("%s\n", uuid);
332
}
- if (reportchanges)
333
- printf ("%llu\n", sql_affected_rows (&sql));
+ changed += sql_affected_rows (&sql);
334
if (statuschanges && !sql_affected_rows (&sql))
335
ret++;
336
@@ -514,5 +514,7 @@ main (int argc, const char *argv[])
514
xml = xml_tree_delete (xml);
515
516
#endif
517
+ if (reportchanges)
518
+ printf ("%llu\n", changed);
519
return ret;
520
0 commit comments