diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2017-07-05 19:41:46 +0000 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2017-07-06 11:35:54 +0000 |
commit | 53d6325db0667c0011db5abfde604b13003a28ad (patch) | |
tree | 429003620f16e01b75be7f4d9bf67a6e3acd946a | |
parent | 4e08cdf52a8767d44ab3761936b2f0d0d71173ab (diff) | |
download | mariadb-git-53d6325db0667c0011db5abfde604b13003a28ad.tar.gz |
Fix assertion in rocksb.
Use thd_query_safe() to read query from a different connection.
-rw-r--r-- | storage/rocksdb/ha_rocksdb.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc index 46c8019f71e..8c9d27adee5 100644 --- a/storage/rocksdb/ha_rocksdb.cc +++ b/storage/rocksdb/ha_rocksdb.cc @@ -2867,11 +2867,9 @@ public: 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()); |