[PHP-DEV] Bug #12885 Updated: don't agree to the persistent connection manual section

2001-08-22 Thread stefan . priebsch

ID: 12885
User updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Analyzed
Bug Type: Documentation problem
Operating System: win98
PHP Version: 4.0.6
New Comment:

I agree that the implementation's behaviour is by design.
PHP has no general means of accessing any database and that is how it was designed. So 
you can not expect a command like pconnect to behave the same way for every database.
However, the manual *must* be much clearer about this or some people will run into 
serious trouble sooner or later.
Basically, I think this whole topic comes down to the question when/if there will be 
one generalized database interface in php one day (or for php one day, how about 
PEAR?). Maybe some PEAR insider could comment on this.

For now, we all have to keep in mind that each database will have to be treated 
differently. But please, save others a lot of time and effort and make changes to the 
manual ASAP. I have amended a note to mysql_pconnect today as a start.

Stefan

Previous Comments:


[2001-08-21 18:15:02] [EMAIL PROTECTED]

This problem seems to stem from the fact that different
databases have a different notion of a connection. Some
have just a connection to the database engine and there is
a possibility to change the database within a connection,
like MySQL, and others think the connection to be to a
specified database.

Personally, I think what 'a persistent connection' means
with different databases should be clarified with each
case and the current implementation left as it is. Although
I can think about the problems it will cause to the people
writing any kind of database abstration layers... :(

I'd say that there just isn't a *simple* solution to this
problem. Hints about a complex solution appreciated.



[2001-08-21 17:03:13] [EMAIL PROTECTED]

When I did the following:
1. handle a = pconnect to a mysql db, say user "root", no password, host=localhost
2. select database "a"
3. handle b = pconnect to same mysql db, user "root", no password, host=localhost
4. select database "b"

If i run a query against the database using handle a, it will have database b 
selected. However, the manual says on persistent connections:


An important summary. Persistent connections were designed to have one-to-one mapping 
to regular connections. That means that you should always be able to replace 
persistent connections with non-persistent connections, and it won't change the way 
your script behaves. It may (and probably will) change the efficiency of the script, 
but not its behavior! 


This does *not* hold true, at least for mysql persistent connections in that case.

If this behaviour is not by design in 4.0.6 on Win 98, I will be happy to provide more 
information if required.





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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP-DEV] Bug #12885 Updated: don't agree to the persistent connection manual section

2001-08-21 Thread jah

ID: 12885
Updated by: jah
Reported By: [EMAIL PROTECTED]
Old Status: Open
Status: Analyzed
Bug Type: Documentation problem
Operating System: win98
PHP Version: 4.0.6
New Comment:

This problem seems to stem from the fact that different
databases have a different notion of a connection. Some
have just a connection to the database engine and there is
a possibility to change the database within a connection,
like MySQL, and others think the connection to be to a
specified database.

Personally, I think what 'a persistent connection' means
with different databases should be clarified with each
case and the current implementation left as it is. Although
I can think about the problems it will cause to the people
writing any kind of database abstration layers... :(

I'd say that there just isn't a *simple* solution to this
problem. Hints about a complex solution appreciated.

Previous Comments:


[2001-08-21 17:03:13] [EMAIL PROTECTED]

When I did the following:
1. handle a = pconnect to a mysql db, say user "root", no password, host=localhost
2. select database "a"
3. handle b = pconnect to same mysql db, user "root", no password, host=localhost
4. select database "b"

If i run a query against the database using handle a, it will have database b 
selected. However, the manual says on persistent connections:


An important summary. Persistent connections were designed to have one-to-one mapping 
to regular connections. That means that you should always be able to replace 
persistent connections with non-persistent connections, and it won't change the way 
your script behaves. It may (and probably will) change the efficiency of the script, 
but not its behavior! 


This does *not* hold true, at least for mysql persistent connections in that case.

If this behaviour is not by design in 4.0.6 on Win 98, I will be happy to provide more 
information if required.





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


-- 
PHP Development Mailing List 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]