diff options
author | Jun Kuriyama <kuriyama@FreeBSD.org> | 2005-08-28 07:11:46 +0000 |
---|---|---|
committer | Jun Kuriyama <kuriyama@FreeBSD.org> | 2005-08-28 07:11:46 +0000 |
commit | b8c468cc17ba23e888ef3d4ab89f49c00a051672 (patch) | |
tree | 2fcf020bc2ee8d80e33b838ce6136f586668d736 /databases | |
parent | 0fe32b32735d48d5da6a458d0b5adb1d8573cc70 (diff) | |
download | ports-b8c468cc17ba23e888ef3d4ab89f49c00a051672.tar.gz ports-b8c468cc17ba23e888ef3d4ab89f49c00a051672.zip |
Notes
Diffstat (limited to 'databases')
-rw-r--r-- | databases/p5-DBD-Pg/Makefile | 1 | ||||
-rw-r--r-- | databases/p5-DBD-Pg/files/patch-06bytea.t | 34 | ||||
-rw-r--r-- | databases/p5-DBD-Pg/files/patch-quote.c | 11 |
3 files changed, 46 insertions, 0 deletions
diff --git a/databases/p5-DBD-Pg/Makefile b/databases/p5-DBD-Pg/Makefile index 3ea671327b7a..c6c60a635959 100644 --- a/databases/p5-DBD-Pg/Makefile +++ b/databases/p5-DBD-Pg/Makefile @@ -7,6 +7,7 @@ PORTNAME= DBD-Pg PORTVERSION= 1.43 +PORTREVISION= 1 CATEGORIES= databases perl5 MASTER_SITES= ${MASTER_SITE_PERL_CPAN} MASTER_SITE_SUBDIR= DBD diff --git a/databases/p5-DBD-Pg/files/patch-06bytea.t b/databases/p5-DBD-Pg/files/patch-06bytea.t new file mode 100644 index 000000000000..3a02b028fa50 --- /dev/null +++ b/databases/p5-DBD-Pg/files/patch-06bytea.t @@ -0,0 +1,34 @@ +--- t/06bytea.t.orig Sun Mar 20 10:47:38 2005 ++++ t/06bytea.t Thu Aug 4 22:34:26 2005 +@@ -9,7 +9,7 @@ + $|=1; + + if (defined $ENV{DBI_DSN}) { +- plan tests => 3; ++ plan tests => 6; + } else { + plan skip_all => 'Cannot run test unless DBI_DSN is defined. See the README file'; + } +@@ -22,12 +22,21 @@ + + $sth = $dbh->prepare(qq{INSERT INTO dbd_pg_test (id,bytetest) VALUES (?,?)}); + $sth->bind_param(2, undef, { pg_type => DBD::Pg::PG_BYTEA }); +-$sth->execute(400, "a\0b"); ++ok($sth->execute(400, "a\0b", 'execute 401'); ++ok($sth->execute(401, '\''), 'execute 401'); ++ok($sth->execute(402, '\''), 'execute 402'); ++ ++ + $sth = $dbh->prepare(qq{SELECT bytetest FROM dbd_pg_test WHERE id=?}); + $sth->execute(400); + + my $byte = $sth->fetchall_arrayref()->[0][0]; + ok($byte eq "a\0b", "text from BYTEA column looks corect"); ++ ++$sth->execute(402); ++$byte = $sth->fetchall_arrayref()->[0][0]; ++is($byte, '\'', 'text from BYTEA column with quote'); ++ + $sth->finish(); + + $dbh->rollback(); diff --git a/databases/p5-DBD-Pg/files/patch-quote.c b/databases/p5-DBD-Pg/files/patch-quote.c new file mode 100644 index 000000000000..0ffbf3bd2f33 --- /dev/null +++ b/databases/p5-DBD-Pg/files/patch-quote.c @@ -0,0 +1,11 @@ +--- quote.c.orig Wed May 25 04:14:24 2005 ++++ quote.c Thu Aug 4 22:34:26 2005 +@@ -307,7 +307,7 @@ + dest = result; + + Copy("'", dest++, 1, char); +- strncpy(dest,intermead,strlen(intermead)); ++ strncpy(dest,intermead,strlen(intermead)+1); + strcat(dest,"\'"); + + #if PGLIBVERSION >= 70400 |