php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #47034 Prepared-Statement fails when MySQL-Server under load
Submitted: 2009-01-08 08:57 UTC Modified: 2009-01-11 22:24 UTC
From: raphithom at gmx dot ch Assigned:
Status: Not a bug Package: MySQLi related
PHP Version: 5.2.8 OS: FreeBSD 6.3-RELEASE-p5
Private report: No CVE-ID: None
 [2009-01-08 08:57 UTC] raphithom at gmx dot ch
Description:
------------
Hello

As backup-procedure we use 4 concurrent mysql-dump processes. When these processes are running, MySQLi-Prepared-Statements can't be executed and the following error appears:

Errno: 1615
Message: Prepared statement needs to be re-prepared

In my opinion it doesn't seem to be a mysql-problem because prepared-statements with PDO and "normal" mysql_query() or mysqli->query() work as expected. The error doesn't occur if no mysqldumps are running. 

Reproduce code:
---------------
http://tmp.raphis.ch/mysqli_problem.phps

Expected result:
----------------
All queries should return the same texts.

Actual result:
--------------
mysqli-select, mysql_select and PDO work as expected. mysqli-prepared statements exits with:

Errno: 1615
Message: Prepared statement needs to be re-prepared

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-01-08 09:20 UTC] raphithom at gmx dot ch
I forgot to mention, that the mysqldumps are running on other databases, not on the one where I'm executing the prepared statement.
 [2009-01-11 22:24 UTC] johannes@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

This error is coming from the server which has to handle it's resources. The reason PDO works is that PDO uses an emulation for prepared statements by default, falling back to simple queries.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Mar 28 21:01:27 2024 UTC