Skip to content

Commit

Permalink
Update version and add connection test query
Browse files Browse the repository at this point in the history
The version of MYSQL-Api in pom.xml is updated from 5.7.5 to 5.7.6. Additionally, a connection test query is added in MYSQL.java to test the validity of a connection by executing a query that most probably be valid on the database. These changes ensure project dependencies are up to date and increase the robustness of the database connection handling.
  • Loading branch information
coilgner committed Mar 18, 2024
1 parent f0199c1 commit 9a10103
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>de.goldendeveloper</groupId>
<artifactId>MYSQL-Api</artifactId>
<version>5.7.5</version>
<version>5.7.6</version>
<packaging>jar</packaging>
<url>https://github.com/Golden-Developer/MYSQL-Api</url>

Expand Down
1 change: 1 addition & 0 deletions src/main/java/de/goldendeveloper/mysql/MYSQL.java
Original file line number Diff line number Diff line change
Expand Up @@ -409,6 +409,7 @@ private void createConnectionConfig() {
config.setLeakDetectionThreshold(TimeUnit.SECONDS.toMillis(60));
config.setUsername(this.username);
config.setPassword(this.password);
config.setConnectionTestQuery("SELECT 1");
try {
this.ds = new HikariDataSource(config);
} catch (Exception e) {
Expand Down

0 comments on commit 9a10103

Please sign in to comment.