5 if (defined $ENV{DBI_DSN}) {
8 plan skip_all => 'cannot test without DB info';
11 my $dbh = DBI->connect($ENV{DBI_DSN}, $ENV{DBI_USER}, $ENV{DBI_PASS},
12 {RaiseError => 1, AutoCommit => 0}
15 'connect with transaction'
24 my $sth = $dbh->prepare($sql);
29 ok($sth->bind_param(1, 'foo'),
30 'bind int column with string'
33 ok($sth->bind_param(1, 1),
34 'rebind int column with int'
44 $sth = $dbh->prepare($sql);
49 ok($sth->bind_param(1, 'foo'),
50 'bind int column with string',
52 ok($sth->bind_param(2, 'bar'),
53 'bind string column with text'
55 ok($sth->bind_param(2, 'baz'),
56 'rebind string column with text'
63 # Make sure that we get warnings when we try to use SQL_BINARY.
65 local $SIG{__WARN__} =
66 sub { ok($_[0] =~ /^Use of SQL type SQL_BINARY/,
67 'warning with SQL_BINARY'
78 $sth = $dbh->prepare($sql);
80 $sth->bind_param(1, 'foo', DBI::SQL_BINARY);
83 ok($dbh->disconnect(),