mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 21:12:26 +01:00
#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
This commit is contained in:
parent
d6596d5883
commit
765ba72384
1 changed files with 6 additions and 9 deletions
|
@ -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);
|
||||
time_t now;
|
||||
char timebuf[32];
|
||||
snprintf(write_status_msg, sizeof write_status_msg,
|
||||
"ha_tokudb::check %s primary=%d num=%d", share->table_name, primary_key, num_DBs);
|
||||
snprintf(write_status_msg, sizeof write_status_msg, "%s primary=%d num=%d", share->table_name, primary_key, num_DBs);
|
||||
ha_tokudb_check_info(thd, table, write_status_msg);
|
||||
if (verbose) {
|
||||
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++) {
|
||||
time_t now;
|
||||
|
@ -7351,23 +7350,21 @@ ha_tokudb::check(THD *thd, HA_CHECK_OPT *check_opt) {
|
|||
const char *kname = table_share->key_info[i].name;
|
||||
if (i == primary_key)
|
||||
kname = "primary"; // hidden primary key does not set name
|
||||
snprintf(write_status_msg, sizeof write_status_msg,
|
||||
"ha_tokudb::check %s key=%s %u", share->table_name, kname, i);
|
||||
snprintf(write_status_msg, sizeof write_status_msg, "%s key=%s %u", share->table_name, kname, i);
|
||||
thd_proc_info(thd, write_status_msg);
|
||||
ha_tokudb_check_info(thd, table, write_status_msg);
|
||||
if (verbose) {
|
||||
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 };
|
||||
r = db->verify_with_progress(db, ha_tokudb_check_progress, &check_context, verbose, keep_going);
|
||||
snprintf(write_status_msg, sizeof write_status_msg,
|
||||
"ha_tokudb::check %s key=%s %u result=%d", share->table_name, kname, i, r);
|
||||
snprintf(write_status_msg, sizeof write_status_msg, "%s key=%s %u result=%d", share->table_name, kname, i, r);
|
||||
thd_proc_info(thd, write_status_msg);
|
||||
ha_tokudb_check_info(thd, table, write_status_msg);
|
||||
if (verbose) {
|
||||
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)
|
||||
result = HA_ADMIN_CORRUPT;
|
||||
|
|
Loading…
Reference in a new issue