[
https://issues.apache.org/jira/browse/TRAFODION-25?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14717502#comment-14717502
]
ASF GitHub Bot commented on TRAFODION-25:
-----------------------------------------
Github user DaveBirdsall commented on a diff in the pull request:
https://github.com/apache/incubator-trafodion/pull/68#discussion_r38144291
--- Diff: core/sql/optimizer/opt.cpp ---
@@ -998,12 +998,18 @@ NAString Context::getRequirementsString() const
{
NAString IPPString("", CmpCommon::statementHeap());
- char thisptr[7 + sizeof(void *)];
+ // will receive the string "ptr=%p, ", where %p is a hex address
+ // example: "ptr=0x7fffffff23db, "
+ // so we need 4 bytes for "ptr=", 2 bytes for the "0x", up to
+ // 2 * sizeof(void *) bytes for the hex (each nibble goes to
+ // one ASCII character), 2 bytes for the ", " and 1 byte for
+ // the trailing null
+ char thisptr[4 + 2 + 2*sizeof(void *) + 2 + 1];
--- End diff --
Note to reviewers: I noticed this buffer overrun bug when I was debugging
and fixed it. Looked around for other similar bugs but did not find any.
> Insert, delete and update operators should use specialized cost method
> -----------------------------------------------------------------------
>
> Key: TRAFODION-25
> URL: https://issues.apache.org/jira/browse/TRAFODION-25
> Project: Apache Trafodion
> Issue Type: Bug
> Reporter: Qifan Chen
> Assignee: David Wayne Birdsall
> Labels: performance
>
> In Trafodion, insert, delete and update operators do not use a specialized
> cost method that model the true operation involved.
> As a result, these operators can be assigned a zero cost and the query plan
> may not be optimal. In one example, a delete query against a partitioned
> table may get a serial plan.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)