Skip to content

Commit

Permalink
Add env MYSQL_SET_CHARSET_NAME
Browse files Browse the repository at this point in the history
  • Loading branch information
rockeet committed Oct 28, 2023
1 parent 50e4dcb commit 64f03d6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/drivers/mysql/drv_mysql.c
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,10 @@ static int mysql_drv_real_connect(db_mysql_conn_t *db_mysql_con)
DEBUG("mysql_options(%p, %s, %s)",con, "MYSQL_OPT_COMPRESS", "NULL");
mysql_options(con, MYSQL_OPT_COMPRESS, NULL);
}
const char* cs = getenv("MYSQL_CONN_CHARSET");
if (cs) {
mysql_options(con, MYSQL_SET_CHARSET_NAME, cs);
}

DEBUG("mysql_real_connect(%p, \"%s\", \"%s\", \"%s\", \"%s\", %u, \"%s\", %s)",
con,
Expand Down

0 comments on commit 64f03d6

Please sign in to comment.