Commit 9ff49836 authored by Rich Prohaska's avatar Rich Prohaska

#90 set tokudb_last_lock_timeout to a string parsable by the python json module

parent 374ea3bc
...@@ -1824,9 +1824,9 @@ static void tokudb_lock_timeout_callback(DB *db, uint64_t requesting_txnid, cons ...@@ -1824,9 +1824,9 @@ static void tokudb_lock_timeout_callback(DB *db, uint64_t requesting_txnid, cons
log_str.append("{"); log_str.append("{");
log_str.append("\"mysql_thread_id\":"); log_str.append("\"mysql_thread_id\":");
log_str.append_ulonglong(thd->thread_id); log_str.append_ulonglong(thd->thread_id);
log_str.append(", \"dbname\":\""); log_str.append(", \"dbname\":");
log_str.append(tokudb_get_index_name(db)); log_str.append("\""); log_str.append(tokudb_get_index_name(db)); log_str.append("\"");
log_str.append("\", \"requesting_txnid\":"); log_str.append(", \"requesting_txnid\":");
log_str.append_ulonglong(requesting_txnid); log_str.append_ulonglong(requesting_txnid);
log_str.append(", \"blocking_txnid\":"); log_str.append(", \"blocking_txnid\":");
log_str.append_ulonglong(blocking_txnid); log_str.append_ulonglong(blocking_txnid);
...@@ -1834,18 +1834,18 @@ static void tokudb_lock_timeout_callback(DB *db, uint64_t requesting_txnid, cons ...@@ -1834,18 +1834,18 @@ static void tokudb_lock_timeout_callback(DB *db, uint64_t requesting_txnid, cons
String key_str; String key_str;
tokudb_pretty_key(db, left_key, "?", &key_str); tokudb_pretty_key(db, left_key, "?", &key_str);
log_str.append(", \"key\":"); log_str.append(", \"key\":");
log_str.append(key_str); log_str.append("\""); log_str.append(key_str); log_str.append("\"");
} else { } else {
String left_str; String left_str;
tokudb_pretty_left_key(db, left_key, &left_str); tokudb_pretty_left_key(db, left_key, &left_str);
log_str.append(", \"key_left\":\""); log_str.append(", \"key_left\":");
log_str.append(left_str); log_str.append("\""); log_str.append(left_str); log_str.append("\"");
String right_str; String right_str;
tokudb_pretty_right_key(db, right_key, &right_str); tokudb_pretty_right_key(db, right_key, &right_str);
log_str.append("\", \"key_right\":\""); log_str.append(", \"key_right\":");
log_str.append(right_str); log_str.append("\""); log_str.append(right_str); log_str.append("\"");
} }
log_str.append("\"}"); log_str.append("}");
// set last_lock_timeout // set last_lock_timeout
if (lock_timeout_debug & 1) { if (lock_timeout_debug & 1) {
char *old_lock_timeout = THDVAR(thd, last_lock_timeout); char *old_lock_timeout = THDVAR(thd, last_lock_timeout);
......
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