Uploaded image for project: 'Apache Trafodion (Retired)'
  1. Apache Trafodion (Retired)
  2. TRAFODION-2896

Internal error in stored procedures when a warning is generated in SQL

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0-incubating
    • 2.3
    • sql-exe
    • None
    • Any, however this problem is not always reproducible

    Description

      Anu and Selva have seen cases of this and we suspect that the problem has to do with the way the UDR server handles return codes from CLI calls it makes. Stored procedures can contain SQL and produce result sets. As part of this, the UDR server makes CLI calls. Right now, it maps any non-zero return codes to internal errors. That is not quite right, warnings should either be returned to the user or ignored, whichever is more appropriate.

      Selva also found that in some cases we do sequences of CLI calls, and if we encounter a warning in an earlier CLI calls, the later ones may return that warning code if the diagnostics aren't cleared in-between. The UDR server often does not clear the diags area, so it may see this issue.

      The fix for these symptoms is to raise an internal error only for true errors in CLI calls, not for warnings. This applies to code in the UDR server, files in core/sql/udrserv.

      Attachments

        Activity

          People

            hzeller Hans Zeller
            hzeller Hans Zeller
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: