You are viewing a plain text version of this content. The canonical link for it is here.
Posted to codereview@trafodion.apache.org by anoopsharma00 <gi...@git.apache.org> on 2016/04/07 17:43:20 UTC

[GitHub] incubator-trafodion pull request: various fixes

GitHub user anoopsharma00 opened a pull request:

    https://github.com/apache/incubator-trafodion/pull/420

    various fixes

    -- Implicit xns for ddl stmts are now started in master exe if
       autocommit is OFF
    -- default values for varchar columns are now handled correctly
    -- DATEFORMAT function on timestamp values are now handled correctly
    -- CREATE/DROP PROCEDURE stmt are now handled correctly with DDL xns.
    -- alter primary key stmt now returns an error if table already has a
       user defined primary/clustering key
    -- regress/core/TEST116, seabase/TEST030,031 have been updated with new tests


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

    $ git pull https://github.com/anoopsharma00/incubator-trafodion ddlxns_br

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

    https://github.com/apache/incubator-trafodion/pull/420.patch

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

    This closes #420
    
----
commit 236e26d374605974e39bb9c3063cb6494418be87
Author: Cloud User <ce...@ansharma-3.novalocal>
Date:   2016-04-01T04:18:53Z

    commit #1

commit 90eafe9cb821fa90359c088d5a8f3fa66e2df4e1
Author: Cloud User <ce...@ansharma-3.novalocal>
Date:   2016-04-01T04:19:12Z

    Merge remote branch 'origin/master' into ddlxns_br

commit 9a9b4c68e248b845b2c1001f3dc9ab3a4c9873c1
Author: Cloud User <ce...@ansharma-3.novalocal>
Date:   2016-04-02T14:00:36Z

    Merge remote branch 'origin/master' into ddlxns_br

commit 44f28db2244427aaa8e5f2bfd1d7ebe0eca9fca5
Author: Cloud User <ce...@ansharma-3.novalocal>
Date:   2016-04-04T17:53:14Z

    Merge remote branch 'origin/master' into ddlxns_br

commit ba6a1f2fdc233534cef0b2dd07d2db33b6722c93
Author: Cloud User <ce...@ansharma-3.novalocal>
Date:   2016-04-06T14:55:12Z

    Merge remote branch 'origin/master' into ddlxns_br

commit 9b779ccbc7276d2aed3316faed6d745357d2f753
Author: Cloud User <ce...@ansharma-3.novalocal>
Date:   2016-04-07T14:31:19Z

    Merge remote branch 'origin/master' into ddlxns_br

commit 9be5d50367fed69f83750f5e63098812bb011e72
Author: Anoop Sharma <an...@edev06.esgyn.local>
Date:   2016-04-07T15:23:57Z

    Various fixes
    
    -- Implicit xns for ddl stmts are now started in master exe if
       autocommit is OFF
    -- default values for varchar columns are now handled correctly
    -- DATEFORMAT function on timestamp values are now handled correctly
    -- CREATE/DROP PROCEDURE stmt are now handled correctly with DDL xns.
    -- alter primary key stmt now returns an error if table already has a
       user defined primary/clustering key
    -- regress/core/TEST116, seabase/TEST030,031 have been updated with new tests

----


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

[GitHub] incubator-trafodion pull request: various fixes

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-trafodion/pull/420


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

[GitHub] incubator-trafodion pull request: various fixes

Posted by DaveBirdsall <gi...@git.apache.org>.
Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/420#discussion_r59069398
  
    --- Diff: core/sql/generator/GenExpGenerator.cpp ---
    @@ -753,12 +752,42 @@ void ExpGenerator::copyDefaultValues(
     
           if (srcAttr->getDefaultValue())
     	{
    -	  char * tgtDefVal =
    -	    new(generator->getSpace()) char[srcAttr->getDefaultValueStorageLength()];
    -	  
    -	  str_cpy_all(tgtDefVal, 
    -		      srcAttr->getDefaultValue(), 
    -		      srcAttr->getDefaultValueStorageLength());
    +          Lng32 tgtDefLen = tgtAttr->getDefaultValueStorageLength();
    +          Lng32 srcDefLen = srcAttr->getDefaultValueStorageLength();
    +          char* srcDefVal = srcAttr->getDefaultValue();
    +	  char * tgtDefVal = new(generator->getSpace()) char[tgtDefLen];
    +          // if source and target def storage lengths dont match, then
    +          // need to move each part (null, vclen, data) separately.
    +          if (tgtDefLen != srcDefLen) 
    --- End diff --
    
    Might we be fooled into thinking the tgtDefLen is equal to the srcDefLen, but src is nullable varchar(n-2) while tgt is non-nullable varchar(n)?


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