trafodion-codereview mailing list archives

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

    https://github.com/apache/incubator-trafodion/pull/661#discussion_r75234600
  
    --- 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 --
    
    You are using existing code - what does the viewDefnList contain?  Is it the view text
(like showddl)  or some abbreviated form.  Could this information contain a lot of information?
 That is, should it be put into a heap?


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