How to make MySQL 8 alert when integer overflow happens during INSERT ... ON DUPLICATE KEY?
USE a BEFORE INSERT TRIGGER to check for all fields where you can reach their limits.

With the newest mysql incarnation you can actually can use the CKECK CONSTRAINT to 
prevent an INSERT at all, but with the TRIGGER you can manage and define What to do