Support cancel for DDL, update stats, and utils This change propagates parent query ID to queries created by DDL, update stats and utils. In this way, preexisting code sets up child query IDs and the preexisting cancel broker code in RMS cancels the entire query tree below the indicated parent. Also added is logic to check for a canceled parent at the time a child query ID is setup in Statement::execute, to make the scheme more robust and to support a common scenario where the parent is compiling a child query at the time of cancel.
This change also makes ex_root_tcb::cancel to wait for cancel broker message completion. This fixes a problem where a query (e.g., CREATE INDEX or DROP INDEX) is prepared, executed once and gets an error, then re-execed. In this case, sqlci was not closing the statement after the error. To improve robustness, after an error we will now wait for message completion, if needed.
Since we do not yet have transaction protection for DDL, it will usually be required to cleanup canceled DDL operations by using the CLEANUP command.
repository upgrade and explain enhancements. Details below. -- repository upgrade infrastructure integrated with 'initialize trafodion, upgrade' -- fields have been added/removed/modified in repos tables -- new repos table has been added
-- upgrade enhanced to only upgrade subset of components that need to be upgraded. One or more of metadata, repos, views, priv.
-- metadata version now tracks release version and indicates the traf release where upgrade was needed. Current metadata version will be 1.1.0.
-- packed explain data is now returned to caller so it could be stored in repository -- explain info from repository for a query id could be retrieved and displayed explain qid <query-id>; explain options 'f' qid <query-id> select * from table(explain(null, 'EXPLAIN_QID=<query-id>'));
-- a sql query could be explained and returned in relational format. select * from table(explain(null, 'EXPLAIN_STMT=<query-str>)); Users only need to have select permission on tables referenced in query-str.
-- explain and statistics tables could be invoked invoke table(explain(null, null)); invoke table(statistics(null, null));