Skip to content

Commit

Permalink
* mysql: updated mysql driver according to profiling result
Browse files Browse the repository at this point in the history
  > use "core.framework.mysql:mysql-connector-j:8.2.0-r1"

Signed-off-by: neo <[email protected]>
  • Loading branch information
neowu committed Dec 18, 2023
1 parent fe7a376 commit e313a10
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@
* kafka: updated client to 3.6.1
* db: tweaked all datetime related operations for virtual thread
> use new date api if possible, mysql driver uses too many locks/sync for old Date/Timestamp impl
> pls make sure to map MySQL column type: LocalDate -> DATE, LocalDateTime -> DATETIME, ZonedDateTime -> TIMESTAMP(6)
> it recommends to map MySQL column type: LocalDate -> DATE, LocalDateTime -> DATETIME, ZonedDateTime -> TIMESTAMP(6)
> with Timestamp, in mysql console, it is easier to use "SET @@session.time_zone" to adjust datetime value displayed
* mysql: updated mysql driver according to profiling result
> use "core.framework.mysql:mysql-connector-j:8.2.0-r1"
### 9.0.2 (12/7/2023 - 12/12/2023)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ Properties driverProperties(String url) {
properties.setProperty(PropertyKey.rewriteBatchedStatements.getKeyName(), "true");
properties.setProperty(PropertyKey.queryInterceptors.getKeyName(), MySQLQueryInterceptor.class.getName());
properties.setProperty(PropertyKey.logger.getKeyName(), "Slf4JLogger");
properties.setProperty(PropertyKey.cachePrepStmts.getKeyName(), "true");

int index = url.indexOf('?');
// mysql with ssl has overhead, usually we ensure security on arch level, e.g. gcloud sql proxy or firewall rule
Expand Down

0 comments on commit e313a10

Please sign in to comment.