Bug#930036: libmariadbclient18: DBD::mysql::db do failed: Malformed packet

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug#930036: libmariadbclient18: DBD::mysql::db do failed: Malformed packet

Valeriy Filatov
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

Reply | Threaded
Open this post in threaded view
|

Bug#930036: Acknowledgement (libmariadbclient18: DBD::mysql::db do failed: Malformed packet)

Valeriy Filatov
as a workaround you can explicitly specify "mysql_local_infile=1" option in DSN 
my $dbh = DBI->connect(
    "dbi:mysql:mysql_local_infile=1:test:db-host",
    "user", "password",
    { RaiseError => 1, PrintError => 0 }
);

On Wed, Jun 5, 2019 at 1:51 PM Debian Bug Tracking System <[hidden email]> wrote:
Thank you for filing a new Bug report with Debian.

You can follow progress on this Bug here: 930036: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930036.

This is an automatically generated reply to let you know your message
has been received.

Your message is being forwarded to the package maintainers and other
interested parties for their attention; they will reply in due course.

Your message has been sent to the package maintainer(s):
 Debian MySQL Maintainers <[hidden email]>

If you wish to submit further information on this problem, please
send it to [hidden email].

Please do not send mail to [hidden email] unless you wish
to report a problem with the Bug-tracking system.

--
930036: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930036
Debian Bug Tracking System
Contact [hidden email] with problems