/*
https://www.oschina.net/question/107929_61550
*/
delimiter //
drop PROCEDURE if exists TEMP;
CREATE PROCEDURE TEMP ()
BEGIN
declare V_RETUR int;
IF EXISTS(SELECT 1 FROM dual where 1=1)
then
IF ('a'='b') then
select '1' as mess;
else select '2' as mess;
END if;
END if;
END//
delimiter ;