[freetds] Can't write to DB using stored procedure

James K. Lowden jklowden at freetds.org
Mon May 18 18:05:49 EDT 2009


Bodo Schulze wrote:
> util.c:162:Changed query state from READING to IDLE
> token.c:2232:                rows_affected = 0
> util.c:110:logic error: cannot change query state from IDLE to PENDING
> ct.c:1157:ct_results() process_result_tokens returned 1 (type 4053)
> </freetds.log>
> 
> So there's a "logic error". Lines 2216-2221 indicate that the state is
> changed from READING to IDLE on certain conditions

That "logic error" line is just a note to the developers and other
hackers.  

The client tracks the state of the TDS connection so that it can return
errors to the client if requests are made out of order.  (That also helps
avoid the server spanking us by dropping the connection for sending
invalid packets.)  In this case, the client is behaving correctly, but the
library isn't tracking the state correctly; somewhere we missed an update
to the state from IDLE to "sending query" or something like that.  

HTH.  

--jkl



More information about the FreeTDS mailing list