Skip to content

StringSet last digit of uint64 value is wrong #1103

@indriApollo

Description

@indriApollo

I have an issue where StringSet messes up the last digit of my uint64 value.
I want to store 142205255210238005 but redis-cli > get key1 returns me 142205255210238000.

See here an example :

using System;
using StackExchange.Redis;

namespace redisUint64
{
    class Program
    {
        static void Main(string[] args)
        {
            ulong value = 142205255210238005;
            var conn = ConnectionMultiplexer.Connect("127.0.0.1");
            var db = conn.GetDatabase();
            db.StringSet("key1", value);
            var retVal = db.StringGet("key1");
            Console.WriteLine(retVal);
        }
    }
}

Stackexchange.Redis version 2.0.571
Redis server version 5.0.4
.Net Core 2.2
Arch linux 64bit

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions