DBD-mysql icon indicating copy to clipboard operation
DBD-mysql copied to clipboard

Add support for the "mysql_reset_connection()" call.

Open druud opened this issue 7 years ago • 2 comments

See also https://dev.mysql.com/doc/refman/5.7/en/mysql-reset-connection.html and https://jira.mariadb.org/browse/MDEV-10340

druud avatar Jun 10 '18 12:06 druud

Do you mean to have $dbh->reconnect() method? If yes, then first it needs to be supported by DBI, so report it to DBI itself: https://github.com/perl5-dbi/dbi/issues

pali avatar Jun 14 '18 08:06 pali

On 2018-06-14 10:54, pali wrote:

Do you mean to have |$dbh->reconnect()| method? If yes, then first it needs to be supported by DBI, so report it to DBI itself: https://github.com/perl5-dbi/dbi/issues

I meant it less general, so rather 'mysql_' specific.

This is not about a "reconnect", but about a "reset_connection". The existing connection gets reset, db-server-side, to get rid of any session variables, temporary tables, etc. Should be lighter than a "disconnect;connect".

On DBI, it should then also be called $dbh->reset_connection, I suppose. (and then it can fallback to "disconnect;connect;" for drivers that don't implement it)

-- Ruud

druud avatar Jun 14 '18 10:06 druud