On May 9, 2008, at 12:17 AM, Sebastian Mendel wrote:
> Paul DuBois schrieb:
>> On May 7, 2008, at 4:36 AM, Sebastian Mendel wrote:
>>> Hi,
>>>
>>> wouldn't it be very helpful if mysql connectors support some sort
>>> of per session persistent connection?
>>>
>>> this would save a lot of queries in many apps, for example SET
>>> NAMES, setting variables, creating temporary tables
>> How would a persistent connection save any of that?
>> Suppose the script that previously used the connection reset any or
>> all of those things?
>
> i do not fully understand, why should the script reset these things?
It doesn't have to reset any of those things, but you are *assuming*
that no other script *will* reset any of those things. As far as I
understand what you want to do, that's an invalid assumption. How
do you know what some other script might want to do? Perhaps it wants
a different character set than you do.
> i do not talk of a global persistent connection, every session
> should have it's own persistent connection (if requested).
A session is a connection. When the connection ends, the session ends.
--
Paul DuBois, MySQL Documentation Team
Madison, Wisconsin, USA
www.mysql.com