From e41daf16748629c93eb59e51e30c57d65e22be72 Mon Sep 17 00:00:00 2001
From: Zardosht Kasheff <zardosht@tokutek.com>
Date: Wed, 17 Apr 2013 00:02:02 -0400
Subject: [PATCH] [t:2983], add some status messages

git-svn-id: file:///svn/mysql/tokudb-engine/tokudb-engine@24825 c7de825b-a66e-492c-adef-691d508d4ae1
---
 storage/tokudb/hatoku_hton.cc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/storage/tokudb/hatoku_hton.cc b/storage/tokudb/hatoku_hton.cc
index de63252059..b35cd889fd 100644
--- a/storage/tokudb/hatoku_hton.cc
+++ b/storage/tokudb/hatoku_hton.cc
@@ -1153,6 +1153,7 @@ static bool tokudb_show_engine_status(THD * thd, stat_print_fn * stat_print) {
 void tokudb_checkpoint_lock(THD * thd) {
     int error;
     tokudb_trx_data* trx = NULL;
+    char status_msg[200]; //buffer of 200 should be a good upper bound.
     trx = (tokudb_trx_data *) thd_data_get(thd, tokudb_hton->slot);
     if (!trx) {
         error = create_tokudb_trx_data_instance(&trx);
@@ -1170,6 +1171,8 @@ void tokudb_checkpoint_lock(THD * thd) {
     // This can only fail if environment is not created, which is not possible
     // in handlerton
     //
+    sprintf(status_msg, "Trying to grab checkpointing lock.");
+    thd_proc_info(thd, status_msg);
     error = db_env->checkpointing_postpone(db_env);
     assert(!error);
 
@@ -1180,6 +1183,7 @@ cleanup:
 
 void tokudb_checkpoint_unlock(THD * thd) {
     int error;
+    char status_msg[200]; //buffer of 200 should be a good upper bound.
     tokudb_trx_data* trx = NULL;
     trx = (tokudb_trx_data *) thd_data_get(thd, tokudb_hton->slot);
     if (!trx) {
@@ -1193,6 +1197,8 @@ void tokudb_checkpoint_unlock(THD * thd) {
     //
     // at this point, we know the checkpoint lock has been taken
     //
+    sprintf(status_msg, "Trying to release checkpointing lock.");
+    thd_proc_info(thd, status_msg);
     error = db_env->checkpointing_resume(db_env);
     assert(!error);
 
-- 
2.30.9