Commit b02ad593 authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

fixup progress tracking refs[t:2082]

git-svn-id: file:///svn/mysql/tokudb-engine/src@15063 c7de825b-a66e-492c-adef-691d508d4ae1
parent c84eb73e
...@@ -3990,22 +3990,26 @@ void ha_tokudb::track_progress(THD* thd) { ...@@ -3990,22 +3990,26 @@ void ha_tokudb::track_progress(THD* thd) {
bool first = true; bool first = true;
int r; int r;
if (trx->stmt_progress.queried) { if (trx->stmt_progress.queried) {
r = sprintf(next_status, "Queried about %llu rows", trx->stmt_progress.queried); assert(r >= 0); r = sprintf(next_status, "Queried about %llu row%s", trx->stmt_progress.queried, trx->stmt_progress.queried == 1 ? "" : "s");
assert(r >= 0);
next_status += r; next_status += r;
first = false; first = false;
} }
if (trx->stmt_progress.inserted) { if (trx->stmt_progress.inserted) {
r = sprintf(next_status, "%sInserted about %llu rows", first ? "" : ", ", trx->stmt_progress.inserted); assert(r >= 0); r = sprintf(next_status, "%sInserted about %llu row%s", first ? "" : ", ", trx->stmt_progress.inserted, trx->stmt_progress.inserted == 1 ? "" : "s");
assert(r >= 0);
next_status += r; next_status += r;
first = false; first = false;
} }
if (trx->stmt_progress.updated) { if (trx->stmt_progress.updated) {
r = sprintf(next_status, "%sUpdated about %llu rows", first ? "" : ", ", trx->stmt_progress.updated); assert(r >= 0); r = sprintf(next_status, "%sUpdated about %llu row%s", first ? "" : ", ", trx->stmt_progress.updated, trx->stmt_progress.updated == 1 ? "" : "s");
assert(r >= 0);
next_status += r; next_status += r;
first = false; first = false;
} }
if (trx->stmt_progress.deleted) { if (trx->stmt_progress.deleted) {
r = sprintf(next_status, "%sDeleted about %llu rows", first ? "" : ", ", trx->stmt_progress.deleted); assert(r >= 0); r = sprintf(next_status, "%sDeleted about %llu row%s", first ? "" : ", ", trx->stmt_progress.deleted, trx->stmt_progress.deleted == 1 ? "" : "s");
assert(r >= 0);
next_status += r; next_status += r;
first = false; first = false;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment