Skip navigation links

MySQL Forums :: Stored Procedures :: Capture error messages using DECLARE statements


Advanced Search

Re: Capture error messages using DECLARE statements
Posted by: Roland Bouman ()
Date: February 13, 2006 03:16AM

Hi!

(BTW: did you add a comment to the bug report? It might help if the developers see the item is actively viewed and edited. Thank you.)

I don't really understand your comment: I thought that procedure nesting was fixed. Conditions that arise in the procedures should be propagated to the caller...

in fact, this quick test demonstrates that it works for me:

mysql> select * from detail;
+----+-------------+
| id | name |
+----+-------------+
| 0 | the default |
| 2 | the default |
+----+-------------+
2 rows in set (0.07 sec)

mysql> delimiter //
mysql> create procedure p_fail()
-> begin
-> declare v_id int;
-> select id into v_id from detail;
-> end;
-> //
Query OK, 0 rows affected (0.16 sec)

mysql> call p_fail()
-> //
ERROR 1172 (42000): Result consisted of more than one row
mysql> create procedure p_call_fail()
-> begin
-> call p_fail();
-> end;
-> //
Query OK, 0 rows affected (0.00 sec)

mysql> call p_call_fail()
-> ;
-> //
ERROR 1172 (42000): Result consisted of more than one row
mysql> select version();
-> //
+-----------+
| version() |
+-----------+
| 5.0.17-nt |
+-----------+
1 row in set (0.02 sec)

mysql>

Options: ReplyQuote


Subject Views Written By Posted
Capture error messages using DECLARE statements 17521 Cornelius Sybrandy 06/27/2005 09:45AM
Re: Capture error messages using DECLARE statements 6416 Vivian Fonger 06/27/2005 11:10AM
Re: Capture error messages using DECLARE statements 7249 Roland Bouman 06/29/2005 03:54AM
Re: Capture error messages using DECLARE statements 5332 Roland Bouman 06/30/2005 05:45AM
Re: Capture error messages in phpscript 4193 gamut kumar 09/23/2005 03:10AM
Re: Capture error messages using DECLARE statements 4769 Andrew Gilfrin 06/30/2005 06:30AM
Re: Capture error messages using DECLARE statements 4151 Roland Bouman 06/30/2005 09:26AM
Re: Capture error messages using DECLARE statements 3952 Vivian Fonger 06/30/2005 02:16PM
Re: Capture error messages using DECLARE statements 4196 Pavel 11/02/2005 01:41AM
Re: Capture error messages using DECLARE statements 4256 Peter Schwager 02/13/2006 03:07AM
Re: Capture error messages using DECLARE statements 5134 Roland Bouman 02/13/2006 03:16AM
Re: Capture error messages using DECLARE statements 4311 Peter Schwager 02/15/2006 01:58AM
Re: Capture error messages using DECLARE statements 4506 Roland Bouman 02/15/2006 03:11AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.