Forums » General Discussion

Thread: debug error occured when specify "cursor" statement in procedure

This question is not answered. Helpful answers available: 2. Answered answers available: 1.


Permlink Replies: 0 - Pages: 1 Threads: [ Previous | Next ]
hoocan

Posts: 2
Registered: 12/2/10
debug error occured when specify "cursor" statement in procedure
Posted: Dec 2, 2010 6:33 PM
 
  Click to reply to this thread Reply

SQL Code:
DROP PROCEDURE IF EXISTS `5000aaa`.proc_test;
CREATE PROCEDURE `5000aaa`.`proc_test`()
BEGIN
 DECLARE done INT DEFAULT 0;
 
 DECLARE cur_test CURSOR FOR SELECT user_cde FROM web_org_user LIMIT 0,1;
 DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done=1;  
END;


Error Info:
 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'DECLARE CALL questsoftware.DEBUGSET('done','L',done)' at line 1

 CREATE PROCEDURE questdebug.1b52f6afbb5ef9e22cd76ca8a01efee86a8c7eaeimpl()
BEGIN
 DECLARE done INT DEFAULT 0;
 
 DECLARE CALL questsoftware.DEBUGSET('done','L',done);CALL questsoftware.DEBUGTRACE('PROCEDURE','5000aaa','proc_test',5);cur_test CURSOR FOR SELECT user_cde FROM `5000aaa`.web_org_user LIMIT 0,1;
 DECLARE CONTINUE HANDLER FOR SQLSTATE '02000' SET done=1;
  
CALL questsoftware.DEBUGSET('done','L',done);CALL questsoftware.DEBUGTRACE('PROCEDURE','5000aaa','proc_test',8);END;

Suggest:

 Toad for MySql 5.0.0.345, Statement "DECLARE cur_test CURSOR FOR xxx"  is replaced by "DECLARE CALL questsoftware.DEBUGSET('done','L',done);CALL questsoftware.DEBUGTRACE('PROCEDURE','5000aaa','proc_test',5);cur_test CURSOR ", are there any Settings must be setted for Toad ?

Sorry for All:
 i'm not good at English




Legend
Guru: 2001 + pts
Expert: 751 - 2000 pts
Enthusiast: 31 - 750 pts
Novice: 0 - 30 pts
Moderators
Helpful answer (5 pts)
Answered (10 pts)

Point your RSS reader here for a feed of the latest messages in all forums