[freetds] Invalid Cursor State By SELECT after INSERT

James K. Lowden jklowden at freetds.org
Wed Jul 23 16:09:43 EDT 2008


John Mazza wrote:
> odbc.c:3021:_SQLExecute(0xa096b60)
> odbc.c:3026:_SQLExecute() starting with state 2
> error.c:609:SQLGetDiagRec(3, 0xa096b60, 1, 0xbf96441e, 0xbf96442c,
> 0xbf96421e, 512, 0xbf964428)
> error.c:512:_SQLGetDiagRec(3, 0xa096b60, 1, 0xbf96441e, 0xbf96442c,
> 0xbf96421e, 512, 0xbf964428)
> error.c:609:SQLGetDiagRec(3, 0xa096b60, 2, 0xbf96441e, 0xbf96442c,
> 0xbf96421e, 512, 0xbf964428)
> error.c:512:_SQLGetDiagRec(3, 0xa096b60, 2, 0xbf96441e, 0xbf96442c,
> 0xbf96421e, 512, 0xbf964428)
> error.c:609:SQLGetDiagRec(3, 0xa096b60, 1, 0x121c48, 0xbf964788,
> 0x1293b8, 0, 0xbf964784)
> error.c:512:_SQLGetDiagRec(3, 0xa096b60, 1, 0x121c48, 0xbf964788,
> 0x1293b8, 0, 0xbf964784)
> error.c:609:SQLGetDiagRec(3, 0xa096b60, 1, 0x121c48, 0xbf964788,
> 0x186428, 42, 0xbf964784)
> error.c:512:_SQLGetDiagRec(3, 0xa096b60, 1, 0x121c48, 0xbf964788,
> 0x186428, 42, 0xbf964784)
> error.c:609:SQLGetDiagRec(3, 0xa096b60, 1, 0x121c48, 0xbf964788,
> 0x186428, 0, 0xbf964784)
> error.c:512:_SQLGetDiagRec(3, 0xa096b60, 1, 0x121c48, 0xbf964788,
> 0x186428, 0, 0xbf964784)
> error.c:609:SQLGetDiagRec(3, 0xa096b60, 1, 0x121c48, 0xbf964788,
> 0x186428, 42, 0xbf964784)
> error.c:512:_SQLGetDiagRec(3, 0xa096b60, 1, 0x121c48, 0xbf964788,
> 0x186428, 42, 0xbf964784)
> error.c:609:SQLGetDiagRec(3, 0xa096b60, 2, 0x121c48, 0xbf964788,
> 0x186428, 0, 0xbf964784)
> error.c:512:_SQLGetDiagRec(3, 0xa096b60, 2, 0x121c48, 0xbf964788,
> 0x186428, 0, 0xbf964784)
> odbc.c:3764:SQLFreeHandle(3, 0x0xa096b60)
> odbc.c:3853:_SQLFreeStmt(0xa096b60, 1, 0)
> odbc.c:3932:SQLFreeStmt(0xa0aaa70, 0)
> odbc.c:3853:_SQLFreeStmt(0xa0aaa70, 0, 0)
> query.c:1935:tds_send_cancel: not in_cancel and not idle
> query.c:1944:tds_send_cancel: sending cancel packet

That doesn't look very good.  

There are two diagnostic records.  I guess one says the cursor state is
invalid.  What does the other one say?  

Attached is a patch that will print the diagnostic text to the TDSDUMP
log. Or you can fetch tomorrow's snapshot.  

--jkl
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clearer_errors.diff
Type: application/octet-stream
Size: 1441 bytes
Desc: not available
Url : http://lists.ibiblio.org/pipermail/freetds/attachments/20080723/7f1972cb/attachment.obj 


More information about the FreeTDS mailing list