Commit 53d6325d authored by Vladislav Vaintroub's avatar Vladislav Vaintroub

Fix assertion in rocksb.

Use thd_query_safe() to read query from a different connection.
parent 4e08cdf5
......@@ -2867,11 +2867,9 @@ class Rdb_trx_info_aggregator : public Rdb_tx_list_walker {
return;
}
std::string query_str;
LEX_STRING *const lex_str = thd_query_string(thd);
if (lex_str != nullptr && lex_str->str != nullptr) {
query_str = std::string(lex_str->str);
}
char query_buf[NAME_LEN+1];
thd_query_safe(thd, query_buf, sizeof(query_buf));
std::string query_str(query_buf);
const auto state_it = state_map.find(rdb_trx->GetState());
DBUG_ASSERT(state_it != state_map.end());
......
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