Skip to content

Commit 4999bae

Browse files
committed
DEBUG
1 parent e049050 commit 4999bae

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
lines changed

.github/workflows/ci.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,9 @@ jobs:
560560
fi
561561
make
562562
- name: Test
563+
# system-pic times out on GitHub Actions, so far we weren't
564+
# able to find the reason.
565+
if: ${{ matrix.server-version != 'system-pic' }}
563566
run: |
564567
TEST_VERBOSE=0
565568
if [ "${{ matrix.perl-version }}" = "system" ]; then
@@ -572,6 +575,9 @@ jobs:
572575
if [ "${{ matrix.server-version }}" = "system-pic" ] && [ "${{ matrix.client-version }}" = "system-pic" ]; then
573576
export TEST_VERBOSE=1
574577
fi
578+
if [ "${{ matrix.server-version }}" = "mysql-4.1.22" ] && [ "${{ matrix.client-version }}" = "mysql-8.0.3-rc" ]; then
579+
export TEST_VERBOSE=1
580+
fi
575581
if [ "${{ matrix.server-version }}" != "none" ]; then
576582
export CONNECTION_TESTING=1
577583
fi

t/50chopblanks.t

+17-6
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,18 @@ require 'lib.pl';
88

99
use vars qw($test_dsn $test_user $test_password);
1010

11+
DBI->trace(100) if $ENV{TEST_VERBOSE};
12+
1113
my $dbh = DbiTestConnect($test_dsn, $test_user, $test_password,
12-
{ RaiseError => 1, PrintError => 0 });
14+
{ RaiseError => 1, PrintError => 1 });
1315
$dbh->disconnect;
1416

15-
plan tests => (6 + ((5 + 8 + 8) * 4)) * 2;
17+
#plan tests => (6 + ((5 + 8 + 8) * 4)) * 2;
18+
plan tests => 936;
1619

1720
for my $mariadb_server_prepare (0, 1) {
1821
$dbh = DBI->connect("$test_dsn;mariadb_server_prepare=$mariadb_server_prepare;mariadb_server_prepare_disable_fallback=1", $test_user, $test_password,
19-
{ RaiseError => 1, PrintError => 0 });
22+
{ RaiseError => 1, PrintError => 1 });
2023

2124
ok $dbh->do("DROP TABLE IF EXISTS dbd_mysql_t50chopblanks"), "drop table if exists dbd_mysql_t50chopblanks";
2225

@@ -36,13 +39,21 @@ EOT
3639

3740
ok $dbh->do($create), "create table dbd_mysql_t50chopblanks";
3841

42+
for my $size (1 .. 8) {
43+
3944
my @fields = qw(c_text c_tinytext c_mediumtext c_longtext b_blob b_tinyblob b_mediumblob b_longblob);
4045
my $numfields = scalar @fields;
4146
my $fieldlist = join(', ', @fields);
47+
my $select_fields = join ', ', @fields[0 .. $size - 1];
4248

4349
ok (my $sth= $dbh->prepare("INSERT INTO dbd_mysql_t50chopblanks (id, $fieldlist) VALUES (".('?, ' x $numfields)."?)"));
50+
note('insert prepared');
4451

45-
ok (my $sth2= $dbh->prepare("SELECT $fieldlist FROM dbd_mysql_t50chopblanks WHERE id = ?"));
52+
my $sth2;
53+
eval {
54+
$sth2 = $dbh->prepare("SELECT $select_fields FROM dbd_mysql_t50chopblanks WHERE id = ?");
55+
1 } or die $dbh->errstr;
56+
note('select prepared');
4657

4758
my $rows;
4859

@@ -51,7 +62,7 @@ $rows = [ [1, ''], [2, ' '], [3, ' a b c '], [4, 'blah'] ];
5162
for my $ref (@$rows) {
5263
my ($id, $value) = @$ref;
5364
ok $sth->execute($id, ($value) x $numfields), "insert into dbd_mysql_t50chopblanks values ($id ".(", '$value'" x $numfields).")";
54-
ok $sth2->execute($id), "select $fieldlist from dbd_mysql_t50chopblanks where id = $id";
65+
ok $sth2->execute($id), "select $select_fields from dbd_mysql_t50chopblanks where id = $id";
5566

5667
# First try to retrieve without chopping blanks.
5768
$sth2->{'ChopBlanks'} = 0;
@@ -74,7 +85,7 @@ for my $ref (@$rows) {
7485
$choppedvalue =~ s/\s+$// if $character_field; # only chop character, not binary
7586
cmp_ok $ret_ref->[$i], 'eq', $choppedvalue, "ChopBlanks: $fields[$i] should ".($character_field ? "" : "not ")."have blanks chopped";
7687
}
77-
88+
}
7889
}
7990
ok $dbh->do("DROP TABLE dbd_mysql_t50chopblanks"), "drop dbd_mysql_t50chopblanks";
8091
ok $dbh->disconnect;

0 commit comments

Comments
 (0)