Skip to content

Commit

Permalink
Rename mysql_connect() function to mysql_fdw_connect().
Browse files Browse the repository at this point in the history
On MariaDB, mysql.h do have function named mysql_connect()
conflicting with our version.  So rename it.

Reported on GitHub through pull request #145 by
Glyn Astill (glynastill).  Another user, Михаил (mkgrgis),
also requested these changes.

Glyn Astill, revised by Jeevan Chalke.
  • Loading branch information
jeevanchalke committed Feb 15, 2023
1 parent 7f0748b commit a5a2173
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ mysql_get_connection(ForeignServer *server, UserMapping *user, mysql_opt *opt)

if (entry->conn == NULL)
{
entry->conn = mysql_connect(opt);
entry->conn = mysql_fdw_connect(opt);
elog(DEBUG3, "new mysql_fdw connection %p for server \"%s\"",
entry->conn, server->servername);

Expand Down Expand Up @@ -195,7 +195,7 @@ mysql_release_connection(MYSQL *conn)
}

MYSQL *
mysql_connect(mysql_opt *opt)
mysql_fdw_connect(mysql_opt *opt)
{
MYSQL *conn;
char *svr_database = opt->svr_database;
Expand Down
2 changes: 1 addition & 1 deletion mysql_fdw.h
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ extern void mysql_deparse_truncate_sql(StringInfo buf, Relation rel);
/* connection.c headers */
MYSQL *mysql_get_connection(ForeignServer *server, UserMapping *user,
mysql_opt *opt);
MYSQL *mysql_connect(mysql_opt *opt);
MYSQL *mysql_fdw_connect(mysql_opt *opt);
void mysql_cleanup_connection(void);
void mysql_release_connection(MYSQL *conn);

Expand Down

0 comments on commit a5a2173

Please sign in to comment.