Skip Menu |
 

This queue is for tickets about the DBD-ODBC CPAN distribution.

Report information
The Basics
Id: 75693
Status: resolved
Priority: 0/
Queue: DBD-ODBC

People
Owner: Nobody in particular
Requestors: Wayne.Bower [...] lsi.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.35



From Wayne.Bower [...] lsi.com Sun Mar 11 11: 07:15 2012
MIME-Version: 1.0
X-Spam-Status: No, score=-1.235 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, SPF_SOFTFAIL=0.665] autolearn=no
X-Spam-Flag: NO
Acceptlanguage: en-US
X-Virus-Checked: Checked by ClamAV on 16.mx.develooper.com
Content-Language: en-US
Content-Type: multipart/mixed; boundary="_004_70DBE4460F072F47B78C59D72821D37102CA246D8Epalmail02lsic_"
Message-ID: <70DBE4460F072F47B78C59D72821D37102CA246D8E [...] palmail02.lsi.com>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-MS-Tnef-Correlator:
X-Spam-Score: -1.235
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id C4D6D240083 for <cpan-bug+DBD-ODBC [...] hipster.bestpractical.com>; Sun, 11 Mar 2012 11:07:15 -0400 (EDT)
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 xpn0gdjhLNJZ for <cpan-bug+DBD-ODBC [...] hipster.bestpractical.com>; Sun, 11 Mar 2012 11:07:14 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 478C624001E for <bug-DBD-ODBC [...] rt.cpan.org>; Sun, 11 Mar 2012 11:07:14 -0400 (EDT)
Received: (qmail 15133 invoked by uid 103); 11 Mar 2012 15:07:13 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 11 Mar 2012 15:07:13 -0000
Received: from na3sys009aog125.obsmtp.com (HELO na3sys009aog125.obsmtp.com) (74.125.149.153) by 16.mx.develooper.com (qpsmtpd/0.80/v0.80-19-gf52d165) with ESMTP; Sun, 11 Mar 2012 08:07:09 -0700
Received: from paledge01.lsi.com ([192.19.193.42]) (using TLSv1) by na3sys009aob125.postini.com ([74.125.148.12]) with SMTP ID DSNKT1y/msWSYlyCU2y0xRmCvg7IpLQNPtoj [...] postini.com; Sun, 11 Mar 2012 08:07:09 PDT
Received: from PALCAS01.lsi.com (128.94.213.117) by PALEDGE01.lsi.com (192.19.193.42) with Microsoft SMTP Server (TLS) id 8.3.213.0; Sun, 11 Mar 2012 11:12:15 -0400
Received: from palmail02.lsi.com ([128.94.233.45]) by PALCAS01.lsi.com ([128.94.213.117]) with mapi; Sun, 11 Mar 2012 11:07:05 -0400
Delivered-To: cpan-bug+DBD-ODBC [...] hipster.bestpractical.com
Subject: DBD::ODBC::st fetchrow_array failed: no select statement currently executing (SQL-HY000)
Return-Path: <Wayne.Bower [...] lsi.com>
X-RT-Mail-Extension: dbd-odbc
X-Original-To: cpan-bug+DBD-ODBC [...] hipster.bestpractical.com
X-Spam-Check-BY: 16.mx.develooper.com
Thread-Index: Acz/mJ3TCDzXMp9PRze7ETiOVEbsTw==
Date: Sun, 11 Mar 2012 11:07:03 -0400
X-Spam-Level:
X-MS-Has-Attach: yes
Thread-Topic: DBD::ODBC::st fetchrow_array failed: no select statement currently executing (SQL-HY000)
Accept-Language: en-US
To: "bug-DBD-ODBC [...] rt.cpan.org" <bug-DBD-ODBC [...] rt.cpan.org>
From: "Bower, Wayne (Wayne)" <Wayne.Bower [...] lsi.com>
Content-Length: 0
content-type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: us-ascii
Content-Length: 1255
Download (untitled) / with headers
text/plain 1.2k
While testing our code with DBD::ODBC 1.33 I found a case that is failing. The 1st attachment (fetch_no_select.pl) is the script that demonstrates the problem. And the 2nd attachment (fetch_no_select.log) is from DBI_TRACE=15=fetch_no_select_dbi.log ./fetch_no_select.pl >fetch_no_select.log 2>&1 And the 3rd attachment (fetch_no_select_dbi.log) is the DBI_TRACE output. This is using perl 5.14.1, DBI 1.616, DBD::ODBC 1.33 with freeTDS 0.91 and unixODBC on Linux. The script creates a procedure and executes it resulting in the following error: DBD::ODBC::st fetchrow_array failed: no select statement currently executing (SQL-HY000) Essentially the issue occurs if the dbi code attempts to fetch data and the procedure is not selecting anything. Keep in mind that this is just a test case to reveal the issue. Our actual procedure has more complex conditions which determine whether there is anything to select. The error occurs using DBD::ODBC 1.33 with freeTDS 0.91, but doesn't occur using our older installation of DBD::ODBC 1.16 with freeTDS 0.64. The prior handling seems correct to me. I.e. fetchrow_array returned an empty list instead of throwing an error. Please let me know if more information is needed. Thank you, Wayne Bower
Content-Description: fetch_no_select.log
content-type: application/octet-stream; name="fetch_no_select.log"
content-disposition: attachment; creation-date="Sun, 11 Mar 2012 15:04:52 GMT"; filename="fetch_no_select.log"; modification-date="Sun, 11 Mar 2012 14:37:33 GMT"; size="3208"
Content-Transfer-Encoding: base64
Content-Length: 3208
Download fetch_no_select.log
application/octet-stream 3.1k

