@@ -2074,6 +2074,9 @@ static ST_FIELD_INFO tokudb_lock_waits_field_info[] = {
2074
2074
{" lock_waits_key_left" , 256 , MYSQL_TYPE_STRING, 0 , 0 , NULL , SKIP_OPEN_TABLE },
2075
2075
{" lock_waits_key_right" , 256 , MYSQL_TYPE_STRING, 0 , 0 , NULL , SKIP_OPEN_TABLE },
2076
2076
{" lock_waits_start_time" , 0 , MYSQL_TYPE_LONGLONG, 0 , 0 , NULL , SKIP_OPEN_TABLE },
2077
+ {" lock_waits_table_schema" , 256 , MYSQL_TYPE_STRING, 0 , 0 , NULL , SKIP_OPEN_TABLE },
2078
+ {" lock_waits_table_name" , 256 , MYSQL_TYPE_STRING, 0 , 0 , NULL , SKIP_OPEN_TABLE },
2079
+ {" lock_waits_table_dictionary_name" , 256 , MYSQL_TYPE_STRING, 0 , 0 , NULL , SKIP_OPEN_TABLE },
2077
2080
{NULL , 0 , MYSQL_TYPE_NULL, 0 , 0 , NULL , SKIP_OPEN_TABLE}
2078
2081
};
2079
2082
@@ -2099,6 +2102,13 @@ static int tokudb_lock_waits_callback(DB *db, uint64_t requesting_txnid, const D
2099
2102
tokudb_pretty_right_key (db, right_key, &right_str);
2100
2103
table->field [4 ]->store (right_str.ptr (), right_str.length (), system_charset_info);
2101
2104
table->field [5 ]->store (start_time, false );
2105
+
2106
+ String database_name, table_name, dictionary_name;
2107
+ tokudb_split_dname (dname, database_name, table_name, dictionary_name);
2108
+ table->field [6 ]->store (database_name.c_ptr (), database_name.length (), system_charset_info);
2109
+ table->field [7 ]->store (table_name.c_ptr (), table_name.length (), system_charset_info);
2110
+ table->field [8 ]->store (dictionary_name.c_ptr (), dictionary_name.length (), system_charset_info);
2111
+
2102
2112
int error = schema_table_store_record (thd, table);
2103
2113
return error;
2104
2114
}
@@ -2144,6 +2154,9 @@ static ST_FIELD_INFO tokudb_locks_field_info[] = {
2144
2154
{" locks_dname" , 256 , MYSQL_TYPE_STRING, 0 , 0 , NULL , SKIP_OPEN_TABLE },
2145
2155
{" locks_key_left" , 256 , MYSQL_TYPE_STRING, 0 , 0 , NULL , SKIP_OPEN_TABLE },
2146
2156
{" locks_key_right" , 256 , MYSQL_TYPE_STRING, 0 , 0 , NULL , SKIP_OPEN_TABLE },
2157
+ {" locks_table_schema" , 256 , MYSQL_TYPE_STRING, 0 , 0 , NULL , SKIP_OPEN_TABLE },
2158
+ {" locks_table_name" , 256 , MYSQL_TYPE_STRING, 0 , 0 , NULL , SKIP_OPEN_TABLE },
2159
+ {" locks_table_dictionary_name" , 256 , MYSQL_TYPE_STRING, 0 , 0 , NULL , SKIP_OPEN_TABLE },
2147
2160
{NULL , 0 , MYSQL_TYPE_NULL, 0 , 0 , NULL , SKIP_OPEN_TABLE}
2148
2161
};
2149
2162
@@ -2175,6 +2188,12 @@ static int tokudb_locks_callback(uint64_t txn_id, uint64_t client_id, iterate_ro
2175
2188
tokudb_pretty_right_key (db, &right_key, &right_str);
2176
2189
table->field [4 ]->store (right_str.ptr (), right_str.length (), system_charset_info);
2177
2190
2191
+ String database_name, table_name, dictionary_name;
2192
+ tokudb_split_dname (dname, database_name, table_name, dictionary_name);
2193
+ table->field [5 ]->store (database_name.c_ptr (), database_name.length (), system_charset_info);
2194
+ table->field [6 ]->store (table_name.c_ptr (), table_name.length (), system_charset_info);
2195
+ table->field [7 ]->store (dictionary_name.c_ptr (), dictionary_name.length (), system_charset_info);
2196
+
2178
2197
error = schema_table_store_record (thd, table);
2179
2198
}
2180
2199
return error;
0 commit comments