Bug #16467 Embedded MySql, problem with mysql_stmt_bind_result
Submitted: 12 Jan 2006 22:50 Modified: 14 Mar 2007 20:46
Reporter: George Milonakis Email Updates:
Status: Closed Impact on me:
Category:MySQL Server Severity:S2 (Serious)
Version:5.0.16 OS:Windows (win32)
Assigned to: Hartmut Holzgraefe CPU Architecture:Any

[12 Jan 2006 22:50] George Milonakis
There is an inconsistency with the behavior of mysql_stmt_bind_result() & mysql_fetch_field() between the embedded server and the remote server.

I have a table with several varchar columns. When i call mysql_fetch_field(),  MySql Embedded Server 4.1.15 reports the type of the varchar column as MYSQL_TYPE_VAR_STRING, and MySql Embedded Server 5.0.16 reports the type as MYSQL_TYPE_VARCHAR.

When after, I call mysql_stmt_bind_result() on MySql Embedded Server 5.0.16 it fails with an error message like 'unsupported buffer type'. If I call the same function on  Embedded Server 4.1.15 it executes succesfully.

Also in Embedded Server 4.1.15 the function mysql_stmt_bind_result() fails if the buffer_type is MYSQL_TYPE_DOUBLE but on the MySql Embedded Server 5.0.16 it executes succesfully.

How to repeat:
Unfortunatelly I am building a very big application in C++ using Win32 API. I can't send you at the moment something because it is quite a lot of work for me.
I hope you get the general idea from the description above.

Suggested fix:
I builted and tested the System I am building using the remote MySQL Server as a service (normal installation). I was hopping that the behavior would be the same for the embbeded MySql Server. Unfortunatelly the embedded server behaves differently and no where in the manual says anything for this.
[13 Jan 2006 13:30] MySQL Verification Team
Could you please provide a test code case, generally just the description of the
issue isn't enough for to repeat the behavior reported.

Thanks in advance.
[14 Mar 2007 20:46] Hartmut Holzgraefe
the mysql_fetch_fields() type problem was a temporary one, could repeat it with 5.0.16 but not anymore with 5.0.18 and 5.0.19, same for the "unsupported buffer type" which was a followup error