[TYPO3-core] RFC #11770: Feature: mysql_ping wrapper
Martin Kutschker
masi-no at spam-typo3.org
Mon Aug 24 21:43:22 CEST 2009
Ries van Twisk schrieb:
> Looking at class.ux_t3lib_db.php,
>
> in the case of DBAL you can connect to multiple database so you might
> want to test all connected databases and
> do something appropriate OR at least log a message that this function
> does not support DBAL and
> only will ONYL ping a native mysql DB.
>
> However just returning TRUE might lead to incorrect decisions for a
> programmer when using this function and DBAL with non-mysql databases,
> or one native DB and a non-native DB...
>
>
> One potential problem I see with this function is that mysql_ping can
> reconnect!!!! (really stupid decission of these people.....)
Seems the PostgreSQL folks liked it too:
pg_ping() pings a database connection and tries to reconnect it if it is
broken.
Basically *_ping() is a classic NOOP statement also found eg in the IMAP
protocol to get a connection keep-alive.
Masi
More information about the TYPO3-team-core
mailing list