Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: Support for SIGNAL in SPs

From: Chad MILLER <cmiller(at)mysql.com>
Date: Wed Sep 19 2007 - 10:58:42 EDT

On 19 Sep 2007, at 15:35, Jorge Bernal Ordovás wrote:

> It seems this message was forgotten some time ago. Is it still
> relevant?
> Every MySQL class I feel embarrased to teach the SELECT `Your error
> here` INTO ... hack

Hi Jorge. I'm sorry about letting this go stale.

In truth, back in May, we already had 70% of the /full/ SIGNAL +diagnostic feature completed, by someone internal. In the effort to prepare for the next release, that feature has been pushed to the back burner of the development stove, and we're busy with more pressing problems. Since it was always almost-but-not-quite ready, I hesitated and hesitated, and now it's several months later. Rather than wait even more, I'll tell you what's on my mind, and then update you later as I learn more:

I'd rather wait until the full version is ready. While your patch avoids the "INSERT SELECT 'error message'" hack, AIUI, there's more to SIGNAL than sending upward a string, and I don't want to have to be compatible with that later.

I'll keep you updated on the progress of the diagnostic code and our releases. I make no promises, but /if/ the original author(s) finds that they can't reach it soon*, perhaps they'll be willing to part with the foundation and let others work on the remainder. It would be nice to have diagnostics in v5.1 + 1.

  • chad
    • for some value of "soon."

> Begin forwarded message:
>
>> From: Jorge Bernal Ordovás <jbernal@warp.es>
>> Date: 8 de mayo de 2007 03:07:35 GMT+02:00
>> To: MySQL Internals <internals@lists.mysql.com>
>> Subject: Support for SIGNAL in SPs
>>
>> Hi again!
>>
>> In my best attempts for trying to get used to MySQL code, I've
>> started to implement one of my most expected features/bugfixes:
>> the ability to generate exceptions from a stored procedure or
>> function.
>>
>> Until now you had to use hacks like "SELECT `Error: my custom
>> message`"
>>
>> Attached is a patch with the simplest version possible. It adds a
>> SIGNAL statement which throws a fixed error message from a
>> procedure. I started doing this to find if I could, and know I'd
>> like some more feedback/ideas on design/syntax before going on.
>>
>> I haven't found much info about the SIGNAL statement, but this
>> looks nice
>> http://publib.boulder.ibm.com/infocenter/iseries/v5r3/index.jsp?
>> topic=/db2/rbafzmstsignalstmt.htm
>>
>> SIGNAL signal_type [signal_info]
>>
>> signal_type:
>> SQLSTATE sqlstate
>> | condition_name
>>
>> signal_info:
>> SET signal_info_items
>>
>> signal_info_items:
>> [signal_info_items,] signal_info_item
>>
>> signal_info_item:
>> MESSAGE TEXT = value
>> | SCHEMA_NAME = value
>> | TABLE_NAME = value
>> | .
>> | .
>> | .
>>
>> Cheers,
>> Koke
>>
>> <sp_signal_1.diff.txt>
>>
>> --
>> Jorge Bernal Ordovás <jbernal@warp.es>
>> http://amedias.org/ [ES]
>> http://koke.amedias.org/ [EN]
>>
>> MySQL Instructor & Systems Developer
>> Warp Networks http://www.warp.es/
>> D. Jaime I 33 3º Dcha, 50001 Zaragoza, Spain
>>
>>
>
> --
> Jorge Bernal Ordovás <jbernal@warp.es>
> MySQL Instructor & Systems Developer
> Warp Networks http://www.warp.es/
>
> http://www.linkedin.com/in/jbernal
> http://amedias.org/ [ES] || http://koke.amedias.org/ [EN]
>
>

--
Chad Miller, Software Developer                         chad@mysql.com
MySQL Inc., www.mysql.com
Orlando, Florida, USA                                13-20z,  UTC-0400
Office: +1 408 213 6740                         sip:6740@sip.mysql.com
Received on Wed Sep 19 10:58:59 2007
Do you need help?X

This archive was generated by hypermail 2.1.8 : Sun Oct 07 2007 - 07:59:31 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library