trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DaveBirdsall <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request #661: [TRAFODION-2161] Support migration of...
Date Thu, 18 Aug 2016 19:10:44 GMT
Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/661#discussion_r75370346
  
    --- Diff: core/sql/sqlcomp/CmpSeabaseDDLrepos.cpp ---
    @@ -358,6 +358,75 @@ short CmpSeabaseDDL::copyOldReposToNew(ExeCliInterface * cliInterface)
       return 0;
     }
     
    +short CmpSeabaseDDL::migrateReposViews(ExeCliInterface * cliInterface,
    +                                       NABoolean & someViewSaved /* out */)
    +{
    +  short retcode = 0;  // assume success
    +  someViewSaved = FALSE;
    +
    +  // for each table that has been migrated, save and drop any views
    +  // on the old table, and attempt to recreate them on the new
    +
    +  for (Int32 i = 0; i < sizeof(allReposUpgradeInfo)/sizeof(MDUpgradeInfo); i++)
    +    {
    +      const MDUpgradeInfo &rti = allReposUpgradeInfo[i];
    +
    +      if ((! rti.newName) || (! rti.oldName) || (NOT rti.upgradeNeeded))
    +        continue;
    +
    +      Int64 tableUID = getObjectUID(cliInterface,
    +        getSystemCatalog(), SEABASE_REPOS_SCHEMA, rti.oldName,
    +        COM_BASE_TABLE_OBJECT_LIT, NULL, NULL, FALSE, FALSE /* ignore error */);
    +
    +      if (tableUID != -1)  // if we got it
    +        {
    +          NAList<NAString> viewNameList;
    +          NAList<NAString> viewDefnList;
    + 
    --- End diff --
    
    Oooohhh... good catch. The DDL code uses this technique in several areas; all of them
should be examined for this shortcoming. I will treat that as follow-on work. I have written
https://issues.apache.org/jira/browse/TRAFODION-2169 to cover this issue.


---
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