Skip to content
This repository has been archived by the owner on Aug 16, 2023. It is now read-only.

Commit

Permalink
typecast in LOAD_FOR_EACH_BACKEND to avoid overflow
Browse files Browse the repository at this point in the history
  • Loading branch information
khodzha committed Dec 7, 2020
1 parent a9c6df0 commit d133a26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/db/janus_backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -465,8 +465,8 @@ WITH
)
SELECT
jb.id AS backend_id,
COALESCE(jbl.load, 0) as load,
COALESCE(jbl.taken, 0) as taken
COALESCE(jbl.load, 0)::BIGINT as load,
COALESCE(jbl.taken, 0)::BIGINT as taken
FROM janus_backend jb
LEFT OUTER JOIN janus_backend_load jbl
ON jb.id = jbl.backend_id;
Expand Down

0 comments on commit d133a26

Please sign in to comment.