On Mon, Aug 23, 2004 at 11:54:04AM +0100, Matt Sergeant wrote:
> There was a change in prototype for dbd_db_last_insert_id in 1.43.
>
> How should DBD developers handle this change in their code?
(last_insert_id was fairly broken until 1.43.)
The simplest way is just to have the Makefile.PL check if the installed
DBI is 1.42 and if so croak with a message suggesting they upgrade.
Or, assuming you have a line line this in your .h file:
#define dbd_db_last_insert_id sqlite_db_last_insert_id
you could change that to
#ifndef no_last_insert_id
#define dbd_db_last_insert_id sqlite_db_last_insert_id
#endif
pass a -Dno_last_insert_id to the compiler is using DBI 1.42.
Sadly the DBI doesn't define a C preprocessor macro giving the version.
I'll add this to the DBI v2 ToDo.
Tim.