Description:
The problem occurs when using the driver with embedded mysql server.
The lines 149-150 in execute.c should change. The code with the bug is:
if ( !to ||
(nead= (ulong) (to - (char*) net->buff)+length) > net->max_packet-10 )
This should change to:
nead= (ulong) (to - (char*) net->buff)+length;
if ( !to ||
nead > net->max_packet-10 )
Otherwise, in embedded mysql server, the "!to" is always true and the nead is never
initialized. Hence, SQLExecute function returns string format exception when using the
prepared statements.
How to repeat:
Use embedded mysql server, use iodbc with unix (Solaris). Use the prepared statements
(INSERT, UPDATE, etc) in the test program, use the ODBC API and you will get the error.
Suggested fix:
The problem occurs when using the driver with embedded mysql server.
The lines 149-150 in execute.c should change. The code with the bug is:
if ( !to ||
(nead= (ulong) (to - (char*) net->buff)+length) > net->max_packet-10 )
This should change to:
nead= (ulong) (to - (char*) net->buff)+length;
if ( !to ||
nead > net->max_packet-10 )
Otherwise, in embedded mysql server, the "!to" is always true and the nead is never
initialized. Hence, SQLExecute function returns string format exception when using the
prepared statements.
Description: The problem occurs when using the driver with embedded mysql server. The lines 149-150 in execute.c should change. The code with the bug is: if ( !to || (nead= (ulong) (to - (char*) net->buff)+length) > net->max_packet-10 ) This should change to: nead= (ulong) (to - (char*) net->buff)+length; if ( !to || nead > net->max_packet-10 ) Otherwise, in embedded mysql server, the "!to" is always true and the nead is never initialized. Hence, SQLExecute function returns string format exception when using the prepared statements. How to repeat: Use embedded mysql server, use iodbc with unix (Solaris). Use the prepared statements (INSERT, UPDATE, etc) in the test program, use the ODBC API and you will get the error. Suggested fix: The problem occurs when using the driver with embedded mysql server. The lines 149-150 in execute.c should change. The code with the bug is: if ( !to || (nead= (ulong) (to - (char*) net->buff)+length) > net->max_packet-10 ) This should change to: nead= (ulong) (to - (char*) net->buff)+length; if ( !to || nead > net->max_packet-10 ) Otherwise, in embedded mysql server, the "!to" is always true and the nead is never initialized. Hence, SQLExecute function returns string format exception when using the prepared statements.