Re: Capture error messages using DECLARE statements
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>
Subject
Views
Written By
Posted
27195
June 27, 2005 09:45AM
9287
June 27, 2005 11:10AM
9808
June 29, 2005 03:54AM
7165
June 30, 2005 05:45AM
5622
September 23, 2005 03:10AM
6387
June 30, 2005 06:30AM
5625
June 30, 2005 09:26AM
5245
June 30, 2005 02:16PM
5626
November 02, 2005 01:41AM
5728
February 13, 2006 03:07AM
Re: Capture error messages using DECLARE statements
7490
February 13, 2006 03:16AM
5797
February 15, 2006 01:58AM
6407
February 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.