Skip to content

Commit

Permalink
MySQL 8.0.20 client library has fixed reinitialization bug
Browse files Browse the repository at this point in the history
Adjust workaround for affected MySQL client versions which prevents
cleaning up of MySQL client resources.
  • Loading branch information
pali committed Aug 13, 2023
1 parent 62e65e8 commit 9dc04ee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions dbdimp.c
Original file line number Diff line number Diff line change
Expand Up @@ -3098,6 +3098,7 @@ static void mariadb_dr_close_mysql(pTHX_ imp_drh_t *imp_drh, MYSQL *pmysql)
* - infinite loop when calling mysql_server_end() more then once in case Embedded server was not started
* Therefore do not call mysql_server_end() when Embedded server was not in used.
* These bugs were fixed in MariaDB Connector/C 3.0.5, see: https://jira.mariadb.org/browse/CONC-336
* And fixed also in MySQL 8.0.20, see: https://bugs.mysql.com/bug.php?id=93276
* But remains in MariaDB Embedded server, see: https://jira.mariadb.org/browse/MDEV-16578
*/
#if !defined(HAVE_BROKEN_INIT) && (defined(HAVE_DEINITIALIZE_SSL) || !defined(HAVE_PROBLEM_WITH_OPENSSL))
Expand Down
4 changes: 2 additions & 2 deletions dbdimp.h
Original file line number Diff line number Diff line change
Expand Up @@ -373,9 +373,9 @@ PERL_STATIC_INLINE unsigned long mariadb_get_client_version(void)
/*
* MySQL and MariaDB Embedded are affected by https://jira.mariadb.org/browse/MDEV-16578
* MariaDB 10.2.2+ prior to 10.2.19 and 10.3.9 and MariaDB Connector/C prior to 3.0.5 are affected by https://jira.mariadb.org/browse/CONC-336
* MySQL 8.0.4+ is affected too by https://bugs.mysql.com/bug.php?id=93276
* MySQL 8.0.4+ prior to 8.0.20 is affected too by https://bugs.mysql.com/bug.php?id=93276
*/
#if defined(HAVE_EMBEDDED) || (!defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 80004) || (defined(MARIADB_PACKAGE_VERSION) && (!defined(MARIADB_PACKAGE_VERSION_ID) || MARIADB_PACKAGE_VERSION_ID < 30005)) || (defined(MARIADB_BASE_VERSION) && ((MYSQL_VERSION_ID >= 100202 && MYSQL_VERSION_ID < 100219) || (MYSQL_VERSION_ID >= 100300 && MYSQL_VERSION_ID < 100309)))
#if defined(HAVE_EMBEDDED) || (!defined(MARIADB_BASE_VERSION) && MYSQL_VERSION_ID >= 80004 && MYSQL_VERSION_ID < 80020) || (defined(MARIADB_PACKAGE_VERSION) && (!defined(MARIADB_PACKAGE_VERSION_ID) || MARIADB_PACKAGE_VERSION_ID < 30005)) || (defined(MARIADB_BASE_VERSION) && ((MYSQL_VERSION_ID >= 100202 && MYSQL_VERSION_ID < 100219) || (MYSQL_VERSION_ID >= 100300 && MYSQL_VERSION_ID < 100309)))
#define HAVE_BROKEN_INIT
#endif

Expand Down

0 comments on commit 9dc04ee

Please sign in to comment.