[MDEV-8809] DECLARE HANDLER FOR SQLNOTE Created: 2015-09-17  Updated: 2021-05-11

Status: Open
Project: MariaDB Server
Component/s: OTHER
Fix Version/s: None

Type: Task Priority: Minor
Reporter: Alexander Barkov Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None


 Description   

During an email discussion Serg and Bar noticed that the exception handler system does not fully cover NOTES. All notes cannot be suppressed by a single DECLARE HANDLER command. It's only possible to catch notes by individual codes.

Perhaps we should make it possible to use this syntax:

DECLARE ... HANDLER FOR SQLNOTE ...

On 09/13/2015 05:17 PM, Sergei Golubchik wrote:
> Hi, Alexander!
> 
> On Jul 21, Alexander Barkov wrote:
>>
>> I have one question about "HANDLER FOR SQLWARNING".
>> It does not catch messages of level "Note".
>> Looks like a bug. Please confirm, I'll file a report if so.
> 
> Hmm, I don't know.
> 
> According to the standard, SQLWARNING should match sqlstates in the
> category W, while SQLEXCEPTION should be for sqlstates in the category X.
> 
> But we don't do that, 22007 is an exception (category X), but we treat
> it as a warning. So, the standard doesn't help to answer your question.
> 
> We seem to use the logic where a level "error" means an SQL exception
> and a level "warning" means an SQL warning. Using this logic, "notes"
> are neither exceptions nor warnings, and neither SQLEXCEPTION nor
> SQLWARNING should match them.
> 
> I'd say it's not a bug.


Generated at Thu Feb 08 07:29:58 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.