Message body not shown because it is not plain text.

Content-Description: fetch_no_select_dbi.log
content-type: application/octet-stream; name="fetch_no_select_dbi.log"
content-disposition: attachment; creation-date="Sun, 11 Mar 2012 15:05:04 GMT"; filename="fetch_no_select_dbi.log"; modification-date="Sun, 11 Mar 2012 14:37:33 GMT"; size="24862"
Content-Transfer-Encoding: base64
Content-Length: 24862
Download fetch_no_select_dbi.log
application/octet-stream 24.2k

Message body not shown because it is not plain text.

Content-Description: fetch_no_select.pl
content-type: application/octet-stream; name="fetch_no_select.pl"
content-disposition: attachment; creation-date="Sun, 11 Mar 2012 15:04:26 GMT"; filename="fetch_no_select.pl"; modification-date="Sun, 11 Mar 2012 14:38:05 GMT"; size="2175"
Content-Transfer-Encoding: base64
Content-Length: 2175
Download fetch_no_select.pl
text/x-perl 2.1k

Message body is not shown because sender requested not to inline it.

MIME-Version: 1.0
In-Reply-To: <70DBE4460F072F47B78C59D72821D37102CA246D8E [...] palmail02.lsi.com>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <70DBE4460F072F47B78C59D72821D37102CA246D8E [...] palmail02.lsi.com>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-10812-1331580487-758.75693-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 3380
Download (untitled) / with headers
text/plain 3.3k
On Sun Mar 11 11:07:16 2012, Wayne.Bower@lsi.com wrote: Show quoted text
> While testing our code with DBD::ODBC 1.33 I found a case that is > failing. > > The 1st attachment (fetch_no_select.pl) is the script that > demonstrates the problem. > > And the 2nd attachment (fetch_no_select.log) is from > DBI_TRACE=15=fetch_no_select_dbi.log ./fetch_no_select.pl
> >fetch_no_select.log 2>&1
> > And the 3rd attachment (fetch_no_select_dbi.log) is the DBI_TRACE > output. > > This is using perl 5.14.1, DBI 1.616, DBD::ODBC 1.33 with freeTDS 0.91 > and unixODBC on Linux. > > The script creates a procedure and executes it resulting in the > following error: > DBD::ODBC::st fetchrow_array failed: no select statement currently > executing (SQL-HY000) > > Essentially the issue occurs if the dbi code attempts to fetch data > and the procedure is not selecting anything. Keep in mind that > this is just a test case to reveal the issue. Our actual procedure > has more complex conditions which determine whether there is > anything to select. > > The error occurs using DBD::ODBC 1.33 with freeTDS 0.91, but doesn't > occur using our older installation of DBD::ODBC 1.16 with freeTDS > 0.64. > > The prior handling seems correct to me. I.e. fetchrow_array returned > an empty list instead of throwing an error. > > Please let me know if more information is needed. > > Thank you, > Wayne Bower >
It does the same thing on Windows: Create TMP_SP_Test_ODBC that conditionally runs SELECT exec TMP_SP_Test_ODBC that conditionally runs SELECT Fetched from TMP_SP_Test_ODBC: DBD::ODBC::st fetchrow_array warning: no select statement currently executing at rt_75693.pl line 89. TMP_SP_Test_ODBC rv=<0> Drop TMP_SP_Test_ODBC I have a recollection this changed in a later DBD::ODBC. =head2 Changes in DBD::ODBC 1.30_7 June 15, 2011 [BUG FIXES] Some time ago (I don't know when) a few internal errors generated by DBD::ODBC got ignored. There are about 5 of them but I seriously doubt anyone would hit any other than the data truncated error (which is reported by the ODBC driver anyway) and "no select statement currently executing". You can see rt_68720.t in the t directory for an example of the latter. then later: =head2 Changes in DBD::ODBC 1.34_5 February 17 2012 [BUG FIXES] * The 40UnicodeRoundTrip tests counts could be 1 off in some cases. * Fix for t/03batt.t which could fail a test if the data source had no table - Kenichi Ishigaki * If a driver misbehaves during global destruction e.g. SQLFreeStmt fails but no error is available DBD::ODBC issues an error saying an error occurred but no error diagnostics could be found. This is pointless and irritating during global destruction. This stems from a change in 1.28. Thanks to Peter Rabbitson for reporting and suggested fix. [CHANGE IN BEHAVIOUR] * Prior to this release if you called selectall_* methods with a non-select statement DBD::ODBC would raise an error saying "no select statement currently executing". See RT 68720. After discussions on dbi-dev the concensus seems to be that issuing a warning in this case is better so that is what I've done. As a result t/rt_68720.t has been removed and t/85_selectall_non_select.t has been added. Try 1.35. Martin -- Martin J. Evans Wetherby, UK
From Wayne.Bower [...] lsi.com Wed Mar 14 11: 39:32 2012
MIME-Version: 1.0
X-Spam-Status: No, score=-1.235 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, SPF_SOFTFAIL=0.665] autolearn=no
In-Reply-To: <rt-3.8.HEAD-10812-1331580488-1366.75693-6-0 [...] rt.cpan.org>
X-Spam-Flag: NO
Acceptlanguage: en-US
References: <RT-Ticket-75693 [...] rt.cpan.org> <70DBE4460F072F47B78C59D72821D37102CA246D8E [...] palmail02.lsi.com> <rt-3.8.HEAD-10812-1331580488-1366.75693-6-0 [...] rt.cpan.org>
Content-Language: en-US
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <70DBE4460F072F47B78C59D72821D37102CA24707C [...] palmail02.lsi.com>
Content-Type: text/plain; charset="utf-8"
X-MS-Tnef-Correlator:
X-RT-Original-Encoding: utf-8
X-Spam-Score: -1.235
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 68ECD240031 for <cpan-bug+DBD-ODBC [...] hipster.bestpractical.com>; Wed, 14 Mar 2012 11:39:32 -0400 (EDT)
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 hHVP34da1ewP for <cpan-bug+DBD-ODBC [...] hipster.bestpractical.com>; Wed, 14 Mar 2012 11:39:27 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 83E97240022 for <bug-DBD-ODBC [...] rt.cpan.org>; Wed, 14 Mar 2012 11:39:27 -0400 (EDT)
Received: (qmail 18307 invoked by uid 103); 14 Mar 2012 15:39:27 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 14 Mar 2012 15:39:27 -0000
Received: from na3sys009aog120.obsmtp.com (HELO na3sys009aog120.obsmtp.com) (74.125.149.140) by 16.mx.develooper.com (qpsmtpd/0.80/v0.80-19-gf52d165) with ESMTP; Wed, 14 Mar 2012 08:39:23 -0700
Received: from paledge01.lsi.com ([192.19.193.42]) (using TLSv1) by na3sys009aob120.postini.com ([74.125.148.12]) with SMTP ID DSNKT2C7qTjxTc6ja6IfBUmAfCOGrcCaLaYl [...] postini.com; Wed, 14 Mar 2012 08:39:23 PDT
Received: from PALCAS01.lsi.com (128.94.213.117) by PALEDGE01.lsi.com (192.19.193.42) with Microsoft SMTP Server (TLS) id 8.3.213.0; Wed, 14 Mar 2012 11:44:21 -0400
Received: from palmail02.lsi.com ([128.94.233.45]) by PALCAS01.lsi.com ([128.94.213.117]) with mapi; Wed, 14 Mar 2012 11:39:18 -0400
Delivered-To: cpan-bug+DBD-ODBC [...] hipster.bestpractical.com
Subject: RE: [rt.cpan.org #75693] DBD::ODBC::st fetchrow_array failed: no select statement currently executing (SQL-HY000)
Return-Path: <Wayne.Bower [...] lsi.com>
Thread-Index: Ac0AhkNAjDXrqmxFRPSNbAp4ORjSZQBcbIiQ
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: cpan-bug+DBD-ODBC [...] hipster.bestpractical.com
X-RT-Mail-Extension: dbd-odbc
Date: Wed, 14 Mar 2012 11:39:17 -0400
X-Spam-Level:
Thread-Topic: [rt.cpan.org #75693] DBD::ODBC::st fetchrow_array failed: no select statement currently executing (SQL-HY000)
X-MS-Has-Attach:
To: "bug-DBD-ODBC [...] rt.cpan.org" <bug-DBD-ODBC [...] rt.cpan.org>
Accept-Language: en-US
Content-Transfer-Encoding: base64
From: "Bower, Wayne (Wayne)" <Wayne.Bower [...] lsi.com>
RT-Message-ID: <rt-3.8.HEAD-10814-1331739573-518.75693-0-0 [...] rt.cpan.org>
Content-Length: 2295
Download (untitled) / with headers
text/plain 2.2k
<URL: https://rt.cpan.org/Ticket/Display.html?id=75693 > On Mon Mar 12 15:28:11 2012, Martin J Evans via RT bug-DBD-ODBC@rt.cpan.org wrote: Show quoted text
> It does the same thing on Windows: > > Create TMP_SP_Test_ODBC that conditionally runs SELECT > exec TMP_SP_Test_ODBC that conditionally runs SELECT > Fetched from TMP_SP_Test_ODBC: > DBD::ODBC::st fetchrow_array warning: no select statement currently > executing at > rt_75693.pl line 89. > TMP_SP_Test_ODBC rv=<0> > Drop TMP_SP_Test_ODBC > > I have a recollection this changed in a later DBD::ODBC. > > =head2 Changes in DBD::ODBC 1.30_7 June 15, 2011 > > [BUG FIXES] > > Some time ago (I don't know when) a few internal errors generated by > DBD::ODBC got ignored. There are about 5 of them but I seriously > doubt anyone would hit any other than the data truncated error > (which is reported by the ODBC driver anyway) and "no select > statement currently executing". You can see rt_68720.t in the t > directory for an example of the latter. > > then later: > > =head2 Changes in DBD::ODBC 1.34_5 February 17 2012 > > [BUG FIXES] > > * The 40UnicodeRoundTrip tests counts could be 1 off in some cases. > > * Fix for t/03batt.t which could fail a test if the data source had > no table - Kenichi Ishigaki > > * If a driver misbehaves during global destruction e.g. SQLFreeStmt > fails but no error is available DBD::ODBC issues an error saying > an error occurred but no error diagnostics could be found. This is > pointless and irritating during global destruction. This stems > from a change in 1.28. Thanks to Peter Rabbitson for reporting > and suggested fix. > > [CHANGE IN BEHAVIOUR] > > * Prior to this release if you called selectall_* methods with a > non-select statement DBD::ODBC would raise an error saying "no > select statement currently executing". See RT 68720. After > discussions on dbi-dev the concensus seems to be that issuing a > warning in this case is better so that is what I've done. As a > result t/rt_68720.t has been removed and > t/85_selectall_non_select.t has been added. > > Try 1.35.
Downloaded and installed 1.35 and works great so far. Thank you, Wayne Bower


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

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