Bug #54046 [Fbk->NoF]: with multiple Mysql Links, data disappears/reappears
| From: | php-bugs at lists dot php dot net | Date: | Mon, 18 Feb 2013 00:34:43 +0000 |
| Subject: | Bug #54046 [Fbk->NoF]: with multiple Mysql Links, data disappears/reappears | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-176966@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=54046&edit=1
ID: 54046
Updated by: php-bugs@lists.php.net
Reported by: matze73 at hallo dot ms
Summary: with multiple Mysql Links, data disappears/reappears
-Status: Feedback
+Status: No Feedback
Type: Bug
Package: MySQL related
PHP Version: 5.3.5
New Comment:
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 "Open". Thank you.
Previous Comments:
------------------------------------------------------------------------
[2011-02-18 16:44:39] johannes@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves.
A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external
resources such as databases, etc. If the script requires a
database to demonstrate the issue, please make sure it creates
all necessary tables, stored procedures etc.
Please avoid embedding huge scripts into the report.
------------------------------------------------------------------------
[2011-02-18 15:58:29] matze73 at hallo dot ms
Description:
------------
[please note: actually, this problem occurs with 5.3.3. I have currently no option to upgrade the
php package. ]
I am working with two mysql links.
Basically, I observed that with entering another block / STACK frame, previously retrieved data
disappears , upon return it re-appears.
It is no SCOPE problem, because the problem goes away when working with just one mysql database
link.
Long story:
There is some small amount of data retrieved from the first link, which is put into an array (
instance member $this->a );
Then, *inside* an switch-block the array is missing its elements retrieved from the database. But
after the switch-block the array is intact again .. !!
After years of PHP coding I never had such a case. Very curious indeed. I tried two workarounds:
1. copy the array into $_SESSION
2. convert the array via print_r ($a, true) to a string
The truly NASTY thing is, even with option #2 the resulting string changes during the switch
statement (looses data) - and is intact again afterwards.
The same effect when calling an instance method: elements retrieved from the first database link
have disappeared.
The problem is only with data retrieved from the first mysql link.
Helpful workaround: when I move the table from the first database to the second database (i.e. just
working with one mysql link), the problem disappears altogether.
The VERY strange thing is, that the data even disappears/reappears when converted via print_r( $x,
true) ...
Actual result:
--------------
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=54046&edit=1