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

Cli can go off the end of a wide descriptor

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.4
    • 2.4
    • sql-exe
    • None

    Description

      The Trafodion CLI (Call Level Interface) supports two styles of descriptors, "wide" and "non-wide". Non-wide is sufficient for all SQL statements except the CALL statement. For such statements, the set of input and output columns is fixed by the semantics of the statement and therefore is known exactly at compile time.

      For non-wide descriptors, method InputOutputExpr::outputValues (cli/CliExpExchange.cpp) checks to see if the output descriptor entry count matches the statement output column count, and raises an 8893 error if they do not match.

      Wide descriptors on the other hand are permitted to be wider than the number of statement columns. This is needed for CALL statements; stored procedures are permitted to produce result sets of arbitrary kinds and sizes that are not known at compile time.

      Trafodion ODBC and JDBC (via the mxosrvr process) use wide descriptors all the time.

      If we happen to have more statement output columns than there are output descriptor entries, and we are using a wide descriptor, method InputOutputExpr::outputValues will go off the end of the output descriptor, with unpredictable results. We may get an error; we may core.

      Attachments

        Issue Links

          Activity

            People

              dbirdsall Dave Birdsall
              dbirdsall Dave Birdsall
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h