This queue is for tickets about the DBI CPAN distribution.

Report information
The Basics
Id:
133872
Status:
new
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
mhadji [...] gmail.com
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
(no value)
Fixed in:
(no value)



MIME-Version: 1.0
X-Spam-Status: No, score=-1.432 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665] autolearn=no autolearn_force=no
X-Cpan.org: This message routed through the cpan.org mail forwarding service. Please use PAUSE pause.perl.org to configure your delivery settings.
X-Spam-Flag: NO
Content-Type: multipart/alternative; boundary="000000000000ea3dff05b5bbd97a"
Message-ID: <CAFod62Bcspnqt3X-strui+vXSHB2Jxd_DOKK5nLGnzQvXogR5Q@mail.gmail.com>
X-Received: by 2002:a05:651c:1b7:: with SMTP id c23mr6071492ljn.112.1607193303071; Sat, 05 Dec 2020 10:35:03 -0800 (PST)
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Spam-Score: -1.432
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id E7F1B240261 for <cpan-bug+DBI@hipster.bestpractical.com>; Sat, 5 Dec 2020 13:35:13 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id n5obeRMJBDFo for <cpan-bug+DBI@hipster.bestpractical.com>; Sat, 5 Dec 2020 13:35:11 -0500 (EST)
Received: from xx1.develooper.com (xx1.develooper.com [147.75.38.233]) by hipster.bestpractical.com (Postfix) with ESMTPS id 7A5C52400B0 for <bug-DBI@rt.cpan.org>; Sat, 5 Dec 2020 13:35:11 -0500 (EST)
Received: from localhost (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with ESMTP id 0F2037C10F for <bug-DBI@rt.cpan.org>; Sat, 5 Dec 2020 10:35:11 -0800 (PST)
Received: from xx1.develooper.com (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with SMTP id 6D01E7C192 for <bug-DBI@rt.cpan.org>; Sat, 5 Dec 2020 10:35:07 -0800 (PST)
Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by xx1.develooper.com (Postfix) with ESMTPS id 18CE07C10F for <bug-DBI@rt.cpan.org>; Sat, 5 Dec 2020 10:35:05 -0800 (PST)
Received: by mail-lj1-f182.google.com with SMTP id s11so1728014ljp.4 for <bug-DBI@rt.cpan.org>; Sat, 05 Dec 2020 10:35:05 -0800 (PST)
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i=@gmail.com
X-Google-SMTP-Source: ABdhPJyUbobqgtsd5VjsQTvZz1rebj41WD69XQad3q49T8PG17Y5K/bEYJoIRoSacyI4UbT7KZzdr98yOqDGdzv/FkI=
Delivered-To: cpan-bug+DBI@hipster.bestpractical.com
Subject: Unknown MySQL error after apt-get upgrade
Return-Path: <mhadji@gmail.com>
X-RT-Mail-Extension: dbi
X-Original-To: cpan-bug+DBI@hipster.bestpractical.com
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=Ieu0Juo17hIWRX0h0F/Zj9TYeLBpVmlZcxXE/TFItkI=; b=hq3xoa5rP8RF92xuboKCR0UqLeLijLkXmNZGLzVZktlq8Z4uBRaJYeYshnyI/G/35F FxrdgbuxS95NjaAPWcIDDig2UxrPsNlcO62T8ojitTbNQVTIsa6DApn7OYcMPEdMhBpn o0icjVGTQNyz9K4ZZEaElh+SLRBX4mxL4B2vwn9lf3nL31ZpxxdHdnQ3t5j0ieQi7jir GG6C/pfJBj9FI1XRKrencGJQbKJ3oHMHrHeDZmqutL1sdWJ0R2caD1DDS6N0M8kpFfwb 7kFpySXbK2FmycCCMJzuGajIYgM7HkWE4L5h2oT0/7BdTMzXikFAP9xIfv9zRVryuRvm DAJg==
X-Google-Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Ieu0Juo17hIWRX0h0F/Zj9TYeLBpVmlZcxXE/TFItkI=; b=GLl+MpEsoYW4xH1Ik2p9KEW9xxqSOC9uI0nlbYFJPW81DZeOvK/XLxxUJlEwZz3zAY r9lSHU/XOsl72/caicQmXW0qJiOWj6Vn2pRoNHKV1R6/j9jNFr+bvVuBzxNkhwTDtHZe pkKdEZpbxYtPMwod4J2wcjfN2MuXNDfLK50P+mDtiS45kxkH217eCQ6EzMU3lnnyr9PI Gu6OFliI85wDb4o6591PzwqqQp0tdq3DNeNO2wgEkXh697Jt+7rqqTdm0uMpIMh7TL+v xcd0THDjEGh7f3/pJMuH+2RQJY/GsK9QklrNcjPKu2kGh6i24g92HuyyK58r7ul3W7u8 FwRg==
X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' BODYTEXTH_SIZE_10000_LESS 0, BODYTEXTH_SIZE_3000_MORE 0, BODY_SIZE_10000_PLUS 0, DATE_TZ_NA 0, DKIM_ALIGNS 0, DKIM_SIGNATURE 0, HREF_LABEL_TEXT_NO_URI 0, HREF_LABEL_TEXT_ONLY 0, HTML_BAD_EXTRAS 0, KNOWN_MTA_TFX 0, NO_URI_HTTPS 0, SENDER_NO_AUTH 0, SPF_PASS 0, SXL_IP_TFX_WM 0, TEXT_DIRECTION 0, TEXT_DIR_LTR_ONLY 0, WEBMAIL_SOURCE 0, __ANY_URI 0, __BANNER_TRUSTED_SENDER 0, __BODY_TEXT_X4 0, __CT 0, __CTYPE_HAS_BOUNDARY 0, __CTYPE_MULTIPART 0, __CTYPE_MULTIPART_ALT 0, __DKIM_ALIGNS_1 0, __DKIM_ALIGNS_2 0, __DQ_NEG_HEUR 0, __DQ_NEG_IP 0, __FRAUD_MONEY 0, __FRAUD_MONEY_CURRENCY 0, __FRAUD_MONEY_CURRENCY_DOLLAR 0, __FRAUD_MONEY_DENOMINATION 0, __FRAUD_MONEY_VALUE 0, __FRAUD_WEBMAIL 0, __FRAUD_WEBMAIL_FROM 0, __FROM_DOMAIN_NOT_IN_BODY 0, __FROM_GMAIL 0, __FROM_NAME_NOT_IN_ADDR 0, __FROM_NAME_NOT_IN_BODY 0, __FUR_RDNS_GMAIL 0, __HAS_FROM 0, __HAS_HTML 0, __HAS_MSGID 0, __HELO_GMAIL 0, __HEX28_LC_BOUNDARY 0, __HIGHBITS 0, __HREF_LABEL_TEXT 0, __HTML_AHREF_TAG 0, __HTML_ATTR_DIR 0, __HTML_BAD_END 0, __HTML_BAD_START 0, __HTML_DIR_LTR 0, __HTML_HREF_TAG_X2 0, __HTML_TAG_DIV 0, __MIME_HTML 0, __MIME_TEXT_H 0, __MIME_TEXT_H1 0, __MIME_TEXT_H2 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MIME_TEXT_P2 0, __MIME_VERSION 0, __MULTIPLE_URI_HTML 0, __MULTIPLE_URI_TEXT 0, __PHISH_SPEAR_SUBJ_ALERT 0, __PHISH_SPEAR_SUBJ_PREDICATE 0, __RDNS_WEBMAIL 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TEXT_DIR_LTR 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_IN_BODY 0, __URI_MAILTO 0, __URI_MULTIPLE_SUBDOMAINS 0, __URI_NOT_IMG 0, __URI_NO_PATH 0, __URI_NO_WWW 0, __URI_NS , __URI_NS_NXDOMAIN , __URI_WITHOUT_PATH 0, __X_GOOGLE_DKIM_SIGNATURE 0, __YOUTUBE_RCVD 0, __zen.spamhaus.org_ERROR '
Date: Sat, 5 Dec 2020 13:34:46 -0500
X-Spam-Level:
X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2020.12.5.182718
To: bug-DBI@rt.cpan.org
From: Marios Hadjieleftheriou <mhadji@gmail.com>
X-GM-Message-State: AOAM5310cQDrLgpTHcFVhRcQziHIXkAg3jxuPmcc5ghDrZrEYxa+zn1J IuUpY0Uupxa0GFB4K6Rzw98+4UJawhPPCCMtw5BB3qDyvq3hzA==
X-RT-Interface: Email
Content-Length: 0
content-type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
Content-Length: 6705
content-type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: utf-8
Content-Length: 7866
Hello!

I am getting this error:
./query_db3.pl
    SELECT tape
    FROM indices.consolidated_tickers
    WHERE date <= 20180910 AND ticker = 'RCUS' and tape IS NOT NULL ORDER BY date DESC LIMIT 1
DBD::mysql::st execute failed: Unknown MySQL error at ./query_db3.pl line 18.
Could not execute statement: Unknown MySQL error

----
From this script:
#!/usr/bin/perl

use DBI;

$date=20180910;
$ticker = 'RCUS';
$indices_dbh = DBI->connect("DBI:mysql:database=indices;host=devdb1", "...", "...");

$query = "
    SELECT tape
    FROM indices.consolidated_tickers
    WHERE date <= $date AND ticker = '$ticker' and tape IS NOT NULL ORDER BY date DESC LIMIT 1
";
print STDERR $query;

$sth = $indices_dbh->prepare($query) or die("Could not prepare statement: " . $indices_dbh->errstr . "\n");
$sth->execute() or die("Could not execute statement: " . $indices_dbh->errstr . "\n");
----

The error manifests every time I run the script on this host:
> uname -a
Linux lccw10.lioncavecapital.com 4.19.0-10-amd64 #1 SMP Debian 4.19.132-1 (2020-07-24) x86_64 GNU/Linux
> perl -v
This is perl 5, version 28, subversion 1 (v5.28.1) built for x86_64-linux-gnu-thread-multi
(with 65 registered patches, see perl -V for more detail)
> cpan -D DBI  
Loading internal logger. Log::Log4perl recommended for better logging
Reading '/home/marioh/.cpan/Metadata'
  Database was generated on Sat, 05 Dec 2020 16:56:02 GMT
DBI
-------------------------------------------------------------------------
    (no description)
    T/TI/TIMB/DBI-1.643.tar.gz
    /usr/lib/x86_64-linux-gnu/perl5/5.28/DBI.pm
    Installed: 1.642
    CPAN:      1.643  Not up to date
    Tim Bunce (TIMB)
    Tim.Bunce@pobox.com

> apt list --installed | grep perl
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libapt-pkg-perl/stable,now 0.1.34+b1 amd64 [installed,automatic]
libarchive-zip-perl/stable,now 1.64-1 all [installed,automatic]
libclass-data-inheritable-perl/stable,now 0.08-3 all [installed,automatic]
libconfig-inifiles-perl/stable,now 3.000001-1 all [installed,automatic]
libdbd-mysql-perl/stable,now 4.050-2 amd64 [installed]
libdbi-perl/stable,now 1.642-1+b1 amd64 [installed,automatic]
libdevel-stacktrace-perl/stable,now 2.0300-1 all [installed,automatic]
libdpkg-perl/stable,now 1.19.7 all [installed,automatic]
liberror-perl/stable,now 0.17027-2 all [installed,automatic]
libexception-class-perl/stable,now 1.44-1 all [installed,automatic]
libfile-lchown-perl/stable,now 0.02-2+b5 amd64 [installed,automatic]
libfile-readbackwards-perl/stable,now 1.05-2 all [installed,automatic]
libfile-stripnondeterminism-perl/stable,now 1.1.2-1 all [installed,automatic]
libio-pty-perl/stable,now 1:1.08-1.1+b5 amd64 [installed,automatic]
libipc-run-perl/stable,now 20180523.0-1 all [installed,automatic]
liblocale-gettext-perl/stable,now 1.07-3+b4 amd64 [installed]
libperl5.28/stable,now 5.28.1-6+deb10u1 amd64 [installed,automatic]
libsvn-perl/stable,stable,now 1.10.4-1+deb10u1 amd64 [installed,automatic]
libterm-readkey-perl/stable,now 2.38-1 amd64 [installed,automatic]
libtext-charwidth-perl/stable,now 0.04-7.1+b1 amd64 [installed]
libtext-iconv-perl/stable,now 1.7-5+b7 amd64 [installed]
libtext-wrapi18n-perl/stable,now 0.06-7.1 all [installed]
libtry-tiny-perl/stable,now 0.30-1 all [installed,automatic]
libx11-protocol-other-perl/stable,now 30-1 all [installed,automatic]
libx11-protocol-perl/stable,now 0.56-7 all [installed,automatic]
libyaml-perl/stable,now 1.27-1 all [installed,automatic]
perl-base/stable,now 5.28.1-6+deb10u1 amd64 [installed]
perl-modules-5.28/stable,now 5.28.1-6+deb10u1 all [installed,automatic]
perl-tk/stable,now 1:804.033-2+b3 amd64 [installed,automatic]
perl/stable,now 5.28.1-6+deb10u1 amd64 [installed,automatic]
---

The script works fine on an identical host (before apt-get upgrade):
> uname -a
Linux lccw9.lioncavecapital.com 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2 (2019-08-28) x86_64 GNU/Linux
> perl -v      

This is perl 5, version 28, subversion 1 (v5.28.1) built for x86_64-linux-gnu-thread-multi
(with 61 registered patches, see perl -V for more detail)
> cpan -D DBI
Loading internal logger. Log::Log4perl recommended for better logging
Reading '/home/marioh/.cpan/Metadata'
  Database was generated on Sat, 05 Dec 2020 16:56:02 GMT
DBI
-------------------------------------------------------------------------
    (no description)
    T/TI/TIMB/DBI-1.643.tar.gz
    /usr/lib/x86_64-linux-gnu/perl5/5.28/DBI.pm
    Installed: 1.642
    CPAN:      1.643  Not up to date
    Tim Bunce (TIMB)
    Tim.Bunce@pobox.com

> apt apt list --installed | grep perl
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libapt-pkg-perl/stable,now 0.1.34+b1 amd64 [installed,automatic]
libarchive-zip-perl/stable,now 1.64-1 all [installed,automatic]
libclass-data-inheritable-perl/stable,now 0.08-3 all [installed,automatic]
libconfig-inifiles-perl/stable,now 3.000001-1 all [installed,automatic]
libdbd-mysql-perl/stable,now 4.050-2 amd64 [installed]
libdbi-perl/stable,now 1.642-1+b1 amd64 [installed,automatic]
libdevel-stacktrace-perl/stable,now 2.0300-1 all [installed,automatic]
libdpkg-perl/stable,now 1.19.7 all [installed,automatic]
liberror-perl/stable,now 0.17027-2 all [installed,automatic]
libexception-class-perl/stable,now 1.44-1 all [installed,automatic]
libfile-lchown-perl/stable,now 0.02-2+b5 amd64 [installed,automatic]
libfile-readbackwards-perl/stable,now 1.05-2 all [installed,automatic]
libfile-stripnondeterminism-perl/stable,now 1.1.2-1 all [installed,automatic]
liblocale-gettext-perl/stable,now 1.07-3+b4 amd64 [installed]
libperl5.28/stable,now 5.28.1-6 amd64 [installed,automatic]
libsvn-perl/stable,stable,now 1.10.4-1+deb10u1 amd64 [installed,automatic]
libterm-readkey-perl/stable,now 2.38-1 amd64 [installed,automatic]
libtext-charwidth-perl/stable,now 0.04-7.1+b1 amd64 [installed]
libtext-iconv-perl/stable,now 1.7-5+b7 amd64 [installed]
libtext-wrapi18n-perl/stable,now 0.06-7.1 all [installed]
libtry-tiny-perl/stable,now 0.30-1 all [installed,automatic]
libx11-protocol-other-perl/stable,now 30-1 all [installed,automatic]
libx11-protocol-perl/stable,now 0.56-7 all [installed,automatic]
libyaml-perl/stable,now 1.27-1 all [installed,automatic]
perl-base/stable,now 5.28.1-6 amd64 [installed]
perl-modules-5.28/stable,now 5.28.1-6 all [installed,automatic]
perl-tk/stable,now 1:804.033-2+b3 amd64 [installed,automatic]
perl/stable,now 5.28.1-6 amd64 [installed,automatic]

---

So, the two hosts have the same perl and DBI, but one has a newer version of the libraries (after an apt-get upgrade).

Notice that if I remove all newlines from the query strings, the error goes away :)

Thank you for your help!
MIME-Version: 1.0
In-Reply-To: <CAFod62Bcspnqt3X-strui+vXSHB2Jxd_DOKK5nLGnzQvXogR5Q@mail.gmail.com>
X-Spam-Status: No, score=-1.432 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665] autolearn=no autolearn_force=no
X-Cpan.org: This message routed through the cpan.org mail forwarding service. Please use PAUSE pause.perl.org to configure your delivery settings.
X-Spam-Flag: NO
Content-Language: en-US
References: <CAFod62Bcspnqt3X-strui+vXSHB2Jxd_DOKK5nLGnzQvXogR5Q@mail.gmail.com>
Content-Type: multipart/alternative; boundary="------------68E5C26E45C96981AF56229A"
Message-ID: <7970f87b-0670-5eaf-9d21-f65cffe23beb@gmail.com>
X-Received: by 2002:a0c:c405:: with SMTP id r5mr268990qvi.4.1607469877806; Tue, 08 Dec 2020 15:24:37 -0800 (PST)
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Spam-Score: -1.432
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 209C2240242 for <cpan-bug+DBI@hipster.bestpractical.com>; Tue, 8 Dec 2020 18:24:47 -0500 (EST)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VZHZKMYPh7m1 for <cpan-bug+DBI@hipster.bestpractical.com>; Tue, 8 Dec 2020 18:24:44 -0500 (EST)
Received: from xx1.develooper.com (xx1.develooper.com [147.75.38.233]) by hipster.bestpractical.com (Postfix) with ESMTPS id CABB724011C for <bug-DBI@rt.cpan.org>; Tue, 8 Dec 2020 18:24:44 -0500 (EST)
Received: from localhost (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with ESMTP id 540CF7C192 for <bug-DBI@rt.cpan.org>; Tue, 8 Dec 2020 15:24:44 -0800 (PST)
Received: from xx1.develooper.com (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with SMTP id 8BC1B7C19A for <bug-DBI@rt.cpan.org>; Tue, 8 Dec 2020 15:24:40 -0800 (PST)
Received: from mail-qv1-f52.google.com (mail-qv1-f52.google.com [209.85.219.52]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by xx1.develooper.com (Postfix) with ESMTPS id F35857C192 for <bug-DBI@rt.cpan.org>; Tue, 8 Dec 2020 15:24:38 -0800 (PST)
Received: by mail-qv1-f52.google.com with SMTP id dm12so98158qvb.3 for <bug-DBI@rt.cpan.org>; Tue, 08 Dec 2020 15:24:38 -0800 (PST)
Received: from [192.168.1.224] (pool-71-172-246-54.nwrknj.fios.verizon.net. [71.172.246.54]) by smtp.gmail.com with ESMTPSA id a28sm207344qtm.80.2020.12.08.15.24.36 for <bug-DBI@rt.cpan.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Dec 2020 15:24:36 -0800 (PST)
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i=@gmail.com
X-Google-SMTP-Source: ABdhPJwvulV8+HlFiyYisQ/nYEfqJ2FoNdWCtjboNbi0FTpfF/HeJODx8z5iWg8TyLuLgaJ6zuZ9cA==
Delivered-To: cpan-bug+DBI@hipster.bestpractical.com
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.5.1
Subject: Re: Unknown MySQL error after apt-get upgrade
Return-Path: <mhadji@gmail.com>
X-RT-Mail-Extension: dbi
X-Original-To: cpan-bug+DBI@hipster.bestpractical.com
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-language; bh=qVfs8qleiIh1ICQm7TFFRfsg9wx4eBkMkDOxbdtuskA=; b=sunq8TTownWFWRm6f07FdxN74hiNz0F/QfedLkzSKZg2KxSOyo9OROJ+H6OULC3RFg KvfAZwWqPUL7eEEa1vKDEUGvTt0NtAuSHUfnw5/0wSNXccsK9UXsg7IJNML68EW8llFR Yh7MYT8c8Db+zLhqXVBiyMGnaz9E8ye/mlpAqoHAZ/WT3tKjIPe1uvYxqpEv9nnMSKfp On31wMFPUpSUXQkJbMSKMWJ2IWjecAHi8QDyUImivuZAR1+5u56g+Di92yWnrvApZyX8 goK8kA5YsQ70oQaSyHrYxK/c9Dq/0Uo/hRuA0Yj5xDb6g9UZ4UwztE8ifqwW15NcSMGS LJhg==
X-Google-Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-language; bh=qVfs8qleiIh1ICQm7TFFRfsg9wx4eBkMkDOxbdtuskA=; b=Z7zfpT30PHoeyeeqv7Nk/xIBiURvKQowgxoPa3aaB2kVn4Q3+DVPu2bIBs0eG4ChAy FAVSxDLXNC5vfIrCglMMi+APjeOxmNWuG5wj3NrQYuwu8qXx0r4FTcZdzwjT1rXmOtrf quu7/aP2jPR1LT6xR7DUrA8Vzh3yZNav39OQZRSP6eSqtlWVil06I+UGvT2DFfFcUqz0 yLjYnYn+9Vy4j49ub4Rvb0/9OFkOes27NSQ7LcHI50NWO1IvbWeQueCnwk+q61YHtwOY FUXs4cygY9gWS2txgEJ8wKA6G3SLOImfdsRMfNyHpGlasPQrG89IFxX+iWbwrLmPdhSq yVaA==
X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' BODYTEXTH_SIZE_3000_MORE 0, BODY_SIZE_10000_PLUS 0, DATE_TZ_NA 0, DKIM_ALIGNS 0, DKIM_SIGNATURE 0, HREF_LABEL_TEXT_NO_URI 0, HREF_LABEL_TEXT_ONLY 0, IN_REP_TO 0, KNOWN_MTA_TFX 0, LEGITIMATE_SIGNS 0, MSG_THREAD 0, NO_URI_HTTPS 0, REFERENCES 0, SENDER_NO_AUTH 0, SPF_PASS 0, SXL_IP_TFX_WM 0, TEXT_DIRECTION 0, TEXT_DIR_LTR_ONLY 0, WEBMAIL_SOURCE 0, __ANY_URI 0, __BANNER_TRUSTED_SENDER 0, __BAT_BOUNDARY 0, __BODY_TEXT_X4 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CP_URI_IN_BODY 0, __CT 0, __CTYPE_HAS_BOUNDARY 0, __CTYPE_MULTIPART 0, __CTYPE_MULTIPART_ALT 0, __DKIM_ALIGNS_1 0, __DKIM_ALIGNS_2 0, __DQ_NEG_HEUR 0, __DQ_NEG_IP 0, __FORWARDED_MSG 0, __FRAUD_MONEY 0, __FRAUD_MONEY_CURRENCY 0, __FRAUD_MONEY_CURRENCY_DOLLAR 0, __FRAUD_MONEY_DENOMINATION 0, __FRAUD_MONEY_VALUE 0, __FRAUD_WEBMAIL 0, __FRAUD_WEBMAIL_FROM 0, __FROM_GMAIL 0, __FROM_NAME_NOT_IN_ADDR 0, __FUR_RDNS_GMAIL 0, __HAS_FROM 0, __HAS_HTML 0, __HAS_MSGID 0, __HAS_REFERENCES 0, __HELO_GMAIL 0, __HIGHBITS 0, __HREF_LABEL_TEXT 0, __HTML_AHREF_TAG 0, __HTML_ATTR_DIR 0, __HTML_DIR_LTR 0, __HTML_HREF_TAG_X2 0, __HTML_TAG_DIV 0, __IN_REP_TO 0, __MAIL_CHAIN 0, __MIME_HTML 0, __MIME_TEXT_H 0, __MIME_TEXT_H1 0, __MIME_TEXT_H2 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MIME_TEXT_P2 0, __MIME_VERSION 0, __MOZILLA_USER_AGENT 0, __MULTIPLE_URI_HTML 0, __MULTIPLE_URI_TEXT 0, __PHISH_SPEAR_SUBJ_ALERT 0, __PHISH_SPEAR_SUBJ_PREDICATE 0, __RDNS_WEBMAIL 0, __REFERENCES 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __SUBJ_ALPHA_NEGATE 0, __SUBJ_REPLY 0, __TAG_EXISTS_HTML 0, __TEXT_DIR_LTR 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_IN_BODY 0, __URI_MAILTO 0, __URI_MULTIPLE_SUBDOMAINS 0, __URI_NOT_IMG 0, __URI_NO_PATH 0, __URI_NO_WWW 0, __URI_NS , __URI_NS_NXDOMAIN , __URI_WITHOUT_PATH 0, __USER_AGENT 0, __X_GOOGLE_DKIM_SIGNATURE 0, __YOUTUBE_RCVD 0, __blackholes.mail-abuse.org_ERROR , __zen.spamhaus.org_ERROR '
Date: Tue, 8 Dec 2020 18:24:36 -0500
X-Spam-Level:
X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2020.12.8.231517
To: bug-DBI@rt.cpan.org
From: Marios Hadjieleftheriou <mhadji@gmail.com>
X-GM-Message-State: AOAM531eYVCLNe4zXwNVu48rPTfofWW6d//uYLxOy7k5bzRsYNOh7hBV 61hxJPz4Wq09rT13gca8CDtCdv+uDKk=
X-RT-Interface: Email
Content-Length: 0
content-type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 8bit
X-RT-Original-Encoding: utf-8
Content-Length: 7817
content-type: text/html; charset="utf-8"
Content-Transfer-Encoding: 8bit
X-RT-Original-Encoding: utf-8
Content-Length: 10491
Hi.

I managed to isolate the issue to -Dusethreads. If I compile perl-5.32 with -Dusethreads (apparently the default in Debian), then I get bizarre errors like the one below. If I get rid of -Dusethreads then everything works fine. It issue is also isolated to InnoDB only. If I query tokuDB tables, everything works fine no matter what Debian or perl installation I use.

To summarize, the problem manifests on Debian 4.19.132-1, when compiling perl with -Dusethreads, for InnoDB tables only.

On 12/5/2020 1:34 PM, Marios Hadjieleftheriou wrote:
Show quoted text
Hello!

I am getting this error:
./query_db3.pl
    SELECT tape
    FROM indices.consolidated_tickers
    WHERE date <= 20180910 AND ticker = 'RCUS' and tape IS NOT NULL ORDER BY date DESC LIMIT 1
DBD::mysql::st execute failed: Unknown MySQL error at ./query_db3.pl line 18.
Could not execute statement: Unknown MySQL error

----
From this script:
#!/usr/bin/perl

use DBI;

$date=20180910;
$ticker = 'RCUS';
$indices_dbh = DBI->connect("DBI:mysql:database=indices;host=devdb1", "...", "...");

$query = "
    SELECT tape
    FROM indices.consolidated_tickers
    WHERE date <= $date AND ticker = '$ticker' and tape IS NOT NULL ORDER BY date DESC LIMIT 1
";
print STDERR $query;

$sth = $indices_dbh->prepare($query) or die("Could not prepare statement: " . $indices_dbh->errstr . "\n");
$sth->execute() or die("Could not execute statement: " . $indices_dbh->errstr . "\n");
----

The error manifests every time I run the script on this host:
> uname -a
Linux lccw10.lioncavecapital.com 4.19.0-10-amd64 #1 SMP Debian 4.19.132-1 (2020-07-24) x86_64 GNU/Linux
> perl -v
This is perl 5, version 28, subversion 1 (v5.28.1) built for x86_64-linux-gnu-thread-multi
(with 65 registered patches, see perl -V for more detail)
> cpan -D DBI  
Loading internal logger. Log::Log4perl recommended for better logging
Reading '/home/marioh/.cpan/Metadata'
  Database was generated on Sat, 05 Dec 2020 16:56:02 GMT
DBI
-------------------------------------------------------------------------
    (no description)
    T/TI/TIMB/DBI-1.643.tar.gz
    /usr/lib/x86_64-linux-gnu/perl5/5.28/DBI.pm
    Installed: 1.642
    CPAN:      1.643  Not up to date
    Tim Bunce (TIMB)
    Tim.Bunce@pobox.com

> apt list --installed | grep perl
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libapt-pkg-perl/stable,now 0.1.34+b1 amd64 [installed,automatic]
libarchive-zip-perl/stable,now 1.64-1 all [installed,automatic]
libclass-data-inheritable-perl/stable,now 0.08-3 all [installed,automatic]
libconfig-inifiles-perl/stable,now 3.000001-1 all [installed,automatic]
libdbd-mysql-perl/stable,now 4.050-2 amd64 [installed]
libdbi-perl/stable,now 1.642-1+b1 amd64 [installed,automatic]
libdevel-stacktrace-perl/stable,now 2.0300-1 all [installed,automatic]
libdpkg-perl/stable,now 1.19.7 all [installed,automatic]
liberror-perl/stable,now 0.17027-2 all [installed,automatic]
libexception-class-perl/stable,now 1.44-1 all [installed,automatic]
libfile-lchown-perl/stable,now 0.02-2+b5 amd64 [installed,automatic]
libfile-readbackwards-perl/stable,now 1.05-2 all [installed,automatic]
libfile-stripnondeterminism-perl/stable,now 1.1.2-1 all [installed,automatic]
libio-pty-perl/stable,now 1:1.08-1.1+b5 amd64 [installed,automatic]
libipc-run-perl/stable,now 20180523.0-1 all [installed,automatic]
liblocale-gettext-perl/stable,now 1.07-3+b4 amd64 [installed]
libperl5.28/stable,now 5.28.1-6+deb10u1 amd64 [installed,automatic]
libsvn-perl/stable,stable,now 1.10.4-1+deb10u1 amd64 [installed,automatic]
libterm-readkey-perl/stable,now 2.38-1 amd64 [installed,automatic]
libtext-charwidth-perl/stable,now 0.04-7.1+b1 amd64 [installed]
libtext-iconv-perl/stable,now 1.7-5+b7 amd64 [installed]
libtext-wrapi18n-perl/stable,now 0.06-7.1 all [installed]
libtry-tiny-perl/stable,now 0.30-1 all [installed,automatic]
libx11-protocol-other-perl/stable,now 30-1 all [installed,automatic]
libx11-protocol-perl/stable,now 0.56-7 all [installed,automatic]
libyaml-perl/stable,now 1.27-1 all [installed,automatic]
perl-base/stable,now 5.28.1-6+deb10u1 amd64 [installed]
perl-modules-5.28/stable,now 5.28.1-6+deb10u1 all [installed,automatic]
perl-tk/stable,now 1:804.033-2+b3 amd64 [installed,automatic]
perl/stable,now 5.28.1-6+deb10u1 amd64 [installed,automatic]
---

The script works fine on an identical host (before apt-get upgrade):
> uname -a
Linux lccw9.lioncavecapital.com 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2 (2019-08-28) x86_64 GNU/Linux
> perl -v      

This is perl 5, version 28, subversion 1 (v5.28.1) built for x86_64-linux-gnu-thread-multi
(with 61 registered patches, see perl -V for more detail)
> cpan -D DBI
Loading internal logger. Log::Log4perl recommended for better logging
Reading '/home/marioh/.cpan/Metadata'
  Database was generated on Sat, 05 Dec 2020 16:56:02 GMT
DBI
-------------------------------------------------------------------------
    (no description)
    T/TI/TIMB/DBI-1.643.tar.gz
    /usr/lib/x86_64-linux-gnu/perl5/5.28/DBI.pm
    Installed: 1.642
    CPAN:      1.643  Not up to date
    Tim Bunce (TIMB)
    Tim.Bunce@pobox.com

> apt apt list --installed | grep perl
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

libapt-pkg-perl/stable,now 0.1.34+b1 amd64 [installed,automatic]
libarchive-zip-perl/stable,now 1.64-1 all [installed,automatic]
libclass-data-inheritable-perl/stable,now 0.08-3 all [installed,automatic]
libconfig-inifiles-perl/stable,now 3.000001-1 all [installed,automatic]
libdbd-mysql-perl/stable,now 4.050-2 amd64 [installed]
libdbi-perl/stable,now 1.642-1+b1 amd64 [installed,automatic]
libdevel-stacktrace-perl/stable,now 2.0300-1 all [installed,automatic]
libdpkg-perl/stable,now 1.19.7 all [installed,automatic]
liberror-perl/stable,now 0.17027-2 all [installed,automatic]
libexception-class-perl/stable,now 1.44-1 all [installed,automatic]
libfile-lchown-perl/stable,now 0.02-2+b5 amd64 [installed,automatic]
libfile-readbackwards-perl/stable,now 1.05-2 all [installed,automatic]
libfile-stripnondeterminism-perl/stable,now 1.1.2-1 all [installed,automatic]
liblocale-gettext-perl/stable,now 1.07-3+b4 amd64 [installed]
libperl5.28/stable,now 5.28.1-6 amd64 [installed,automatic]
libsvn-perl/stable,stable,now 1.10.4-1+deb10u1 amd64 [installed,automatic]
libterm-readkey-perl/stable,now 2.38-1 amd64 [installed,automatic]
libtext-charwidth-perl/stable,now 0.04-7.1+b1 amd64 [installed]
libtext-iconv-perl/stable,now 1.7-5+b7 amd64 [installed]
libtext-wrapi18n-perl/stable,now 0.06-7.1 all [installed]
libtry-tiny-perl/stable,now 0.30-1 all [installed,automatic]
libx11-protocol-other-perl/stable,now 30-1 all [installed,automatic]
libx11-protocol-perl/stable,now 0.56-7 all [installed,automatic]
libyaml-perl/stable,now 1.27-1 all [installed,automatic]
perl-base/stable,now 5.28.1-6 amd64 [installed]
perl-modules-5.28/stable,now 5.28.1-6 all [installed,automatic]
perl-tk/stable,now 1:804.033-2+b3 amd64 [installed,automatic]
perl/stable,now 5.28.1-6 amd64 [installed,automatic]

---

So, the two hosts have the same perl and DBI, but one has a newer version of the libraries (after an apt-get upgrade).

Notice that if I remove all newlines from the query strings, the error goes away :)

Thank you for your help!



This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.