Bug 1381442 - php-pdo: No results when re-executing PDO dblib query using same variable
Summary: php-pdo: No results when re-executing PDO dblib query using same variable
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: php-extras
Version: epel7
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Remi Collet
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1381905 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-04 06:35 UTC by Masaharu Kawada
Modified: 2016-11-25 02:52 UTC (History)
3 users (show)

Fixed In Version: php-extras-5.4.16-5.el7 php-extras-5.4.16-7.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-25 02:52:16 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Test script to reproduce the issue listed in the Description of problem section. (1.70 KB, application/x-php)
2016-10-04 06:35 UTC, Masaharu Kawada
no flags Details

Description Masaharu Kawada 2016-10-04 06:35:23 UTC
Created attachment 1207088 [details]
Test script to reproduce the issue listed in the Description of problem section.

Description of problem:

A customer hits the issue described in the following upstream bug report and he wants us to backport the patch to fix it.

https://bugs.php.net/bug.php?id=64328
https://bugs.php.net/bug.php?id=64522

Version-Release number of selected component (if applicable):

php-5.4.16-36.3.el7_2.x86_64
php-pdo-5.4.16-36.3.el7_2.x86_64 

How reproducible:

Always

Steps to Reproduce:

Run the attached test script provided by the customer

Actual results:

# php testit.php 
---------------------------------------------------------------------------------------------------------------------------------------
No results are returned from dblib PDO::query() + PDOStatement::fetchAll() if the same variable is re-used from a previous query/fetch.
---------------------------------------------------------------------------------------------------------------------------------------
Result after first query execution : 
Array
(
    [0] => Array
        (
            [result] => 2
            [0] => 2
        )

)

Result after second query execution : 
Array
(
)

Expected results:

Results are returned from dblib PDO::query() + PDOStatement::fetchAll() if the different variables are used for query/fetch.
----------------------------------------------------------------------------------------------------------------------------
Result after first query execution : 
Array
(
    [0] => Array
        (
            [result] => 2
            [0] => 2
        )

)

Result after second query execution : 
Array
(
    [0] => Array
        (
            [result] => 2
            [0] => 2
        )

)

Additional info:

Comment 2 Remi Collet 2016-10-04 11:46:11 UTC
These upstream bugs are related to pdo_dblib which is not provides in RHEL, so which cannot be supported.


Changing component to EPEL / php-extras which provides this extension.

Comment 3 Fedora Update System 2016-10-05 13:19:28 UTC
php-extras-5.4.16-5.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-5529730b10

Comment 4 Remi Collet 2016-10-05 14:15:45 UTC
*** Bug 1381905 has been marked as a duplicate of this bug. ***

Comment 5 Remi Collet 2016-10-05 14:16:33 UTC
@Dmitry, thanks for this quick fix (you was faster than me)

Comment 6 Fedora Update System 2016-10-21 15:51:11 UTC
php-extras-5.4.16-5.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.

Comment 7 Dmitry Butskoy 2016-11-07 17:00:48 UTC
Remi,

some regression reported: bug #1390201

Could you look onto it?

Comment 8 Remi Collet 2016-11-08 08:14:35 UTC
@Dmitry, I need a Microsoft SQL server... not so easy for me...

Comment 9 Fedora Update System 2016-11-08 09:43:18 UTC
php-extras-5.4.16-6.el7 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-f876dc4049

Comment 10 Fedora Update System 2016-11-10 04:20:11 UTC
php-extras-5.4.16-7.el7 has been pushed to the Fedora EPEL 7 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2016-f876dc4049

Comment 11 Fedora Update System 2016-11-25 02:52:16 UTC
php-extras-5.4.16-7.el7 has been pushed to the Fedora EPEL 7 stable repository. If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.