DCS went dead during ODBC SQLCancel testing

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

Bug Description

The SQLCancel test was done thru ODBCTEST. In this case, seems the 2nd SQLCancel on a SQL query caused DCS went dead, client couldn't connect to Trafodion servery any more.

Query used in the test:
select count(*) from "_MD_".columns a, "_MD_".indexes b, "_MD_".objects c, "_MD_".tables d, "_MD_".columns e, "_MD_".indexes f, "_MD_".objects g, "_MD_".tables h, "_MD_".columns i, "_MD_".indexes j, "_MD_".objects k, "_MD_".tables l

Test steps:
1. set to Async mode: SQLSetStmtAttr:
                                                                In: StatementHandle = 0x000000000020B230, 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
2. SQLPrepare:
                                                                In: StatementHandle = 0x000000000020B230, StatementText = "select count(*) from "_MD_".columns a, "_MD_".inde...", TextLength = 232
                                                                Return: SQL_STILL_EXECUTING=2
3.SQLCancel:
                                                                In: StatementHandle = 0x000000000020B230
                                                                Return: SQL_SUCCESS=0
4. SQLPrepare:
                                                                In: StatementHandle = 0x000000000020B230, StatementText = "select count(*) from "_MD_".columns a, "_MD_".inde...", TextLength = 232
                                                                Return: SQL_SUCCESS=0

5. SQLExecute:
                                                                In: StatementHandle = 0x000000000020B230
                                                                Return: SQL_STILL_EXECUTING=2
6.SQLCancel:
                                                                In: StatementHandle = 0x000000000020B230
                                                                Return: SQL_SUCCESS=0
7. SQLExecute:
                                                                In: StatementHandle = 0x000000000020B230
                                                                Return: SQL_SUCCESS=0
8. SQLExecute:
                                                                In: StatementHandle = 0x000000000020B230
                                                                Return: SQL_STILL_EXECUTING=2
9. SQLCancel: ->kept running until driver timed out, and DCS went dead, no more connection can be made.

Changed in trafodion:
status: New → Fix Committed
Revision history for this message
Zbigniew Omanski (zbigniew-omanski) wrote :

When the SQLCancel is sent by JDBC/ODBC Drivers, the DcsMaster gets following parameters:
                dialogueId
                srvrType
                srvrObjRef
                stopType
If Sql Cancel is sent by JDBC Driver, srvrObjRef has only portNumber. When the request is sent by ODBC Driver, its format is following:
"TCP:IpAddress/PortNumber:ODBC".
To get the portNumber we have to parse srvrObjRef string

Revision history for this message
Jieping Zhang (jieping-zhang) wrote :

Validated the fix on 20150401_0830 build, test passed.

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.