Help required from dbd::mysql maintainers/authors re MYSQL_VERSION_IDand SERVER_PREPARE_VERSION

Help required from dbd::mysql maintainers/authors re MYSQL_VERSION_IDand SERVER_PREPARE_VERSION

am 02.04.2006 13:36:41 von Martin.Evans

Hi,

I could really do with a little assistance form the dbd::mysql
maintainers or authors please.

I am investigating the issue I reported here with execute_array or all
executes failing after one execute fails.

i.e.
create table test (a int primary key)
prepare(insert into test values(?)
execute(1) - OK
execute(2) - OK
execute(1) - fails but expected
execute(3) - fails but row inserted and not expected to fail

It appears this has something to do with whether MYSQL_VERSION_ID is <=
SERVER_PREPARE_VERSION.

My myql is 50015 and my client lib is also 50015 - as client and server
are on the same machine.
SERVER_PREPARE_VERSION is 40103 (in dbimp.h)

When I run with dbd::mysql (from 3.0002_4) it fails.
When I turn all comparisons of MYSQL_VERSION_ID >=
SERVER_PREPARE_VERSION around so it is < it works.
Can someone tell my if dbd_st_execute is supposed to call
mysql_st_internal_execute41 for versions of MySQL
40103 and lower or the opposite way around. I suspect it should be:

if MYSQL_VERSION_ID < SERVER_PREPARE_VERSION
use mysql_st_internal_execute41

because other places in the code do things like:

#if MYSQL_VERSION_ID < SERVER_PREPARE_VERSION
if (mysql_real_query(&imp_dbh->mysql, "COMMIT", 6))
#else
if (mysql_commit(&imp_dbh->mysql))
#endif

because functions like mysql_commit were introduced in 4.1

I'd greatly appreciate any help here as I'm desparately trying to make
this work and trying very hard to feedback problems and fixes to DBD::mysql.

Martin