-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not call mariadb_db_reconnect() during changing $dbh attributes wh…
…en not needed Currently mariadb_db_STORE_attrib() function (handler for changing dbh attributes via $dbh->{...} = ... syntax) at its beginning calls function mariadb_db_reconnect() to ensure that imp_dbh->pmysql connection structure is initialized. Change logic of mariadb_db_STORE_attrib() function to call function mariadb_db_reconnect() only when the changing of attribute really requires active connection. This change fixes a problem that Perl for locatized variables is trying to restore its original value after leaving the scope, and this is failing for restoring the DBI attributes. Trying to change common DBI attributes (those which first letter is upper case) except the AutoConnect, is not handled by DBD::MariaDB driver, and therefore DBD::MariaDB driver does not have to check if the connection is still active.
- Loading branch information
Showing
1 changed file
with
30 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters