You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Alice Chen (JIRA)" <ji...@apache.org> on 2015/07/22 20:16:01 UTC
[jira] [Created] (TRAFODION-434) LP Bug: 1340385 - CQD crashes
sqlci at createConstraintInfo()
Alice Chen created TRAFODION-434:
------------------------------------
Summary: LP Bug: 1340385 - CQD crashes sqlci at createConstraintInfo()
Key: TRAFODION-434
URL: https://issues.apache.org/jira/browse/TRAFODION-434
Project: Apache Trafodion
Issue Type: Bug
Components: sql-cmp
Reporter: Weishiun Tsai
Assignee: Anoop Sharma
Priority: Critical
This is from a legacy regression test ported to run on Trafodion. The following sequence of statements cause sqlci to abort at createConstraintInfo() in ../optimizer/NATable.cpp. The test uses a CQD HIDE_INDEXES, which might not have been supported in Trafodion. But supported or not, the optimizer should handle it more gracefully than crashing sqlci with a core.
This is seen on the v0707_0230 build installed on a workstation.
-------------------------------------------
Here is the entire script to reproduce this problem:
cqd HIDE_INDEXES 'ALL';
drop schema mytest cascade;
set schema mytest;
create table fact (
fday int,
fmonth int,
fyear int,
fitem int,
fquant int,
fprice numeric (8,2),
dimkey int) no partition;
create table dim1 (dkey int not null not droppable primary key, dimdata int, fk1 int)
store by primary key no partition;
alter table fact add constraint fact1_fk foreign key (dimkey) references dim1(dkey);
prepare QueryStmt from
select fprice*fquant total_price,
dimkey, dimdata,
fday oday, fmonth omonth, fyear oyear
from fact, dim1
where dimkey=dkey
order by dimkey;
-------------------------------------------
Here is the stack trace of the core:
(gdb) bt
#0 0x00000039e28328a5 in raise () from /lib64/libc.so.6
#1 0x00000039e2834085 in abort () from /lib64/libc.so.6
#2 0x00007ffff6f5a455 in os::abort(bool) ()
from /opt/home/tools/jdk1.7.0_09_64/jre/lib/amd64/server/libjvm.so
#3 0x00007ffff70ba717 in VMError::report_and_die() ()
from /opt/home/tools/jdk1.7.0_09_64/jre/lib/amd64/server/libjvm.so
#4 0x00007ffff6f5df60 in JVM_handle_linux_signal ()
from /opt/home/tools/jdk1.7.0_09_64/jre/lib/amd64/server/libjvm.so
#5 <signal handler called>
#6 0x00007ffff02fc561 in createConstraintInfo (this=0x7fffd9775028, bindWA=
0x7fffffff21d0, corrName=..., heap=<value optimized out>,
inTableDesc=0x7ffffffedcf0) at ../optimizer/NATable.cpp:4092
#7 NATable::NATable (this=0x7fffd9775028, bindWA=0x7fffffff21d0,
corrName=..., heap=<value optimized out>, inTableDesc=0x7ffffffedcf0)
at ../optimizer/NATable.cpp:4556
#8 0x00007ffff02fe62d in NATableDB::get (this=0x7fffe91db670, corrName=...,
bindWA=0x7fffffff21d0, inTableDescStruct=<value optimized out>)
at ../optimizer/NATable.cpp:7000
#9 0x00007ffff007741a in BindWA::getNATable (this=0x7fffffff21d0,
corrName=..., catmanCollectTableUsages=1, inTableDescStruct=0x0)
at ../optimizer/BindRelExpr.cpp:1443
#10 0x00007ffff00a5aee in Scan::bindNode (this=0x7fffd9793840,
bindWA=0x7fffffff21d0) at ../optimizer/BindRelExpr.cpp:6593
#11 0x00007ffff0067617 in RelExpr::bindChildren (this=0x7fffd9794f28,
bindWA=0x7fffffff21d0) at ../optimizer/BindRelExpr.cpp:2178
#12 0x00007ffff00a0a81 in Join::bindNode (this=0x7fffd9794f28,
bindWA=0x7fffffff21d0) at ../optimizer/BindRelExpr.cpp:2512
#13 0x00007ffff0067617 in RelExpr::bindChildren (this=0x7fffd9786130,
bindWA=0x7fffffff21d0) at ../optimizer/BindRelExpr.cpp:2178
#14 0x00007ffff009de7e in RelRoot::bindNode (this=0x7fffd9786130,
bindWA=0x7fffffff21d0) at ../optimizer/BindRelExpr.cpp:5015
#15 0x00007ffff190a1f4 in CmpMain::compile (this=0x7fffffff4440,
input_str=0x7fffd97c8508 "select fprice*fquant total_price, dimkey, dimdata, fday oday, fmonth omonth, fyear oyear from fact, dim1 where dimkey=dkey order by dimkey;", charset=15, queryExpr=@0x7fffffff4378, gen_code=0x7fffd97caa50,
gen_code_len=0x7fffd97caa48, heap=0x7fffe9d6aac0, phase=CmpMain::END,
fragmentDir=0x7fffffff4598, op=3004, useQueryCache=<value optimized out>,
cacheable=0x7fffffff4388, begTime=0x7fffffff4360, shouldLog=0)
at ../sqlcomp/CmpMain.cpp:1795
#16 0x00007ffff190c6ee in CmpMain::sqlcomp (this=0x7fffffff4440,
input_str=0x7fffd97c8508 "select fprice*fquant total_price, dimkey, dimdata, fday oday, fmonth omonth, fyear oyear from fact, dim1 where dimkey=dkey order by dimkey;", charset=15, queryExpr=@0x7fffffff4378, gen_code=0x7fffd97caa50,
gen_code_len=0x7fffd97caa48, heap=0x7fffe9d6aac0, phase=CmpMain::END,
fragmentDir=0x7fffffff4598, op=3004, useQueryCache=1,
cacheable=0x7fffffff4388, begTime=0x7fffffff4360, shouldLog=0)
at ../sqlcomp/CmpMain.cpp:1462
#17 0x00007ffff190d904 in CmpMain::sqlcomp (this=0x7fffffff4440, input=...,
gen_code=0x7fffd97caa50, gen_code_len=0x7fffd97caa48, heap=0x7fffe9d6aac0,
phase=CmpMain::END, fragmentDir=0x7fffffff4598, op=3004)
at ../sqlcomp/CmpMain.cpp:797
#18 0x00007ffff597c2ff in CmpStatement::process (this=0x7fffd9774ed8,
sqltext=<value optimized out>) at ../arkcmp/CmpStatement.cpp:486
#19 0x00007ffff5970f8e in CmpContext::compileDirect (this=0x7fffe91d6090,
data=0x7fffe9d8aa28 "\200", data_len=272, outHeap=0x7fffea7dc660,
charset=15, op=CmpMessageObj::SQLTEXT_COMPILE, gen_code=@0x7fffffff4b20,
gen_code_len=@0x7fffffff4b28, parserFlags=0, diagsArea=0x7fffe9d8ab40)
at ../arkcmp/CmpContext.cpp:689
#20 0x00007ffff6328d57 in CliStatement::prepare2 (this=0x7fffe9d6b030,
source=0x7fffe9d8c240 "select fprice*fquant total_price, dimkey, dimdata, fday oday, fmonth omonth, fyear oyear from fact, dim1 where dimkey=dkey order by dimkey;", diagsArea=..., passed_gen_code=<value optimized out>,
passed_gen_code_len=3934111328, charset=15, unpackTdbs=1, cliFlags=144)
at ../cli/Statement.cpp:1797
#21 0x00007ffff63291a6 in CliStatement::prepare (this=0x7fffe9d6b030,
source=0x7fffe9d8c240 "select fprice*fquant total_price, dimkey, dimdata, fday oday, fmonth omonth, fyear oyear from fact, dim1 where dimkey=dkey order by dimkey;", diagsArea=..., passed_gen_code=<value optimized out>,
passed_gen_code_len=<value optimized out>, charset=<value optimized out>,
unpackTdbs=1, cliFlags=144) at ../cli/Statement.cpp:1388
#22 0x00007ffff62f410c in SQLCLI_Prepare2 (cliGlobals=0xb8f220,
statement_id=0x1bf1700, sql_source=0x1bf18c0, gencode_ptr=0x0,
gencode_len=0, ret_gencode_len=0x0, query_cost_info=0x7fffffff6080,
query_comp_stats_info=0x7fffffff4df0, uniqueStmtId=<value optimized out>,
uniqueStmtIdLen=0x7fffffff6138, flags=128) at ../cli/Cli.cpp:5904
#23 0x00007ffff6333eca in SQL_EXEC_Prepare2 (statement_id=0x1bf1700,
sql_source=0x1bf18c0, gencode_ptr=0x0, gencode_len=0, ret_gencode_len=0x0,
query_cost_info=0x7fffffff6080, comp_stats_info=0x7fffffff4df0,
uniqueStmtId=0x7fffffff5ef0 " ", uniqueStmtIdLen=0x7fffffff6138,
flags=128) at ../cli/CliExtern.cpp:4913
#24 0x00007ffff7bd8d2f in SqlCmd::do_prepare (sqlci_env=0xb8da20,
prep_stmt=0x1294340,
sqlStmt=0x1c4f9d0 "select fprice*fquant total_price, dimkey, dimdata, fday oday, fmonth omonth, fyear oyear from fact, dim1 where dimkey=dkey order by dimkey;", resetLastExecStmt=1, rsIndex=-41232, prepcode=0x0, statisticsType=0x0)
at ../sqlci/SqlCmd.cpp:892
#25 0x00007ffff7bda2ef in Prepare::process (this=0x1c41ce0, sqlci_env=0xb8da20)
at ../sqlci/SqlCmd.cpp:2937
#26 0x00007ffff7bbea64 in Obey::process (this=0xb90570,
sqlci_env=<value optimized out>) at ../sqlci/Obey.cpp:264
#27 0x00007ffff7bc4f76 in SqlciEnv::executeCommands (this=0xb8da20,
input_stmt=@0x7fffffff6388) at ../sqlci/SqlciEnv.cpp:847
#28 0x00007ffff7bc701b in SqlciEnv::run (this=0xb8da20)
at ../sqlci/SqlciEnv.cpp:656
#29 0x0000000000401ad1 in main (argc=1, argv=0x7fffffff6558)
at ../bin/SqlciMain.cpp:317
(gdb)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)