Commit 22501d2c authored by Rich Prohaska's avatar Rich Prohaska Committed by Yoni Fogel

#3185 simplify the check info messages refs[t:3185]

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@28197 c7de825b-a66e-492c-adef-691d508d4ae1
parent 863f8aa9
...@@ -7338,12 +7338,11 @@ ha_tokudb::check(THD *thd, HA_CHECK_OPT *check_opt) { ...@@ -7338,12 +7338,11 @@ ha_tokudb::check(THD *thd, HA_CHECK_OPT *check_opt) {
uint32_t num_DBs = table_share->keys + test(hidden_primary_key); uint32_t num_DBs = table_share->keys + test(hidden_primary_key);
time_t now; time_t now;
char timebuf[32]; char timebuf[32];
snprintf(write_status_msg, sizeof write_status_msg, snprintf(write_status_msg, sizeof write_status_msg, "%s primary=%d num=%d", share->table_name, primary_key, num_DBs);
"ha_tokudb::check %s primary=%d num=%d", share->table_name, primary_key, num_DBs);
ha_tokudb_check_info(thd, table, write_status_msg); ha_tokudb_check_info(thd, table, write_status_msg);
if (verbose) { if (verbose) {
now = time(0); now = time(0);
fprintf(stderr, "%.24s %s\n", ctime_r(&now, timebuf), write_status_msg); fprintf(stderr, "%.24s ha_tokudb::check %s\n", ctime_r(&now, timebuf), write_status_msg);
} }
for (uint i = 0; i < num_DBs; i++) { for (uint i = 0; i < num_DBs; i++) {
time_t now; time_t now;
...@@ -7351,23 +7350,21 @@ ha_tokudb::check(THD *thd, HA_CHECK_OPT *check_opt) { ...@@ -7351,23 +7350,21 @@ ha_tokudb::check(THD *thd, HA_CHECK_OPT *check_opt) {
const char *kname = table_share->key_info[i].name; const char *kname = table_share->key_info[i].name;
if (i == primary_key) if (i == primary_key)
kname = "primary"; // hidden primary key does not set name kname = "primary"; // hidden primary key does not set name
snprintf(write_status_msg, sizeof write_status_msg, snprintf(write_status_msg, sizeof write_status_msg, "%s key=%s %u", share->table_name, kname, i);
"ha_tokudb::check %s key=%s %u", share->table_name, kname, i);
thd_proc_info(thd, write_status_msg); thd_proc_info(thd, write_status_msg);
ha_tokudb_check_info(thd, table, write_status_msg); ha_tokudb_check_info(thd, table, write_status_msg);
if (verbose) { if (verbose) {
now = time(0); now = time(0);
fprintf(stderr, "%.24s %s\n", ctime_r(&now, timebuf), write_status_msg); fprintf(stderr, "%.24s ha_tokudb::check %s\n", ctime_r(&now, timebuf), write_status_msg);
} }
struct check_context check_context = { thd }; struct check_context check_context = { thd };
r = db->verify_with_progress(db, ha_tokudb_check_progress, &check_context, verbose, keep_going); r = db->verify_with_progress(db, ha_tokudb_check_progress, &check_context, verbose, keep_going);
snprintf(write_status_msg, sizeof write_status_msg, snprintf(write_status_msg, sizeof write_status_msg, "%s key=%s %u result=%d", share->table_name, kname, i, r);
"ha_tokudb::check %s key=%s %u result=%d", share->table_name, kname, i, r);
thd_proc_info(thd, write_status_msg); thd_proc_info(thd, write_status_msg);
ha_tokudb_check_info(thd, table, write_status_msg); ha_tokudb_check_info(thd, table, write_status_msg);
if (verbose) { if (verbose) {
now = time(0); now = time(0);
fprintf(stderr, "%.24s %s\n", ctime_r(&now, timebuf), write_status_msg); fprintf(stderr, "%.24s ha_tokudb::check %s\n", ctime_r(&now, timebuf), write_status_msg);
} }
if (result == HA_ADMIN_OK && r != 0) if (result == HA_ADMIN_OK && r != 0)
result = HA_ADMIN_CORRUPT; result = HA_ADMIN_CORRUPT;
......
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