Prepared statements (server) return no results, client statements work
Hello,
We have a C application using ODBC drivers to communicate with a Linux MySQL installation. When SQLExecDirect running a "select * from "USERS" where ("USER" = ?) ; statement with a bound variable string with a value of "MANAGER" the subsequent SQLFetch returns SQL_NO_DATA.
However, switching the "Prepare statements on the client" ON in the driver results in a single row being returned.
Packet monitoring on the Linux box shows that the request is correctly sent in both cases. It shows the first case preparing/responding/executing/responding as expected. In the second case is shows the pre-substituted statement being executed and responding with the same result.
One minor difference between the two executions is that the response to the server side execution is two bytes longer. Wiresahark does report "EOF Marker found while connection in wrong state." Which may or may not have something to do with the client not interpreting the result. I have found little documentation on "client_deprecate_eof" setting which apparently may have an impact. Neither is there any great deal of documentation as to why/when "Prepare statements on the client" should be used.
Any pointers / further investigation areas would be greatly appreciated.
-------------------------
mysql Ver 14.14 Distrib 5.7.24, for Linux (x86_64)
ODBC driver Windows 5.03.11.00 or 8.00.13.00 Oracle Corporation
Subject
Written By
Posted
Prepared statements (server) return no results, client statements work
November 30, 2018 06:35AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.