set sql_mode='ORACLE,STRICT_TRANS_TABLES';
delimiter /
CREATE or replace procedure p3(b1 integer)
AS
  strres VARCHAR(4);  
BEGIN
  strres:=cast('123456' as char(4));
END
/
call p3(-1)
/