-
Notifications
You must be signed in to change notification settings - Fork 195
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clear MySQL prepared statements cache on connection reset (#1428)
* Clear MySQL prepared statements cache on connection reset See #1424 Otherwise, the client emits an error such as: io.vertx.mysqlclient.MySQLException: {errorMessage=Unknown prepared statement handler (1) given to mysql_stmt_precheck, errorCode=1243, sqlState=HY000} Signed-off-by: Thomas Segismont <tsegismont@gmail.com> * Add LruCacheTest#testCacheCleared Signed-off-by: Thomas Segismont <tsegismont@gmail.com> --------- Signed-off-by: Thomas Segismont <tsegismont@gmail.com>
- Loading branch information
1 parent
ca64aca
commit acb02de
Showing
7 changed files
with
72 additions
and
12 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
13 changes: 13 additions & 0 deletions
13
...ysql-client/src/main/java/io/vertx/mysqlclient/impl/codec/ClearCachedStatementsEvent.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package io.vertx.mysqlclient.impl.codec; | ||
|
||
/** | ||
* An event that signals all cached statements must be cleared from the cache. | ||
*/ | ||
public class ClearCachedStatementsEvent { | ||
|
||
public static final ClearCachedStatementsEvent INSTANCE = new ClearCachedStatementsEvent(); | ||
|
||
private ClearCachedStatementsEvent() { | ||
// Singleton | ||
} | ||
} |
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
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
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
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
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