ID:               39315
 Updated by:       [EMAIL PROTECTED]
 Reported By:      roberto at spadim dot com dot br
-Status:           Open
+Status:           Bogus
 Bug Type:         MySQL related
 Operating System: linux
 PHP Version:      5.1.6
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.




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

[2006-10-31 03:00:06] roberto at spadim dot com dot br

Description:
------------
FROM MANUAL (mysql_pconnect):
First, when connecting, the function would first try to find a
(persistent) link that's already open with the same host, username and
password. If one is found, an identifier for it will be returned
instead of opening a new connection.

that's ok, but i'm using pcntl with fork, one process is priority 20
and the other -20,
when i use mysql_query i first mysql_Select_db and after mysql_query,
(with mysql_db_query the same thing occur)
one process is database "dev_comercial" and the other is "dev"

if mysql_pconnect add an new parameter that could be default_database
and just use link resources with same default_database my error don't
occur

when i select on process one and process two at samy time, one process
get unknown table on dev when it must use dev_comercial database and
not dev database

any idea? i'm using mysql_connect as an workaround but it get many
connection and reconnection overhead

Reproduce code:
---------------
fork
pid 1:
mysql_pconnect()
mysql_db_select( dev_comercial )
mysql_Query
error: table "table" unknown on database "dev" (pid2 executed
mysql_db_select after pid1 mysql_dbselect and before mysql_query)

pid 2:
mysql_pconnect()
mysql_db_select( dev )
mysql_Query

error: no error table is on dev database

Expected result:
----------------
get mysql_query from pid1 and pid2 without pid1 or pid2 changing
database of pid1 or pid2

Actual result:
--------------
one mysql_select_db change database from pid1 and pid2 cause they are
the same link resource
if i get diferent link resource no problem occur


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


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

Reply via email to