trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sureshsubbiah <>
Subject [GitHub] incubator-trafodion pull request #642: [TRAFODION-2119] create table report ...
Date Fri, 05 Aug 2016 23:09:59 GMT
Github user sureshsubbiah commented on a diff in the pull request:
    --- Diff: core/sql/common/CharType.cpp ---
    @@ -1217,7 +1217,7 @@ void CharType::minMaxRepresentableValue(void* bufPtr,
       if (stringLiteral)
           NABoolean isNull = FALSE;
    -      NABoolean res = createSQLLiteral((const char *) bufPtr, *stringLiteral, isNull,
    +      NABoolean res = createSQLLiteral((const char *) bufPtr  - getSQLnullHdrSize(),
*stringLiteral, isNull, h);
    --- End diff --
    Could you please explain this line.
    Is the understanding that bufPtr passed in does not include null header, but the previous
2 bytes (say type is nullable and null size is 2 bytes) are available and meant to hold null
bytes. I suppose I am nervous about taking a pinter passed in and going a few bytes before.
How do we know that is still a valid location? Maybe all this handled in createSQLLiteral

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