Commit 0e4317ce authored by Rich Prohaska's avatar Rich Prohaska

#166 pretty print external lock type

parent 8c25ba62
...@@ -6112,6 +6112,12 @@ int ha_tokudb::create_txn(THD* thd, tokudb_trx_data* trx) { ...@@ -6112,6 +6112,12 @@ int ha_tokudb::create_txn(THD* thd, tokudb_trx_data* trx) {
return error; return error;
} }
static const char *lock_type_str(int lock_type) {
if (lock_type == F_RDLCK) return "F_RDLCK";
if (lock_type == F_WRLCK) return "F_WRLCK";
if (lock_type == F_UNLCK) return "F_UNLCK";
return "?";
}
/* /*
As MySQL will execute an external lock for every new table it uses As MySQL will execute an external lock for every new table it uses
...@@ -6130,9 +6136,9 @@ int ha_tokudb::create_txn(THD* thd, tokudb_trx_data* trx) { ...@@ -6130,9 +6136,9 @@ int ha_tokudb::create_txn(THD* thd, tokudb_trx_data* trx) {
// error otherwise // error otherwise
// //
int ha_tokudb::external_lock(THD * thd, int lock_type) { int ha_tokudb::external_lock(THD * thd, int lock_type) {
TOKUDB_HANDLER_DBUG_ENTER("cmd=%d %d", thd_sql_command(thd), lock_type); TOKUDB_HANDLER_DBUG_ENTER("cmd=%d %d %s", thd_sql_command(thd), lock_type, lock_type_str(lock_type));
if (tokudb_debug & TOKUDB_DEBUG_LOCK) if (tokudb_debug & TOKUDB_DEBUG_LOCK)
TOKUDB_TRACE("%s cmd=%d %d", __FUNCTION__, thd_sql_command(thd), lock_type); TOKUDB_TRACE("%s cmd=%d %d %s", __FUNCTION__, thd_sql_command(thd), lock_type, lock_type_str(lock_type));
int error = 0; int error = 0;
tokudb_trx_data *trx = NULL; tokudb_trx_data *trx = NULL;
......
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