Skip to content
Snippets Groups Projects
Commit 16c3b06f authored by Дмитрий Кольцов's avatar Дмитрий Кольцов Committed by Дмитрий Кольцов
Browse files

test(test_app): check max negative int on insertion

parent e36f258a
No related branches found
No related tags found
1 merge request!1414sbroad import
......@@ -502,6 +502,34 @@ g.test_insert_5 = function()
})
end
-- check big int
g.test_insert_6 = function()
local api = cluster:server("api-1").net_box
local r, err = api:call("query", { [[INSERT INTO "space_simple_shard_key"
("sysOp", "id", "name") VALUES (?, ?, ?)]], { 7, -9223372036854775808, "bigint" } })
t.assert_equals(err, nil)
t.assert_equals(r, {row_count = 1})
r, err = api:call("query", { [[SELECT *, "bucket_id" FROM "space_simple_shard_key"]], {} })
t.assert_equals(err, nil)
t.assert_equals(r, {
metadata = {
{name = "id", type = "integer"},
{name = "name", type = "string"},
{name = "sysOp", type = "integer"},
{name = "bucket_id", type = "unsigned"},
},
rows = {
{1, "ok", 1, 3940},
{10, box.NULL, 0, 11520},
{ -9223372036854775808, "bigint", 7, 10139 }
},
})
end
g.test_invalid_explain = function()
local api = cluster:server("api-1").net_box
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment