You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "David Wayne Birdsall (JIRA)" <ji...@apache.org> on 2019/02/07 18:59:00 UTC

[jira] [Created] (TRAFODION-3273) Cli can go off the end of a wide descriptor

David Wayne Birdsall created TRAFODION-3273:
-----------------------------------------------

             Summary: Cli can go off the end of a wide descriptor
                 Key: TRAFODION-3273
                 URL: https://issues.apache.org/jira/browse/TRAFODION-3273
             Project: Apache Trafodion
          Issue Type: Bug
          Components: sql-exe
    Affects Versions: 2.4
            Reporter: David Wayne Birdsall
            Assignee: David Wayne Birdsall


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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)