diff --git a/test_app/test/integration/api_test.lua b/test_app/test/integration/api_test.lua index e17f54ca7330d8e3a1c4bb24cdea709e4bf064ef..7bcd114ca3d88f97621de75364f2d9be97961850 100644 --- a/test_app/test/integration/api_test.lua +++ b/test_app/test/integration/api_test.lua @@ -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