showddl does not work for SPJs
Bug #1350627 reported by
Aruna Sadashiva
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Trafodion |
Fix Committed
|
High
|
Cliff Gray |
Bug Description
SHOWDDL fails for SPJs.
>>get procedures;
Procedures in Schema TRAFODION.T4QA
=======
CALLABLESTATEME
RS349
--- SQL operation complete.
>>showddl rs349;
*** ERROR[1389] Object RS349 does not exist in Trafodion.
*** ERROR[4082] Object TRAFODION.
--- SQL operation failed with errors.
Changed in trafodion: | |
milestone: | r0.9 → r1.0 |
Changed in trafodion: | |
assignee: | Suresh Subbiah (suresh-subbiah) → Justin Du (justin-du-2) |
Changed in trafodion: | |
status: | New → In Progress |
Changed in trafodion: | |
milestone: | r1.0 → r1.1 |
Changed in trafodion: | |
milestone: | r1.1 → none |
Changed in trafodion: | |
milestone: | none → r1.2 |
tags: |
added: sql-cmu removed: sql-general |
To post a comment you must log in.
Looks that we do try to get stored procedure with type COM_BASE_ TABLE_OBJECT. Should be using COM_STORED_ PROCEDURE_ OBJECT? We found that the object is in Seabase MD table, but we only check if it is base table, index table, or view in ComSeabaseDDL: :getSeabaseUser TableDesc( ). Or we should have code to deal with stored procedure?
Here is the stack when failed to find the stored procedure with correct name given: :getSeabaseUser TableDesc (this=0x7ffffff ebad0, catName=..., COM_BASE_ TABLE_OBJECT, lidDefs= 0) at ../sqlcomp/ CmpSeabaseDDLta ble.cpp: 6708 :getSeabaseTabl eDesc ( 0x7ffffffebad0, catName=..., schName=..., objName=..., COM_BASE_ TABLE_OBJECT, includeInvalidD efs=0) CmpSeabaseDDLta ble.cpp: 7437 e46b8, corrName=..., 0x7ffffffec630, inTableDescStru ct=0x0) NATable. cpp:8006 ec630, bleUsages= 1, inTableDescStru ct=0x0) BindRelExpr. cpp:1445 aseTable (dtName=..., type=2, @0x7fffd681e378 , outbuflen= @0x7fffd681e370 , heap=0x7fffe8a7 5c08, ing=0, emi=0) at ../sqlcomp/ CmpDescribe. cpp:2449 0x7fffd681da68 "showddl rs363;", 0x7fffd6806968, outbuf= @0x7fffd681e378 , @0x7fffd681e370 , heap=0x7fffe8a7 5c08) CmpDescribe. cpp:785 :process (this=0x7fffd67 eb880, CmpStatement. cpp:998 :compileDirect (this=0x7fffe7e df090, 0x7fffd63b0710 "showddl rs363;", data_len=14, outHeap= 0x7fffe94e5138, j::DESCRIBE, gen_code= @0x7fffe8a7a120 , code_len= @0x7fffe8a7a128 , parserFlags=0, diagsArea= 0x7fffd5f65cd0) CmpContext. cpp:727 79db8) ex_ddl. cpp:584 9db8) ex_tcb. h:99 7a7b0) ExScheduler. cpp:751 79920, ExScheduler. cpp:328 tcb::execute (this=0x7fffe8a 7a830, 0xb847a0, glob=0x7fffd5eb 2658, input_desc= 0x7fffe8abfa38, @0x7fffffff1740 , reExecute=0) at ../executor/ ex_root. cpp:1055 :execute (this=0x7fffe8a 69bd0, 0xb847a0, input_desc= 0x7fffe8abfa38, diagsArea=..., state=CliStatem ent::INITIAL_ STATE_, fixupOnly=0, cliflags=0) Statement. cpp:4812 PerformTasks( CliGlobals *, ULng32, SQLSTMT_ID *, SQLDESC_ID *, SQLDESC_ID *, Lng32, Lng32, typedef __va_list_tag __...
(gdb) bt
#0 CmpSeabaseDDL:
schName=..., objName=..., objType=
includeInva
#1 0x00007ffff0a4d6b4 in CmpSeabaseDDL:
this=
objType=
at ../sqlcomp/
#2 0x00007fffef095a97 in NATableDB::get (this=0x7fffe7e
bindWA=
at ../optimizer/
#3 0x00007fffeede2298 in BindWA::getNATable (this=0x7ffffff
corrName=..., catmanCollectTa
at ../optimizer/
#4 0x00007ffff09abc14 in CmpDescribeSeab
outbuf=
pkeyStr=0x0, withPartns=1, withoutSalt=0, withoutDivision
noTrailingS
#5 0x00007ffff09a5f4b in CmpDescribe (query=
queryExpr=
outbuflen=
at ../sqlcomp/
#6 0x00007ffff5486a4f in CmpStatement:
statement=...) at ../arkcmp/
#7 0x00007ffff547530e in CmpContext:
data=
charset=15, op=CmpMessageOb
gen_
at ../arkcmp/
#8 0x00007ffff4847452 in ExDescribeTcb::work (this=0x7fffe8a
at ../executor/
#9 0x00007ffff4863a67 in ex_tcb::sWork (tcb=0x7fffe8a7
at ../executor/
#10 0x00007ffff49cc22f in ExSubtask::work (this=0x7fffe8a
at ../executor/
#11 0x00007ffff49cb5f2 in ExScheduler::work (this=0x7fffe8a
prevWaitTime=0) at ../executor/
#12 0x00007ffff48ba746 in ex_root_
cliGlobals=
diagsArea=
#13 0x00007ffff5ef475a in CliStatement:
cliGlobals=
execute_
at ../cli/
#14 0x00007ffff5e7d37f in SQLCLI_