mirror of
https://github.com/DBD-SQLite/DBD-SQLite
synced 2025-06-07 14:19:10 -04:00
DBD::SQLite: reverted the patch from RT #35449, which turns out to break tests
This commit is contained in:
parent
a0fe46546a
commit
63b017a9dd
3 changed files with 0 additions and 43 deletions
15
SQLite.xs
15
SQLite.xs
|
@ -63,21 +63,6 @@ busy_timeout(dbh, timeout=0)
|
||||||
OUTPUT:
|
OUTPUT:
|
||||||
RETVAL
|
RETVAL
|
||||||
|
|
||||||
void
|
|
||||||
_do(dbh, statement)
|
|
||||||
SV * dbh
|
|
||||||
char * statement
|
|
||||||
CODE:
|
|
||||||
{
|
|
||||||
D_imp_dbh(dbh);
|
|
||||||
IV retval;
|
|
||||||
retval = sqlite_db_do(dbh, imp_dbh, statement);
|
|
||||||
if (retval == 0)
|
|
||||||
XST_mPV(0, "0E0"); /* (true but zero) */
|
|
||||||
else
|
|
||||||
XST_mUNDEF(0); /* <= -2 means error */
|
|
||||||
}
|
|
||||||
|
|
||||||
MODULE = DBD::SQLite PACKAGE = DBD::SQLite::st
|
MODULE = DBD::SQLite PACKAGE = DBD::SQLite::st
|
||||||
|
|
||||||
PROTOTYPES: DISABLE
|
PROTOTYPES: DISABLE
|
||||||
|
|
19
dbdimp.c
19
dbdimp.c
|
@ -230,25 +230,6 @@ sqlite_db_commit(SV *dbh, imp_dbh_t *imp_dbh)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
|
||||||
sqlite_db_do(SV *dbh, imp_dbh_t *imp_dbh, char *statement)
|
|
||||||
{
|
|
||||||
dTHR;
|
|
||||||
int retval;
|
|
||||||
char *errmsg;
|
|
||||||
|
|
||||||
sqlite_trace(2, "DO");
|
|
||||||
if ((retval = sqlite3_exec(imp_dbh->db, statement,
|
|
||||||
NULL, NULL, &errmsg))
|
|
||||||
!= SQLITE_OK)
|
|
||||||
{
|
|
||||||
sqlite_error(dbh, (imp_xxh_t*)imp_dbh, retval, errmsg);
|
|
||||||
return -2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
int
|
||||||
sqlite_discon_all(SV *drh, imp_drh_t *imp_drh)
|
sqlite_discon_all(SV *drh, imp_drh_t *imp_drh)
|
||||||
{
|
{
|
||||||
|
|
|
@ -62,15 +62,6 @@ sub connect {
|
||||||
|
|
||||||
package DBD::SQLite::db;
|
package DBD::SQLite::db;
|
||||||
|
|
||||||
sub do {
|
|
||||||
my ($dbh, $statement, $attr, @params) = @_;
|
|
||||||
return DBD::SQLite::db::_do($dbh, $statement) unless defined $attr && @params;
|
|
||||||
my $sth = $dbh->prepare($statement, $attr) or return undef;
|
|
||||||
$sth->execute(@params) or return undef;
|
|
||||||
my $rows = $sth->rows;
|
|
||||||
($rows == 0) ? "0E0" : $rows;
|
|
||||||
}
|
|
||||||
|
|
||||||
sub prepare {
|
sub prepare {
|
||||||
my ($dbh, $statement, @attribs) = @_;
|
my ($dbh, $statement, @attribs) = @_;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue