From 3d62ea8a294527bef1dffde164a20f2777e4368d Mon Sep 17 00:00:00 2001 From: Kenichi Ishigaki Date: Wed, 26 Oct 2011 14:42:54 +0000 Subject: [PATCH] oops, bind_param type error was treated as a warning and didn't kill when RaiseError was set --- Changes | 2 ++ dbdimp.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Changes b/Changes index 1eb9a98..ea388f2 100644 --- a/Changes +++ b/Changes @@ -2,6 +2,8 @@ Changes for Perl extension DBD-SQLite 1.34_03 to be released - Adding an explicit dynamic_config => 1 (ADAMK) + - bind_param SQL_INTEGER error now actually dies with RaiseError. + (ISHIGAKI) 1.34_02 Fri 21 Oct 2011 *** CHANGES THAT MAY POSSIBLY BREAK YOUR OLD APPLICATIONS *** diff --git a/dbdimp.c b/dbdimp.c index c61ee46..18a307a 100644 --- a/dbdimp.c +++ b/dbdimp.c @@ -694,7 +694,7 @@ sqlite_st_execute(SV *sth, imp_sth_t *imp_sth) } else { if (sql_type == SQLITE_INTEGER || sql_type == SQLITE_FLOAT) { - sqlite_error(sth, imp_sth->retval, form("datatype mismatch: bind %d type %d as %s", i, sql_type, SvPV_nolen_undef_ok(value))); + sqlite_error(sth, -2, form("datatype mismatch: bind %d type %d as %s", i, sql_type, SvPV_nolen_undef_ok(value))); return -2; /* -> undef in SQLite.xsi */ }