Details
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.
Gliffy Diagrams
Attachments
Activity
- All
- Comments
- Work Log
- History
- Activity
- Transitions