You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Anoop Sharma (JIRA)" <ji...@apache.org> on 2016/09/09 23:30:20 UTC

[jira] [Assigned] (TRAFODION-1755) MXOSRVR abends when doing an explain command

     [ https://issues.apache.org/jira/browse/TRAFODION-1755?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Anoop Sharma reassigned TRAFODION-1755:
---------------------------------------

    Assignee: Anoop Sharma  (was: RuoYu Zuo)

> MXOSRVR abends when doing an explain command
> --------------------------------------------
>
>                 Key: TRAFODION-1755
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-1755
>             Project: Apache Trafodion
>          Issue Type: Bug
>          Components: connectivity-mxosrvr
>            Reporter: Venkat Muthuswamy
>            Assignee: Anoop Sharma
>
> When the following sequence of commands are executed via trafci, the mxosrvr abends and we do not get the explain output.
> =======================
> SET SCHEMA 'trafodion.opencart2';
> cqd allow_incompatible_comparison 'ON';
> cqd disable_read_only 'ON';
> cqd mode_special_1 'ON';
> SELECT * FROM TABLE(explain(null, 'EXPLAIN_STMT=SELECT tr1.tax_class_id, tr2.tax_rate_id, tr2.name, tr2.rate, tr2."type", tr1.priority FROM oc_tax_rule tr1 LEFT JOIN oc_tax_rate tr2 ON (tr1.tax_rate_id = tr2.tax_rate_id) INNER JOIN oc_tax_rate_to_customer_group tr2cg ON (tr2.tax_rate_id = tr2cg.tax_rate_id) LEFT JOIN oc_zone_to_geo_zone z2gz ON (tr2.geo_zone_id = z2gz.geo_zone_id) LEFT JOIN oc_geo_zone gz ON (tr2.geo_zone_id = gz.geo_zone_id) WHERE tr1.based = ''shipping'' AND tr2cg.customer_group_id = ''1'' AND z2gz.country_id = ''222'' AND (z2gz.zone_id = ''0'' OR z2gz.zone_id = ''3563'') ORDER BY tr1.priority ASC '));
> ====================
> The same set of commands when run from sqlci work fine and we get the explain output. But when run through trafci, it fails.
> Interestingly if we change one of the LEFT JOIN to just JOIN as below, it works fine from trafci too. 
> SELECT * FROM TABLE(explain(null, 'EXPLAIN_STMT=SELECT tr1.tax_class_id, tr2.tax_rate_id, tr2.name, tr2.rate, tr2."type", tr1.priority FROM oc_tax_rule tr1 LEFT JOIN oc_tax_rate tr2 ON (tr1.tax_rate_id = tr2.tax_rate_id) INNER JOIN oc_tax_rate_to_customer_group tr2cg ON (tr2.tax_rate_id = tr2cg.tax_rate_id)  JOIN oc_zone_to_geo_zone z2gz ON (tr2.geo_zone_id = z2gz.geo_zone_id) LEFT JOIN oc_geo_zone gz ON (tr2.geo_zone_id = gz.geo_zone_id) WHERE tr1.based = ''shipping'' AND tr2cg.customer_group_id = ''1'' AND z2gz.country_id = ''222'' AND (z2gz.zone_id = ''0'' OR z2gz.zone_id = ''3563'') ORDER BY tr1.priority ASC '));
> A core file is generated when the mxosrvr abends and the stack trace shows the following:
> #1  0x00007f859added8d in abort () from /lib64/libc.so.6
> #2  0x00007f859add674e in __assert_fail_base () from /lib64/libc.so.6
> #3  0x00007f859add6810 in __assert_fail () from /lib64/libc.so.6
> #4  0x00007f859a2844a6 in str_decoded_len (charLen=16161) at ../common/str.cpp:929
> #5  0x00007f8598d148e9 in ExExplainTcb::processExplainStmt (this=0x7f85861b51c8) at ../executor/ExExplain.cpp:545
> #6  0x00007f8598d15087 in ExExplainTcb::work (this=0x7f85861b51c8) at ../executor/ExExplain.cpp:742
> #7  0x00007f8598bda209 in ex_tcb::sWork (tcb=0x7f85861b51c8) at ../executor/ex_tcb.h:103
> #8  0x00007f8598d6556b in ExSubtask::work (this=0x7f85861b6a98) at ../executor/ExScheduler.cpp:754
> #9  0x00007f8598d6492e in ExScheduler::work (this=0x7f85861b4d30, prevWaitTime=0) at ../executor/ExScheduler.cpp:331
> #10 0x00007f8598c35106 in ex_root_tcb::execute (this=0x7f85861b6b18, cliGlobals=0x2498fd0, glob=0x7f85861b3028, input_desc=0x7f85861beb80, diagsArea=@0x7f858763d240, reExecute=0)
>     at ../executor/ex_root.cpp:1058
> #11 0x00007f859a6e1b67 in CliStatement::execute (this=0x7f85861b25b8, cliGlobals=0x2498fd0, input_desc=0x7f85861beb80, diagsArea=..., execute_state=CliStatement::INITIAL_STATE_, fixupOnly=0, 
>     cliflags=0) at ../cli/Statement.cpp:4525



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)