Query Cancel for DDL statement "ALTER TABLE DROP COLUMN" failed
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Trafodion |
Fix Committed
|
High
|
Mike Hanlon |
Bug Description
Tested in Trafodion v1.1 build 2015-03-29.
A testcsae for Query Cancel failed to cancel a DDL statement "ALTER TABLE DROP COLUMN". The testcase executed a "ALTER TABLE DROP COLUMN" statement from a trafci session, then cancel it from another trafci session. The statement failed to be cancelled properly.
The log files, ssmp_0.log, can found on cluster centos-
Below are detail steps to reproduce the error:
-------
From a trafci session 1:
create schema sch1;
set schema sch1;
create table f01(
colkey int not null,
colint int not null,
-- coldate date,
colnum numeric(11,3),
colchariso char(11) character set iso88591 not null,
colcharucs2 char(11) character set ucs2 not null,
colintn int,
-- colts timestamp,
colcharison char(13) character set iso88591,
primary key(colint, colchariso, colcharucs2, colkey)
)
;
upsert using load into f01 select
from (values(1)) t
transpose 0,1,2,3,4,5,6,7,8,9 as c1
transpose 0,1,2,3,4,5,6,7,8,9 as c2
transpose 0,1,2,3,4,5,6,7,8,9 as c3
transpose 0,1,2,3,4,5,6,7,8,9 as c4
transpose 0,1,2,3,4,5,6,7,8,9 as c5;
prepare xx from alter table f01 drop column colintn;
execute xx;
-------------------
From trafci session 2:
control query cancel qid "<QID from session 1>";
------------------
In tarfci session 1:
execute xx;
*** ERROR[1] The message id: problem_
*** ERROR[1] The message id: header_
Changed in trafodion: | |
assignee: | nobody → Mike Hanlon (mike-hanlon) |
status: | New → In Progress |
Reviewed: https:/ /review. trafodion. org/1439 /github. com/trafodion/ core/commit/ 205300067e76d87 cd77d02fa2073c8 4a1a413d16
Committed: https:/
Submitter: Trafodion Jenkins
Branch: master
commit 205300067e76d87 cd77d02fa2073c8 4a1a413d16
Author: Mike Hanlon <email address hidden>
Date: Thu Apr 2 18:18:52 2015 +0000
Special logic to cancel DROP COLUMN
This change introduces a new static function to check whether
the parent query has been canceled. It is called by during an
ALTER TABLE .. DROP COLUMN statement.
Closes-Bug: 1439505
Change-Id: I8342488821e719 320273aa343cab3 ba5b9a93444