ID:               41705
 Updated by:       [EMAIL PROTECTED]
 Reported By:      laden100 at mail dot ru
-Status:           Open
+Status:           Bogus
 Bug Type:         Session related
 Operating System: Solaris
 PHP Version:      5.2.3
 New Comment:

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




Previous Comments:
------------------------------------------------------------------------

[2007-06-15 17:24:11] laden100 at mail dot ru

Description:
------------
If more than one process of the same session is created in the one
time,  this processes are executed simultaneously instead of being
executed one after another.

Reproduce code:
---------------
<?php
 //For example this script is asked three times simultaneously from the
one user, siting on the one session ID
 require_once('db_fns.php'); //requiring mysql functions and connecting
to database
 require_once('session.php'); //creating session from MySQL storage
 $sessid = session_id();
 $example = db_query_onerow("SELECT example FROM table WHERE id=1");
//etc the field `example` is "1" by default. So all three times every
process has the value "1"
 echo "Example: $example"; //So every time we will get "1"
 $lock = db_query_onerow("SELECT GET_LOCK('database.lock_{$sessid}',
60);"); //Getting lock to test the bug of PHP
 $anotherexample = db_query_onerow("SELECT example FROM table WHERE
id=1"); //This Select will be not executed at the one time because of
MySQL locks and will give us the right values
 echo "Another Example: $anotherexample"; //At the first time it will
be "1" and two other time "0"
 db_query_write("UPDATE table SET example=0 WHERE id=1"); //Setting the
field `example` to 0
 $lock = db_query_onerow("SELECT
RELEASE_LOCK('database.lock_{$sessid}')"); //Getting lock to test the
bug
?>

Expected result:
----------------
Example: 1
Another Example: 1
Example: 0
Another Example: 0
Example: 0
Another Example: 0

Actual result:
--------------
Example: 1
Example: 1
Example: 1
Another Example: 1
Another Example: 0
Another Example: 0


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=41705&edit=1

Reply via email to