Skip to content

Commit

Permalink
SPDB-96: ldb: fix get to print the entire value
Browse files Browse the repository at this point in the history
  • Loading branch information
isaac-io committed Jun 27, 2022
1 parent 74c91d2 commit 148437b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tools/ldb_cmd.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2681,8 +2681,10 @@ void GetCommand::DoCommand() {
std::string value;
Status st = db_->Get(ReadOptions(), GetCfHandle(), key_, &value);
if (st.ok()) {
fprintf(stdout, "%s\n",
(is_value_hex_ ? StringToHex(value) : value).c_str());
if (is_value_hex_) {
value = StringToHex(value);
}
fprintf(stdout, "%*s\n", int(value.size()), value.c_str());
} else {
std::stringstream oss;
oss << "Get failed: " << st.ToString();
Expand Down

0 comments on commit 148437b

Please sign in to comment.