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 2016/05/31 18:09:12 UTC

[jira] [Created] (TRAFODION-2020) Provide safer mechanism to manipulate Sql_ParserFlags locally

David Wayne Birdsall created TRAFODION-2020:
-----------------------------------------------

             Summary: Provide safer mechanism to manipulate Sql_ParserFlags locally
                 Key: TRAFODION-2020
                 URL: https://issues.apache.org/jira/browse/TRAFODION-2020
             Project: Apache Trafodion
          Issue Type: Improvement
          Components: sql-cmp
    Affects Versions: 2.1-incubating
         Environment: All
            Reporter: David Wayne Birdsall
            Assignee: David Wayne Birdsall
             Fix For: 2.1-incubating


https://issues.apache.org/jira/browse/TRAFODION-1678 gives an example of incorrect manipulation of Sql_ParserFlags, resulting in obscure and hard-to-debug error behavior.

There are two problems that we'd like to address with this JIRA:

1. The Set_SqlParser_Flags API has some odd behavior. It turns on bits in OR fashion, unless you pass it a zero value, in which case it turns OFF all the bits. Reset_SqlParser_Flags has similar odd behavior.

2. Often developers code Set_SqlParser_Flags when they intend to code Assign_SqlParser_Flags. That is, they've saved the current value at the beginning of a method, then changed it, then they want to restore it to the saved value at the end. If the current value was non-zero, this almost never works correctly.

The goal of this JIRA is to provide a better API for local manipulations of the SqlParser_Flags. This JIRA will create a class whose constructor will save the current value of the flags and set desired bits. Its destructor will restore the original current value.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)