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

show engine tokudb logs always reports nothing. the tokudb log_archhive...

show engine tokudb logs always reports nothing.  the tokudb log_archhive function always returns EINVAL since it does not support flags!=0.  set log_archive flags=0 for tokudb to avoid EINVAL return.  addresses #697



git-svn-id: file:///svn/mysql/tokudb-engine/src@3450 c7de825b-a66e-492c-adef-691d508d4ae1
parent 672800db
...@@ -522,9 +522,10 @@ static bool tokudb_show_logs(THD * thd, stat_print_fn * stat_print) { ...@@ -522,9 +522,10 @@ static bool tokudb_show_logs(THD * thd, stat_print_fn * stat_print) {
*root_ptr = &show_logs_root; *root_ptr = &show_logs_root;
all_logs = free_logs = 0; all_logs = free_logs = 0;
if ((error = db_env->log_archive(db_env, &all_logs, DB_ARCH_ABS | DB_ARCH_LOG)) || (error = db_env->log_archive(db_env, &free_logs, DB_ARCH_ABS))) { error = db_env->log_archive(db_env, &all_logs, 0);
if (error) {
DBUG_PRINT("error", ("log_archive failed (error %d)", error)); DBUG_PRINT("error", ("log_archive failed (error %d)", error));
db_env->err(db_env, error, "log_archive: DB_ARCH_ABS"); db_env->err(db_env, error, "log_archive");
if (error == DB_NOTFOUND) if (error == DB_NOTFOUND)
error = 0; // No log files error = 0; // No log files
goto err; goto err;
...@@ -570,23 +571,25 @@ void tokudb_cleanup_log_files(void) { ...@@ -570,23 +571,25 @@ void tokudb_cleanup_log_files(void) {
char **names; char **names;
int error; int error;
// by HF. Sometimes it crashes. TODO - find out why // QQQ by HF. Sometimes it crashes. TODO - find out why
#ifndef EMBEDDED_LIBRARY #ifndef EMBEDDED_LIBRARY
/* XXX: Probably this should be done somewhere else, and /* XXX: Probably this should be done somewhere else, and
* should be tunable by the user. */ * should be tunable by the user. */
if ((error = db_env->txn_checkpoint(db_env, 0, 0, 0))) if ((error = db_env->txn_checkpoint(db_env, 0, 0, 0)))
my_error(ER_ERROR_DURING_CHECKPOINT, MYF(0), error); my_error(ER_ERROR_DURING_CHECKPOINT, MYF(0), error);
#endif #endif
if ((error = db_env->log_archive(db_env, &names, DB_ARCH_ABS)) != 0) { if ((error = db_env->log_archive(db_env, &names, 0)) != 0) {
DBUG_PRINT("error", ("log_archive failed (error %d)", error)); DBUG_PRINT("error", ("log_archive failed (error %d)", error));
db_env->err(db_env, error, "log_archive: DB_ARCH_ABS"); db_env->err(db_env, error, "log_archive");
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
if (names) { if (names) {
char **np; char **np;
for (np = names; *np; ++np) for (np = names; *np; ++np) {
my_delete(*np, MYF(MY_WME)); printf("%d:%s:%d:delete:%s\n", my_tid(), __FILE__, __LINE__, *np);
// my_delete(*np, MYF(MY_WME));
}
free(names); free(names);
} }
......
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