diff options
author | John Leslie <jleslie@monetate.com> | 2019-01-03 19:59:36 -0800 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2019-04-26 23:38:59 -0700 |
commit | 6eeaadfce6c9c184fabaf2f88d7fff3f42735286 (patch) | |
tree | f58ff06524fb5a58f56000c885935618fa4d1be3 /scripts | |
parent | dae31911f94112c62f73bf0608873b1077e6052c (diff) | |
download | memcached-6eeaadfce6c9c184fabaf2f88d7fff3f42735286.tar.gz |
memcached-tool dump fix loss of exp value
regex call unescaping key reassigns $2
-- store/reference it as $exp
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/memcached-tool | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/memcached-tool b/scripts/memcached-tool index cab36a5..a243310 100755 --- a/scripts/memcached-tool +++ b/scripts/memcached-tool @@ -98,13 +98,13 @@ if ($mode eq 'dump') { # return format looks like this # key=foo exp=2147483647 la=1521046038 cas=717111 fetch=no cls=13 size=1232 if (/^key=(\S+) exp=(-?\d+) .*/) { - my $k = $1; + my ($k, $exp) = ($1, $2); $k =~ s/%(.{2})/chr hex $1/eg; - if ($2 == -1) { + if ($exp == -1) { $keyexp{$k} = 0; } else { - $keyexp{$k} = $2; + $keyexp{$k} = $exp; } } $keycount++; |