diff options
author | sundb <sundbcn@gmail.com> | 2021-08-09 22:13:46 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-09 17:13:46 +0300 |
commit | cbda492909cd2fff25263913cd2e1f00bc48a541 (patch) | |
tree | 41259a16a00ac606cc81605d0f172f6975809a8b /tests/assets | |
parent | 0b643e930d978862b3284ba742fba1a659832b8c (diff) | |
download | redis-cbda492909cd2fff25263913cd2e1f00bc48a541.tar.gz |
Sanitize dump payload: handle remaining empty key when RDB loading and restore command (#9349)
This commit mainly fixes empty keys due to RDB loading and restore command,
which was omitted in #9297.
1) When loading quicklsit, if all the ziplists in the quicklist are empty, NULL will be returned.
If only some of the ziplists are empty, then we will skip the empty ziplists silently.
2) When loading hash zipmap, if zipmap is empty, sanitization check will fail.
3) When loading hash ziplist, if ziplist is empty, NULL will be returned.
4) Add RDB loading test with sanitize.
Diffstat (limited to 'tests/assets')
-rw-r--r-- | tests/assets/corrupt_empty_keys.rdb | bin | 187 -> 261 bytes |
1 files changed, 0 insertions, 0 deletions
diff --git a/tests/assets/corrupt_empty_keys.rdb b/tests/assets/corrupt_empty_keys.rdb Binary files differindex bc2b4f202..8f260d493 100644 --- a/tests/assets/corrupt_empty_keys.rdb +++ b/tests/assets/corrupt_empty_keys.rdb |