mirror of
https://github.com/dragonflydb/dragonfly.git
synced 2025-05-11 18:35:46 +02:00
fix: string compatibility issues (#3564)
1. strlen should return 0 for non existing types. 2. reject both EX and PX options in SET 3. prevent overflow of expiry time that is too large Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This commit is contained in:
parent
7ed686ebf9
commit
caf677ea76
4 changed files with 53 additions and 13 deletions
|
@ -213,7 +213,7 @@ class DbSlice {
|
|||
static int64_t Cap(int64_t value, TimeUnit unit);
|
||||
|
||||
// Calculate relative and absolue timepoints.
|
||||
std::pair<int64_t, int64_t> Calculate(uint64_t now_msec, bool cap = false) const;
|
||||
std::pair<int64_t, int64_t> Calculate(uint64_t now_msec, bool cap) const;
|
||||
|
||||
// Return true if relative expiration is in the past
|
||||
bool IsExpired(uint64_t now_msec) const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue