As you can see below, I have two parameters for the procedure. I want them to be both integers. However, when I tested the procedure with a non-integer, it still compiled! Why?
create procedure int_arith( p_1 int, p_2 int)
begin
select coalesce(p_1 + p_2, 'Null entry') addition;
end;
#
call test.a03_int_arith(10,3.3)\G
the result was:
addition: 13
It is valid in some languages to promote a double to an int (see type conversion).
What is happening is the interpreter (compiler whatever) sees the double, in this 3.3, and truncates it to an integer (implicitly casts the double to an int).