You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "David Wayne Birdsall (JIRA)" <ji...@apache.org> on 2018/02/21 21:58:00 UTC

[jira] [Commented] (TRAFODION-2967) UPDATE STATISTICS sometimes cores in CommonLogger::buildMsgBuffer

    [ https://issues.apache.org/jira/browse/TRAFODION-2967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16372079#comment-16372079 ] 

David Wayne Birdsall commented on TRAFODION-2967:
-------------------------------------------------

The following script reproduces the problem:

```

create table t1 (a int not null, b char(12) not null, primary key (a));

insert into t1 values
(1, 'aaaaaaaaaaaa'),
(2, 'a%daaaaaaaaa'),
(3, 'bbbb%faaaaaa'),
(4, 'ccccccc%naaa'),
(5, 'zzzzzzzzzzzz');

-- the following statement cores (twice! because it gets retried automatically)

update statistics for table t1 on every column;

```

> UPDATE STATISTICS sometimes cores in CommonLogger::buildMsgBuffer
> -----------------------------------------------------------------
>
>                 Key: TRAFODION-2967
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-2967
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: sql-cmp
>    Affects Versions: 2.3
>            Reporter: David Wayne Birdsall
>            Assignee: David Wayne Birdsall
>            Priority: Major
>
> Jira TRAFODION-2927 refactored the UPDATE STATISTICS logging logic to use the CommonLogger class. Unfortunately, this introduced a problem that sometimes causes cores in CommonLogger::buildMsgBuffer. The UPDATE STATISTICS code passes raw data via a "template" parameter to the logging layers. The logging layers interpret this template like a printf template. So, if the data happens to have a substring such as %d or %n in it, the logger code expects an additional argument to supply a substitution value for it. But none is supplied so we abend.
> A workaround is to turn automatic logging off, e.g. by setting CQD USTAT_AUTOMATIC_LOGGING 'OFF' in the "_MD_".DEFAULTS table.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)