Your message dated Mon, 28 Sep 2020 20:21:43 +0300
with message-id 
<cahj_tlczpwt0kdyktv-pfmknu-+uay78yi9fejcvlmhss6v...@mail.gmail.com>
and subject line Re: Bug#930035: libmariadbclient18: DBD::mysql::db do failed: 
Malformed packet
has caused the Debian Bug report #930035,
regarding libmariadbclient18: DBD::mysql::db do failed: Malformed packet
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
930035: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930035
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: libmariadbclient18
Version: 10.1.38-0+deb9u1
Severity: normal

Dear Maintainer,

we started receive errors on "LOAD DATA LOCAL INFILE" queries from
DBD::mysql when we upgraded libmariadbclient18 from 10.1.37 to 10.1.38

$ ./test.pl
DBD::mysql::db do failed: Malformed packet at ./test.pl line 27.

here is the script to reproduce the bug
$ cat test.pl
-----------------------------
#!/usr/bin/env perl
# vim: ts=8 sw=4 sts=4 et
#

use strict;
use DBI;

my $dbh = DBI->connect(
    "dbi:mysql:test:db-host",
    "user", "password",
    { RaiseError => 1, PrintError => 0 }
);

my $file = '/tmp/file.test';
open my $out, '>', $file;
print $out "1|2\n";
close $out;

$dbh->do('DROP TABLE IF EXISTS table_name');
$dbh->do(<<SQL);
    CREATE TABLE `table_name` (
        `a` int(2),
        `b` int(2)
    ) ENGINE=InnoDB CHARSET=latin1
SQL

$dbh->do(<<SQL);
    LOAD DATA LOCAL INFILE '$file'
    INTO TABLE test.table_name
    FIELDS TERMINATED BY '|' (a, b)
SQL
-----------------------------
if we downgrade back to 10.1.37 it works as expected.

$ sudo apt install libmariadbclient18:amd64=10.1.37-0+deb9u1
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be DOWNGRADED:
  libmariadbclient18
0 upgraded, 0 newly installed, 1 downgraded, 0 to remove and 0 not upgraded.
Need to get 783 kB of archives.
After this operation, 7,168 B disk space will be freed.
Do you want to continue? [Y/n]
Get:1 http://security.debian.org stretch/updates/main amd64
libmariadbclient18 amd64 10.1.37-0+deb9u1 [783 kB]
Fetched 783 kB in 0s (1,110 kB/s)
dpkg: warning: downgrading libmariadbclient18:amd64 from 10.1.38-0+deb9u1
to 10.1.37-0+deb9u1
(Reading database ... 68269 files and directories currently installed.)
Preparing to unpack .../libmariadbclient18_10.1.37-0+deb9u1_amd64.deb ...
Unpacking libmariadbclient18:amd64 (10.1.37-0+deb9u1) over
(10.1.38-0+deb9u1) ...
Setting up libmariadbclient18:amd64 (10.1.37-0+deb9u1) ...
Processing triggers for libc-bin (2.24-11+deb9u4) ...
$ ./test.pl
$

-- System Information:
Debian Release: 9.9
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.9.0-8-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8),
LANGUAGE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages libmariadbclient18 depends on:
ii  libc6         2.24-11+deb9u4
ii  libstdc++6    6.3.0-18+deb9u1
ii  mysql-common  5.8+1.0.2
ii  zlib1g        1:1.2.8.dfsg-5

libmariadbclient18 recommends no packages.

libmariadbclient18 suggests no packages.

-- no debconf information

--- End Message ---
--- Begin Message ---
Version: 1:10.5.5-1

There is probably nothing we can do for 10.1.38-0+deb9u1 anymore at
this stage, but for the latest MariaDB in Debian unstable I checked
that all is OK.

If you want to help us avoid similar situations in the future, maybe
you could contribute to the debian/salsa-ci.yml or the debian/tests
autopkgtests to run this little perl script on each commit/upload to
spot regressions in Perl connections?


root@9774f6abbedb:/build# cat test.pl
#!/usr/bin/env perl
# vim: ts=8 sw=4 sts=4 et
#

use strict;
use DBI;

my $dbh = DBI->connect(
    "dbi:MariaDB:test:localhost",
    "user", "password",
    { RaiseError => 1, PrintError => 0 }
);

my $file = '/tmp/file.test';
open my $out, '>', $file;
print $out "1|2\n";
close $out;

$dbh->do('DROP TABLE IF EXISTS table_name');
$dbh->do(<<SQL);
    CREATE TABLE `table_name` (
        `a` int(2),
        `b` int(2)
    ) ENGINE=InnoDB CHARSET=latin1
SQL

$dbh->do(<<SQL);
    LOAD DATA LOCAL INFILE '$file'
    INTO TABLE test.table_name
    FIELDS TERMINATED BY '|' (a, b)
SQL

root@9774f6abbedb:/build# ./test.pl
DBI connect('test:localhost','user',...) failed: Access denied for
user 'user'@'localhost' at ./test.pl line 8.

--- End Message ---

Reply via email to