trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zellerh <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request #634: JIRA TRAFODION-2137 metadata access p...
Date Wed, 03 Aug 2016 00:56:26 GMT
Github user zellerh commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/634#discussion_r73265197
  
    --- Diff: core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp ---
    @@ -5322,19 +5395,74 @@ short CmpSeabaseDDL::updateObjectRedefTime(
       NAString quotedObjName;
       ToQuotedString(quotedObjName, NAString(objName), FALSE);
     
    -  str_sprintf(buf, "update %s.\"%s\".%s set redef_time = %Ld where catalog_name = '%s'
and schema_name = '%s' and object_name = '%s' and object_type = '%s' ",
    -              getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_OBJECTS,
    -              redefTime,
    -              catName.data(), quotedSchName.data(), quotedObjName.data(),
    -              objType);
    +  Int64 flags = 0;
    +  if (((CmpCommon::getDefault(TRAF_STORE_OBJECT_DESC) == DF_ON) ||
    +       (force)) &&
    +      (objUID > 0) &&
    +      (NOT isSeabaseReservedSchema(catName, schName)) &&
    +      ((strcmp(objType, COM_BASE_TABLE_OBJECT_LIT) == 0) ||
    +       (strcmp(objType, COM_VIEW_OBJECT_LIT) == 0)))
    +    {
    +      Int32 ctlFlags = GEN_PACKED_DESC | GET_SNAPSHOTS;
    +      Int32 packedDescLen = 0;
    +      TrafDesc * ds = 
    +        getSeabaseUserTableDesc(catName, schName, objName,
    +                                (strcmp(objType, COM_BASE_TABLE_OBJECT_LIT) == 0
    +                                 ? COM_BASE_TABLE_OBJECT : COM_VIEW_OBJECT),
    +                                FALSE, ctlFlags, packedDescLen);
    +      if (! ds)
    +        {
    +          processReturn();
    +          return -1;
    +        }
    +
    +      cliRC = updateTextTableWithBinaryData
    --- End diff --
    
    We update the stored descriptor here if TRAF_STORE_OBJECT_DESC is set to ON. What about
the case when a table already has a stored object descriptor and TRAF_STORE_OBJECT_DESC is
OFF? Should we at least delete the outdated stored descriptor? Sorry, I didn't check the details,
probably this situation can never happen?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message