Protocol problem with client library
Posted by: Phil Bayfield
Date: July 24, 2010 12:39PM

Hi,

I've written a MySQL client library for the Go programming language and I'm experiencing an issue with prepared statements. I'm hopeful that someone on the MySQL forum may be able to offer some advice in helping to solve the problem.

I have followed the protocol specifications as described on MySQL Forge, here: http://forge.mysql.com/wiki/MySQL_Internals_ClientServer_Protocol however I suspect that this information by not be completely current.

I am able to execute a prepared statement and receive binary result data without an issue, however if I attempt to repeat the execute command with or without rebinding parameters I start to get errors.

If I simply call the execute function twice, I get the following error:

Error #1210 Incorrect arguments to mysqld_stmt_execute

If I attempt to rebind parameters, then I get an invalid response back from MySQL server, just a single byte with value 2.

There is a little more information on the github issue here: http://github.com/Philio/GoMySQL/issues#issue/6

I think perhaps as I mentioned, I may have followed an out of date specification for the execute command. I have encountered some other issues with the protocol where the data I have received does not match the specifications on MySQL Forge exactly but have been able to debug these issues by reviewing the stream of bytes in server responses, however unfortunately with this one it's not possible as I don't get a valid server response.

Perhaps someone can point me in the direction of a more up to date version of this document?

Any help anyone may be able to offer in resolving the issue would be greatly appreciated.

Options: ReplyQuote


Subject
Views
Written By
Posted
Protocol problem with client library
1199
July 24, 2010 12:39PM


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.