We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to reproduce? generate a test sorted set. execute zremrangebylex myzset [ [, official redis won't delete any member.
zremrangebylex myzset [ [
i believe the bug is here,
if (max.empty()) { in_range = str >= min ? 0 : -1;
complete code :
struct ZLexRangeSpec { std::string min; std::string max; bool include_min; bool include_max; ZLexRangeSpec() : include_min(false), include_max(false) { } bool Parse(const std::string &minstr, const std::string &maxstr); int InRange(const std::string &str) const { int in_range = -1; if (max.empty()) { in_range = str >= min ? 0 : -1; } else { if (str >= min) { if (str <= max) { in_range = 0; } else { in_range = 1; } } else { in_range = -1; } } if (0 == in_range) { if (!include_min && str == min) { return -1; } if (!include_max && str == max) { return 1; } } return in_range; } };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
How to reproduce?
generate a test sorted set.
execute
zremrangebylex myzset [ [
, official redis won't delete any member.i believe the bug is here,
complete code :
The text was updated successfully, but these errors were encountered: