Error 1329 - No data - zero rows fetched, selected, or processed -
05-18-2011
, 08:31 PM
The following code is the basis for all of my stored procedures. I
was running these scripts with no issue and now, they are all throwing
a 1329.
I changed the loop construct and I still get the same error. any
insight or wise words would be appreciated.
Thanks, in advance.
DELIMITER //
DROP PROCEDURE IF EXISTS sp_test//
CREATE PROCEDURE sp_test(IN $id INT, OUT $code INT, OUT $message TEXT)
BEGIN
DECLARE finished INT UNSIGNED DEFAULT 0;
DECLARE $eon_key VARCHAR(10);
DECLARE cur CURSOR FOR
SELECT `key` FROM eon_brands;
DECLARE CONTINUE HANDLER FOR NOT FOUND SET finished = 1;
DECLARE CONTINUE HANDLER FOR 1062
BEGIN
SET $code = 1062;
SET $message = "Something bad happened";
END;
OPEN cur;
curl:REPEAT
FETCH cur INTO $eon_key;
IF NOT finished THEN
SELECT $eon_key;
END IF;
UNTIL finished
END REPEAT curl;
CLOSE cur;
SET $code = 2234;
SET $message = 'WEEEEEEEEE';
END//
DELIMITER ; |