Query Cancel for DDL statement "ALTER TABLE DROP COLUMN" failed

Bug #1439505 reported by Chong Hsu
6
This bug affects 1 person
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-mapr1.hpl.hp.com (node centos-mapr6) /home/trafodion/trafodion-20150329_0830/logs (in attachment too). The core files, core.2015-04-01_10-17-04.Z000QB3.31013.mxosrvr, can found on cluster centos-mapr1.hpl.hp.com (node centos-mapr6) /home/trafodion/trafodion-20150329_0830/sql/scripts.

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,
        colcharucs2n char(13) character set ucs2,
        primary key(colint, colchariso, colcharucs2, colkey)
        )
        ;

upsert using load into f01 select
        c1+c2*10+c3*100+c4*1000+c5*10000, --colkey
        c1+c2*10+c3*100+c4*1000+c5*10000, --colint
        cast(c1+c2*10+c3*100+c4*1000+c5*10000 as numeric(11,3)), --colnum
        cast(c1+c2*10+c3*100+c4*1000+c5*10000 as char(11) character set iso88591), --colchariso
        cast(c1+c2*10+c3*100+c4*1000+c5*10000 as char(11) character set ucs2), --colcharucs2
        c1+c2*10+c3*100+c4*1000+c5*10000, --colintn
        cast(c1+c2*10+c3*100+c4*1000+c5*10000 as char(13) character set iso88591), --colvchriso
        cast(c1+c2*10+c3*100+c4*1000+c5*10000 as char(13) character set ucs2) --colvchrucs2
        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_with_server_read
*** ERROR[1] The message id: header_not_long_enough

Tags: sql-exe
Revision history for this message
Chong Hsu (chong-hsu) wrote :
Changed in trafodion:
assignee: nobody → Mike Hanlon (mike-hanlon)
status: New → In Progress
Revision history for this message
Trafodion-Gerrit (neo-devtools) wrote : Fix merged to core (master)

Reviewed: https://review.trafodion.org/1439
Committed: https://github.com/trafodion/core/commit/205300067e76d87cd77d02fa2073c84a1a413d16
Submitter: Trafodion Jenkins
Branch: master

commit 205300067e76d87cd77d02fa2073c84a1a413d16
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: I8342488821e719320273aa343cab3ba5b9a93444

Changed in trafodion:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.