trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DaveBirdsall <>
Subject [GitHub] incubator-trafodion pull request #1099: [TRAFODION-2605] Rework of fix for T...
Date Thu, 18 May 2017 20:10:36 GMT
GitHub user DaveBirdsall opened a pull request:

    [TRAFODION-2605] Rework of fix for TRAFODION-2294

    This fix reworks part of the fix for JIRA TRAFODION-2294. It contains the following changes:
    1. The "useQueryCache" logic at the sqlcomp/CmpMain.cpp level has been changed. Formerly,
there were just two options, useQueryCache == TRUE and useQueryCache == FALSE. For EXPLAIN,
we want to pretend like we are using the query cache, but at the last minute choose not to
cache the plan. (In this way, we get the same query plan as would be in cache, without actually
caching it and thereby opening the security hole that TRAFODION-2294 fixed.)
    2. The known differences file for regression test executor/TEST140 has been removed.
    3. The expected results file for test executor/TEST140 has been updated. In one place,
we do an EXPLAIN after executing the same statement. The new logic picks up the cached query
plan from the statement for purposes of EXPLAIN, but that plan was compiled without the GENERATE_EXPLAIN
CQD. So, the line "GENERATE_EXPLAIN .... ON" no longer appears on one of the EXPLAIN outputs.
(I looked at trying to inhibit EXPLAIN from using cached plans, but this appears to be difficult:
the logic that parameterizes plans for caching is tightly bound with the logic that does the
cache lookup. In any case, using a cached plan does not open any security hole as privilege
checking has already been done on the cached plan.)
    4. In two places I replaced an obscure use of double Set_SqlParser_Flags calls with a
single equivalent call to Assign_SqlParser_Flags. When the original lines were written, the
Assign_SqlParser_Flags function did not exist.

You can merge this pull request into a Git repository by running:

    $ git pull Trafodion2605

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1099
commit 1caf7f227ea42ed0d21ddc2308851145fd428ad2
Author: Dave Birdsall <>
Date:   2017-05-18T19:59:51Z

    [TRAFODION-2605] Rework of fix for TRAFODION-2294


If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message