Skip to content
New issue

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

bug report #2679

Open
578223592 opened this issue Mar 5, 2024 · 0 comments
Open

bug report #2679

578223592 opened this issue Mar 5, 2024 · 0 comments

Comments

@578223592
Copy link

578223592 commented Mar 5, 2024

当我浏览 https://redis.io/commands/bitpos/,
我发现:

image

我认为输出应该是8,于是在网页端redis验证了一下,结果如下:
image

完整的网页输出:

redis> SET mykey "\xff\xf0\x00"
"OK"
redis> BITPOS mykey 0
(integer) 0
redis> SET mykey "\x00\xff\xf0"
"OK"
redis> BITPOS mykey 1 0
(integer) 1
redis> BITPOS mykey 1 2
(integer) 18
redis> BITPOS mykey 1 2 -1 BYTE
(integer) 18
redis> BITPOS mykey 1 7 15 BIT
(integer) 9
redis> set mykey "\x00\x00\x00"
"OK"
redis> BITPOS mykey 1
(integer) 1
redis> BITPOS mykey 1 7 -3 BIT
(integer) 9
redis> get mykey
"\x00\x00\x00"
@578223592 578223592 changed the title bug bug report Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant