Skip to content

Commit

Permalink
bugfix user specified the pattern does not take effect when execute t…
Browse files Browse the repository at this point in the history
…he Keys command (#769)
  • Loading branch information
Axlgrep authored and whoiami committed Sep 30, 2019
1 parent 042add8 commit 1fa0a4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pika_kv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ void KeysCmd::Do(std::shared_ptr<Partition> partition) {
std::vector<std::string> keys;
do {
keys.clear();
cursor = partition->db()->Scan(type_, cursor, "*", PIKA_SCAN_STEP_LENGTH, &keys);
cursor = partition->db()->Scan(type_, cursor, pattern_, PIKA_SCAN_STEP_LENGTH, &keys);
for (const auto& key : keys) {
RedisAppendLen(raw, key.size(), "$");
RedisAppendContent(raw, key);
Expand Down

0 comments on commit 1fa0a4d

Please sign in to comment.