Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-8809

DECLARE HANDLER FOR SQLNOTE

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • None
    • OTHER
    • 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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            bar Alexander Barkov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.