Hi,

I am try to store some info in metadata, and I find the TEXT table is not 
enough. So I'd like to add another metadata table.

So I add a item in allMDtablesInfo in file CmpSeabaseDDLmd.h, in alphabetical 
order(is the order necessary?), just like other metadata table.
That's ALL change I have done.

Then I reinitialize the trafodion with statement initialize trafodion, and I 
get the following message:

SQL error [X01BW]: *** ERROR[1428] Metadata definitions could not be created 
and preloaded in global MDdescInfo struct. Make sure that metadata table 
definition syntax is correct. [2018-03-05 09:37:19]
  *** ERROR[1428] Metadata definitions could not be created and preloaded in 
global MDdescInfo struct. Make sure that metadata table definition syntax is 
correct. [2018-03-05 09:37:19]
    *** ERROR[4082] Object TRAFODION."_MD_".OBJECTS does not exist or is 
inaccessible. [2018-03-05 09:37:19]
*** ERROR[8822] The statement was not prepared. [2018-03-05 09:37:19]

And the error occurs in CmpSeabaseDDL::getSeabaseTableDesc:

    #1  0x00007f164c0693fa in CmpSeabaseDDL::getSeabaseTableDesc 
(this=0x7f161f51b3e0, catName=..., schName=..., objName=..., 
objType=COM_BASE_TABLE_OBJECT, includeInvalidDefs=0) at 
../sqlcomp/CmpSeabaseDDLtable.cpp:14338
    #2  0x00007f164a19f2f4 in NATableDB::get (this=0x7f161e92e5b8, 
corrName=..., bindWA=0x7f161f51efc0, inTableDescStruct=0x0) at 
../optimizer/NATable.cpp:9193
    #3  0x00007f1649eb8e42 in BindWA::getNATable (this=0x7f161f51efc0, 
corrName=..., catmanCollectTableUsages=1, inTableDescStruct=0x0) at 
../optimizer/BindRelExp    r.cpp:1563
    #4  0x00007f1649ed2f2d in Scan::bindNode (this=0x7f1618a7a478, 
bindWA=0x7f161f51efc0) at ../optimizer/BindRelExpr.cpp:7840
    #5  0x00007f1649ebcea5 in RelExpr::bindChildren (this=0x7f1618a877f0, 
bindWA=0x7f161f51efc0) at ../optimizer/BindRelExpr.cpp:2446
    #6  0x00007f1649eca804 in RelRoot::bindNode (this=0x7f1618a877f0, 
bindWA=0x7f161f51efc0) at ../optimizer/BindRelExpr.cpp:5743
#7  0x00007f164bf625c7 in CmpMain::compile (this=0x7f161f521980, 
input_str=0x7f161e989478 "select object_uid, object_owner, schema_owner, flags, 
create_time from TRAFODION.\"_MD_\".OBJECTS where catalog_name = 'TRAFODION' 
and schema_name = '_REPOS_' and object_name = 'METRIC_QUERY_AGGR_TABLE'"..., 
charset=15, queryExpr=@0x7f161f521868, gen_code=0x7f1618a77300, 
gen_code_len=0x7f1618a772f8, heap=0x7f161eabf840, phase=CmpMain::END, 
fragmentDir=0x7f161f521ad0, op=3004, useQueryCache=CmpMain::NORMAL, 
cacheable=0x7f161f521854, begTime=0x7f161f521870, shouldLog=0) at 
../sqlcomp/CmpMain.cpp:2140

The objName in stack frmae 1 is OBJECTS.

As the info shows, it sees that there is something wrong with the OBJECTS 
table, which has nothing to do with the newly add one.
Can anyone figure out what is wrong?

Is this related to old metadata tables, and do I have the change the 
SEABASE_xxx_OLD_MD accordingly?

Thanks

Regards,
Wenjun Zhu

Reply via email to