php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67295 PHP access to MySQL Stored Procedure with cursors makes incomplete table update
Submitted: 2014-05-16 21:01 UTC Modified: 2017-05-28 04:22 UTC
From: wsekim at yahoo dot com Assigned:
Status: No Feedback Package: MySQLi related
PHP Version: 5.4.28 OS: Windows 7 Pro SP1
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
31 + 32 = ?
Subscribe to this entry?

 
 [2014-05-16 21:01 UTC] wsekim at yahoo dot com
Description:
------------
A call with MySQLi triggers incomplete updates to a datatable when running a cursor-fetch loop in a stored procedure.

The bug did not occur when testing the stored procedure in the MySQL Workbench, but arose when calling the procedure through PHP MySQLi functions.

I am using an older version of PHP but the problem occurred on a new download of the Windows TS PHP 5.4.28 with php.ini modified only to support MySQLi access using CLI.

A test with a simpler cursor-fetch procedure, calling another stored procedure in the loop, appeared to work fine.

Test script:
---------------
http://mikeswhitney.com/BugReportPHPMySQLMay2014.txt

Expected result:
----------------
  Add 5 entries, into tbl_order_image, with image_source_path filled in with sequential values.


Actual result:
--------------
 Adds 3 entries, into tbl_order_image, with correct sequential values for the first two entries. However, a null value appears in the image_source_path of the 3rd entry



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-05-15 09:32 UTC] fjanisze@php.net
-Status: Open +Status: Feedback
 [2017-05-15 09:32 UTC] fjanisze@php.net
Can you attempt to reproduce this bug with a newer version? And if the problem is still appearing, can you share the non working script along with the modified one (simpler) which work?
 [2017-05-28 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 [2022-10-08 04:22 UTC] wsekim at yahoo dot com
I am going by memory on this. This may help if someone else thinks there is a bug.

The problem does not appear to be with php but rather that the code must be ready to handle two responses from the query request. Most php mysqli processing is based on a single query response.
Sorry i don't recall the test sequence after so many years.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 00:01:41 2024 UTC