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

无法插入数据! #131

Open
ywsswy opened this issue May 9, 2020 · 1 comment
Open

无法插入数据! #131

ywsswy opened this issue May 9, 2020 · 1 comment

Comments

@ywsswy
Copy link

ywsswy commented May 9, 2020

void *redisClusterCommand(redisClusterContext *cc, const char *format, ...);

reply = redisClusterCommand(clustercontext, "SET foo %s", value);

如果value是一个含有'\0'字符的字符串,那么最后插入的数据会被截断。

怎么解?

@ywsswy
Copy link
Author

ywsswy commented May 23, 2020

redisClusterCommand(clustercontext, "SET foo %b", value.c_str(), value.size());

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