Specify compiler context when querying natable virtual table interface select * from table(natablecache('ALL','local')) ; select * from table(natablecacheentries('meta','local')) ; select * from table(naroutinecache('user','local')) ;
Following the querycache virtual table interface, now the natable and naroutine cache virtual table interfaces also support specifying the name of the context we want to query. The first parameter can be 'all' or name of context (e.g. 'meta', 'user', 'ustat'). The second parameter can be local or remote. Parameters are case insensitive. For remote compiler we only query the context pointed to by activeschemadb. The column num_entries has been added to natablecache virtual table. This change can be used to monitor memory growth in these caches.
Patch Set 2: Address issues found by Dave. Changes in 4 files sql/arkcmp/NATableSt.cpp sql/arkcmp/NATableSt.h sql/arkcmp/QueryCacheSt.cpp sql/optimizer/NARoutine.cpp
Changes cover A minor leak in in HQCIterator returning FALSE in NATable/RoutineCacheStats iterator getNext methods
Fix for bug 1409128 Reworked the code to delete Compiler Contexts (CmpContext) from the Trafodion SQL Engine CLI contexts (ContextCli). Now all the CmpContexts created in a ContextCli are deallocated when it is deleted as part of JDBC disconnect call.
Earlier, the code was deallocating the current CmpContext alone. However the current CmpContext may not be from the current ContextCli. This was causing the deallocated memory to be referenced again.