SQLCancel should avoid to use publication Qid in SQL Cancel operation

Bug #1442730 reported by Jieping Zhang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Trafodion
Fix Released
High
Zbigniew Omanski

Bug Description

SQLCancel should avoid to use publication QID when cancel a running query.

Revision history for this message
Zbigniew Omanski (zbigniew-omanski) wrote :

Currently RMS returns two types of QIDs:
1. QID user's query
2. QID of PUBLICATION query

DCSMaster will ignore SQL Cancel request when gets PUBLICATION QID

Changed in trafodion:
status: New → In Progress
Changed in trafodion:
milestone: r1.2 → r1.1
Changed in trafodion:
status: In Progress → Fix Committed
Revision history for this message
Jieping Zhang (jieping-zhang) wrote :
Download full text (5.4 KiB)

Verified the fix on cluster Amber7 with Traf 1.1.0RC1 build. SQLCancel worked as expected.

Below are the validation steps in ODBCTest:

 Full Connect(Default)

 Env. Attr. SQL_ATTR_ODBC_VERSION set to SQL_OV_ODBC3

 Successfully connected to DSN 'amber7'.
SQLSetStmtAttr:
    In: StatementHandle = 0x00000000003BB220, Attribute = SQL_ATTR_ASYNC_ENABLE=4, ValuePtr = SQL_ASYNC_ENABLE_ON=1, StringLength = SQL_NTS=-3,
          fAttribute Type = SQL_C_SLONG=-16
    Return: SQL_SUCCESS=0
SQLExecDirect:
    In: Statementhandle = 0x00000000003BB220, StatementText = "select count(*) from trafodion."_MD_".columns a, ...", Statementlength = 105
    Return: SQL_STILL_EXECUTING=2
SQLExecDirect:
    In: Statementhandle = 0x00000000003BB220, StatementText = "select count(*) from trafodion."_MD_".columns a, ...", Statementlength = 105
    Return: SQL_SUCCESS=0
SQLFetch:
    In: StatementHandle = 0x00000000003BB220
    Return: SQL_STILL_EXECUTING=2
SQLFetch:
    In: StatementHandle = 0x00000000003BB220
    Return: SQL_STILL_EXECUTING=2
SQLCancel:
    In: StatementHandle = 0x00000000003BB220
    Return: SQL_SUCCESS=0
SQLFetch:
    In: StatementHandle = 0x00000000003BB220
    Return: SQL_ERROR=-1
    stmt: szSqlState = "HY008", *pfNativeError = -8007, *pcbErrorMsg = 131, *ColumnNumber = -1, *RowNumber = -2
          MessageText = "[TRAF][Trafodion ODBC Driver][Trafodion Database] SQL error:*** ERROR[8007] The operation has been canceled. [2015-04-20 20:48:23]"
    stmt: szSqlState = "S1008", *pfNativeError = 0, *pcbErrorMsg = 50, *ColumnNumber = -1, *RowNumber = -2
          MessageText = "[TRAF][Trafodion ODBC Driver] Operation cancelled."
SQLExecDirect:
    In: Statementhandle = 0x00000000003BB220, StatementText = "select count(*) from trafodion."_MD_".columns a, ...", Statementlength = 134
    Return: SQL_STILL_EXECUTING=2
SQLExecDirect:
    In: Statementhandle = 0x00000000003BB220, StatementText = "select count(*) from trafodion."_MD_".columns a, ...", Statementlength = 134
    Return: SQL_SUCCESS=0
SQLFetch:
    In: StatementHandle = 0x00000000003BB220
    Return: SQL_STILL_EXECUTING=2
SQLFetch:
    In: StatementHandle = 0x00000000003BB220
    Return: SQL_STILL_EXECUTING=2
SQLCancel:
    In: StatementHandle = 0x00000000003BB220
    Return: SQL_SUCCESS=0
SQLFetch:
    In: StatementHandle = 0x00000000003BB220
    Return: SQL_ERROR=-1
    stmt: szSqlState = "HY008", *pfNativeError = -8007, *pcbErrorMsg = 131, *ColumnNumber = -1, *RowNumber = -2
          MessageText = "[TRAF][Trafodion ODBC Driver][Trafodion Database] SQL error:*** ERROR[8007] The operation has been canceled. [2015-04-20 20:50:08]"
    stmt: szSqlState = "S1008", *pfNativeError = 0, *pcbErrorMsg = 50, *ColumnNumber = -1, *RowNumber = -2
          MessageText = "[TRAF][Trafodion ODBC Driver] Operation cancelled."
SQLExecDirect:
    In: Statementhandle = 0x00000000003BB220, StatementText = "select count(*) from "_MD_".columns a, "_MD_".inde...", Statementlength = 232
    Return: SQL_STILL_EXECUTING=2
SQLExecDirect:
    In: Statementhandle = 0x00000000003BB220, StatementText = "s...

Read more...

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

Other bug subscribers

Remote bug watches

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