tarantool-admin
tarantool-admin copied to clipboard
Incorrect display map/array with uint64, greater than max int64
I'm not a php programmer But problem is most likely in the json/msgpack libraries or PHP itself which does not have uint64. Or maybe problem arises in js. But at the same time, scalar parsed correctly...
But I think it’s worth mentioning here anyway.
Reproducer in docker compose:
version: "3.7"
services:
tarantool-admin:
image: quay.io/basis-company/tarantool-admin:0.7.11
ports: ["8000:80"]
environment:
TARANTOOL_CONNECTIONS: "tnt:3301"
tnt:
image: tarantool/tarantool:2.11.2-ubuntu20.04
command: sh -c 'tarantool -e "$$COMMAND"'
ports: ["3301:3301"]
environment:
COMMAND: | #lua
box.cfg({ listen = 3301 })
box.schema.user.grant("guest", "super", nil, nil, { if_not_exists = true })
local space = box.schema.space.create("TEST", {
format = {
{ name = "id", type = "unsigned" },
{ name = "array", type = "array" },
{ name = "map", type = "map" },
},
})
space:create_index("PRIMARY", {
parts = {{ field = "id", type = "unsigned" }},
if_not_exists = true,
})
local _2_62 = 2^62ULL
local _2_63 = 2^63ULL
space:insert({ _2_62, { _2_62 }, { a = _2_62 } })
space:insert({ _2_63, { _2_63 }, { a = _2_63 } })
require("log").info(require("yaml").encode(space:select({}, { fullscan = true })))
expected:
- [4611686018427387904, [4611686018427387904], {'a': 4611686018427387904}]
- [9223372036854775808, [9223372036854775808], {'a': 9223372036854775808}]
actual: