Hi ,
I want to execute shell script through stored procedure if condition matches
DELIMITER $$
CREATE PROCEDURE CheckStatus()
BEGIN
DECLARE state INT DEFAULT 0;
select count(*) into state from test_done where status=0 or status='';
IF state > 0
THEN
sh /usr/bin/testshell.sh
ELSE
exit from mysql prompt
END IF;
END $$
DELIMITER ;