Skip to content

Commit

Permalink
bump 1.2.0 version
Browse files Browse the repository at this point in the history
  • Loading branch information
rusher committed Feb 8, 2024
1 parent 6c8c634 commit a41a630
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 85 deletions.
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Change Log

## [1.2.0](https://github.com/mariadb-corporation/mariadb-connector-r2dbc/tree/1.2.0) (08 Feb 2024)

[Full Changelog](https://github.com/mariadb-corporation/mariadb-connector-r2dbc/compare/1.1.4...1.2.0)

Notable Changes:

* R2DBC-93 new timezone option
* R2DBC-66 add support for connection redirection

Bugs Fixed:

* R2DBC-92 Properly end connection (in place of RST TCP packet)
* R2DBC-86 Failover High availability mode "r2dbc:mariadb:[sequential|loadbalancing]://..." wrongly parsed
* R2DBC-87 Compatibility with mariadb 11.1.1
* R2DBC-88 java 8 compatibility regression
* R2DBC-91 ensure respecting server collation
* R2DBC-94 session tracking wrong implementation when multiple system variable changes


## [1.1.4](https://github.com/mariadb-corporation/mariadb-connector-r2dbc/tree/1.1.4) (16 Mar 2023)

[Full Changelog](https://github.com/mariadb-corporation/mariadb-connector-r2dbc/compare/1.1.3...1.1.4)
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ The MariaDB Connector is available through maven using :
<dependency>
<groupId>org.mariadb</groupId>
<artifactId>r2dbc-mariadb</artifactId>
<version>1.1.4</version>
<version>1.2.0</version>
</dependency>
```

Expand Down Expand Up @@ -114,6 +114,9 @@ Basic example:
| **`loopResources`** | permits to share netty EventLoopGroup among multiple async libraries/framework | *LoopResources* | |
| **`sslContextBuilderCustomizer`** | Permits to customized SSL context builder. | *UnaryOperator<SslContextBuilder>* | |
| **`sslTunnelDisableHostVerification`** | Disable hostname verification during SSLHandshake when SslMode.TUNNEL is set | *boolean* | |
| **`permitRedirect`** | Permit server redirection | *boolean* | true |
| **`timezone`** | permits to force session timezone in case of client having a different timezone compare to server. The option `timezone` can have 3 types of value: * 'disabled' (default) : connector doesn't change time_zone. * 'auto': client will use client default timezone. * '<a timezone>': connector will set connection variable to value. Since 1.2.0 | String | 'disabled' |


## Failover

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.mariadb</groupId>
<artifactId>r2dbc-mariadb</artifactId>
<version>1.2.0-SNAPSHOT</version>
<version>1.2.0</version>
<packaging>jar</packaging>
<url>https://github.com/mariadb-corporation/mariadb-connector-r2dbc</url>

Expand Down
166 changes: 83 additions & 83 deletions src/test/java/org/mariadb/r2dbc/integration/LoggingTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,90 +67,90 @@ void basicLogging() throws IOException {
MariadbConnectionMetadata meta = connection.getMetadata();
connection.close().block();

String contents = new String(Files.readAllBytes(Paths.get(tempFile.getPath())));
String selectIsolation =
" +-------------------------------------------------+\r\n"+
" | 0 1 2 3 4 5 6 7 8 9 a b c d e f |\r\n"+
"+--------+-------------------------------------------------+----------------+\r\n"+
"|00000000| b9 00 00 00 03 53 45 54 20 61 75 74 6f 63 6f 6d |.....SET autocom|\r\n"+
"|00000010| 6d 69 74 3d 31 2c 74 78 5f 69 73 6f 6c 61 74 69 |mit=1,tx_isolati|\r\n"+
"|00000020| 6f 6e 3d 27 52 45 50 45 41 54 41 42 4c 45 2d 52 |on='REPEATABLE-R|\r\n"+
"|00000030| 45 41 44 27 2c 73 65 73 73 69 6f 6e 5f 74 72 61 |EAD',session_tra|\r\n"+
"|00000040| 63 6b 5f 73 63 68 65 6d 61 3d 31 2c 73 65 73 73 |ck_schema=1,sess|\r\n"+
"|00000050| 69 6f 6e 5f 74 72 61 63 6b 5f 73 79 73 74 65 6d |ion_track_system|\r\n"+
"|00000060| 5f 76 61 72 69 61 62 6c 65 73 3d 43 4f 4e 43 41 |_variables=CONCA|\r\n"+
"|00000070| 54 28 40 40 73 65 73 73 69 6f 6e 5f 74 72 61 63 |T(@@session_trac|\r\n"+
"|00000080| 6b 5f 73 79 73 74 65 6d 5f 76 61 72 69 61 62 6c |k_system_variabl|\r\n"+
"|00000090| 65 73 2c 27 2c 61 75 74 6f 63 6f 6d 6d 69 74 2c |es,',autocommit,|\r\n"+
"|000000a0| 74 78 5f 69 73 6f 6c 61 74 69 6f 6e 27 29 2c 20 |tx_isolation'), |\r\n"+
"|000000b0| 6e 61 6d 65 73 20 55 54 46 38 4d 42 34 |names UTF8MB4 |\r\n"+
"+--------+-------------------------------------------------+----------------+\r\n";
String transactionIsolation =
" +-------------------------------------------------+\r\n"
+ " | 0 1 2 3 4 5 6 7 8 9 a b c d e f |\r\n"
+ "+--------+-------------------------------------------------+----------------+\r\n"
+ "|00000000| cb 00 00 00 03 53 45 54 20 61 75 74 6f 63 6f 6d |.....SET autocom|\r\n"
+ "|00000010| 6d 69 74 3d 31 2c 74 72 61 6e 73 61 63 74 69 6f |mit=1,transactio|\r\n"
+ "|00000020| 6e 5f 69 73 6f 6c 61 74 69 6f 6e 3d 27 52 45 50 |n_isolation='REP|\r\n"
+ "|00000030| 45 41 54 41 42 4c 45 2d 52 45 41 44 27 2c 73 65 |EATABLE-READ',se|\r\n"
+ "|00000040| 73 73 69 6f 6e 5f 74 72 61 63 6b 5f 73 63 68 65 |ssion_track_sche|\r\n"
+ "|00000050| 6d 61 3d 31 2c 73 65 73 73 69 6f 6e 5f 74 72 61 |ma=1,session_tra|\r\n"
+ "|00000060| 63 6b 5f 73 79 73 74 65 6d 5f 76 61 72 69 61 62 |ck_system_variab|\r\n"
+ "|00000070| 6c 65 73 3d 43 4f 4e 43 41 54 28 40 40 73 65 73 |les=CONCAT(@@ses|\r\n"
+ "|00000080| 73 69 6f 6e 5f 74 72 61 63 6b 5f 73 79 73 74 65 |sion_track_syste|\r\n"
+ "|00000090| 6d 5f 76 61 72 69 61 62 6c 65 73 2c 27 2c 61 75 |m_variables,',au|\r\n"
+ "|000000a0| 74 6f 63 6f 6d 6d 69 74 2c 74 72 61 6e 73 61 63 |tocommit,transac|\r\n"
+ "|000000b0| 74 69 6f 6e 5f 69 73 6f 6c 61 74 69 6f 6e 27 29 |tion_isolation')|\r\n"
+ "|000000c0| 2c 20 6e 61 6d 65 73 20 55 54 46 38 4d 42 34 |, names UTF8MB4 |\r\n"
+ "+--------+-------------------------------------------------+----------------+";
String mysqlIsolation =
" +-------------------------------------------------+\r\n" +
" | 0 1 2 3 4 5 6 7 8 9 a b c d e f |\r\n" +
"+--------+-------------------------------------------------+----------------+\r\n" +
"|00000000| c0 00 00 00 03 53 45 54 20 61 75 74 6f 63 6f 6d |.....SET autocom|\r\n" +
"|00000010| 6d 69 74 3d 31 2c 74 72 61 6e 73 61 63 74 69 6f |mit=1,transactio|\r\n" +
"|00000020| 6e 5f 69 73 6f 6c 61 74 69 6f 6e 3d 27 52 45 50 |n_isolation='REP|\r\n" +
"|00000030| 45 41 54 41 42 4c 45 2d 52 45 41 44 27 2c 73 65 |EATABLE-READ',se|\r\n" +
"|00000040| 73 73 69 6f 6e 5f 74 72 61 63 6b 5f 73 63 68 65 |ssion_track_sche|\r\n" +
"|00000050| 6d 61 3d 31 2c 73 65 73 73 69 6f 6e 5f 74 72 61 |ma=1,session_tra|\r\n" +
"|00000060| 63 6b 5f 73 79 73 74 65 6d 5f 76 61 72 69 61 62 |ck_system_variab|\r\n" +
"|00000070| 6c 65 73 3d 43 4f 4e 43 41 54 28 40 40 73 65 73 |les=CONCAT(@@ses|\r\n" +
"|00000080| 73 69 6f 6e 5f 74 72 61 63 6b 5f 73 79 73 74 65 |sion_track_syste|\r\n" +
"|00000090| 6d 5f 76 61 72 69 61 62 6c 65 73 2c 27 2c 74 72 |m_variables,',tr|\r\n" +
"|000000a0| 61 6e 73 61 63 74 69 6f 6e 5f 69 73 6f 6c 61 74 |ansaction_isolat|\r\n" +
"|000000b0| 69 6f 6e 27 29 2c 20 6e 61 6d 65 73 20 55 54 46 |ion'), names UTF|\r\n" +
"|000000c0| 38 4d 42 34 |8MB4 |\r\n" +
"+--------+-------------------------------------------------+----------------+";
if ((meta.isMariaDBServer() && !meta.minVersion(11, 1, 1))
|| (meta.getMajorVersion() < 8 && !meta.minVersion(5, 7, 20))
|| (meta.getMajorVersion() >= 8 && !meta.minVersion(8, 0, 3))) {
Assertions.assertTrue(
contents.contains(selectIsolation)
|| contents.contains(selectIsolation.replace("\r\n", "\n")),
contents);
} else if (meta.isMariaDBServer()) {
Assertions.assertTrue(
contents.contains(transactionIsolation)
|| contents.contains(transactionIsolation.replace("\r\n", "\n")),
contents);
} else {
Assertions.assertTrue(
contents.contains(mysqlIsolation)
|| contents.contains(mysqlIsolation.replace("\r\n", "\n")),
contents);
}

String selectOne =
" +-------------------------------------------------+\r\n"
+ " | 0 1 2 3 4 5 6 7 8 9 a b c d e f |\r\n"
+ "+--------+-------------------------------------------------+----------------+\r\n"
+ "|00000000| 09 00 00 00 03 53 45 4c 45 43 54 20 31 |.....SELECT 1 |\r\n"
+ "+--------+-------------------------------------------------+----------------+";
String contents = new String(Files.readAllBytes(Paths.get(tempFile.getPath())));
String selectIsolation =
" +-------------------------------------------------+\r\n"
+ " | 0 1 2 3 4 5 6 7 8 9 a b c d e f |\r\n"
+ "+--------+-------------------------------------------------+----------------+\r\n"
+ "|00000000| b9 00 00 00 03 53 45 54 20 61 75 74 6f 63 6f 6d |.....SET autocom|\r\n"
+ "|00000010| 6d 69 74 3d 31 2c 74 78 5f 69 73 6f 6c 61 74 69 |mit=1,tx_isolati|\r\n"
+ "|00000020| 6f 6e 3d 27 52 45 50 45 41 54 41 42 4c 45 2d 52 |on='REPEATABLE-R|\r\n"
+ "|00000030| 45 41 44 27 2c 73 65 73 73 69 6f 6e 5f 74 72 61 |EAD',session_tra|\r\n"
+ "|00000040| 63 6b 5f 73 63 68 65 6d 61 3d 31 2c 73 65 73 73 |ck_schema=1,sess|\r\n"
+ "|00000050| 69 6f 6e 5f 74 72 61 63 6b 5f 73 79 73 74 65 6d |ion_track_system|\r\n"
+ "|00000060| 5f 76 61 72 69 61 62 6c 65 73 3d 43 4f 4e 43 41 |_variables=CONCA|\r\n"
+ "|00000070| 54 28 40 40 73 65 73 73 69 6f 6e 5f 74 72 61 63 |T(@@session_trac|\r\n"
+ "|00000080| 6b 5f 73 79 73 74 65 6d 5f 76 61 72 69 61 62 6c |k_system_variabl|\r\n"
+ "|00000090| 65 73 2c 27 2c 61 75 74 6f 63 6f 6d 6d 69 74 2c |es,',autocommit,|\r\n"
+ "|000000a0| 74 78 5f 69 73 6f 6c 61 74 69 6f 6e 27 29 2c 20 |tx_isolation'), |\r\n"
+ "|000000b0| 6e 61 6d 65 73 20 55 54 46 38 4d 42 34 |names UTF8MB4 |\r\n"
+ "+--------+-------------------------------------------------+----------------+\r\n";
String transactionIsolation =
" +-------------------------------------------------+\r\n"
+ " | 0 1 2 3 4 5 6 7 8 9 a b c d e f |\r\n"
+ "+--------+-------------------------------------------------+----------------+\r\n"
+ "|00000000| cb 00 00 00 03 53 45 54 20 61 75 74 6f 63 6f 6d |.....SET autocom|\r\n"
+ "|00000010| 6d 69 74 3d 31 2c 74 72 61 6e 73 61 63 74 69 6f |mit=1,transactio|\r\n"
+ "|00000020| 6e 5f 69 73 6f 6c 61 74 69 6f 6e 3d 27 52 45 50 |n_isolation='REP|\r\n"
+ "|00000030| 45 41 54 41 42 4c 45 2d 52 45 41 44 27 2c 73 65 |EATABLE-READ',se|\r\n"
+ "|00000040| 73 73 69 6f 6e 5f 74 72 61 63 6b 5f 73 63 68 65 |ssion_track_sche|\r\n"
+ "|00000050| 6d 61 3d 31 2c 73 65 73 73 69 6f 6e 5f 74 72 61 |ma=1,session_tra|\r\n"
+ "|00000060| 63 6b 5f 73 79 73 74 65 6d 5f 76 61 72 69 61 62 |ck_system_variab|\r\n"
+ "|00000070| 6c 65 73 3d 43 4f 4e 43 41 54 28 40 40 73 65 73 |les=CONCAT(@@ses|\r\n"
+ "|00000080| 73 69 6f 6e 5f 74 72 61 63 6b 5f 73 79 73 74 65 |sion_track_syste|\r\n"
+ "|00000090| 6d 5f 76 61 72 69 61 62 6c 65 73 2c 27 2c 61 75 |m_variables,',au|\r\n"
+ "|000000a0| 74 6f 63 6f 6d 6d 69 74 2c 74 72 61 6e 73 61 63 |tocommit,transac|\r\n"
+ "|000000b0| 74 69 6f 6e 5f 69 73 6f 6c 61 74 69 6f 6e 27 29 |tion_isolation')|\r\n"
+ "|000000c0| 2c 20 6e 61 6d 65 73 20 55 54 46 38 4d 42 34 |, names UTF8MB4 |\r\n"
+ "+--------+-------------------------------------------------+----------------+";
String mysqlIsolation =
" +-------------------------------------------------+\r\n"
+ " | 0 1 2 3 4 5 6 7 8 9 a b c d e f |\r\n"
+ "+--------+-------------------------------------------------+----------------+\r\n"
+ "|00000000| c0 00 00 00 03 53 45 54 20 61 75 74 6f 63 6f 6d |.....SET autocom|\r\n"
+ "|00000010| 6d 69 74 3d 31 2c 74 72 61 6e 73 61 63 74 69 6f |mit=1,transactio|\r\n"
+ "|00000020| 6e 5f 69 73 6f 6c 61 74 69 6f 6e 3d 27 52 45 50 |n_isolation='REP|\r\n"
+ "|00000030| 45 41 54 41 42 4c 45 2d 52 45 41 44 27 2c 73 65 |EATABLE-READ',se|\r\n"
+ "|00000040| 73 73 69 6f 6e 5f 74 72 61 63 6b 5f 73 63 68 65 |ssion_track_sche|\r\n"
+ "|00000050| 6d 61 3d 31 2c 73 65 73 73 69 6f 6e 5f 74 72 61 |ma=1,session_tra|\r\n"
+ "|00000060| 63 6b 5f 73 79 73 74 65 6d 5f 76 61 72 69 61 62 |ck_system_variab|\r\n"
+ "|00000070| 6c 65 73 3d 43 4f 4e 43 41 54 28 40 40 73 65 73 |les=CONCAT(@@ses|\r\n"
+ "|00000080| 73 69 6f 6e 5f 74 72 61 63 6b 5f 73 79 73 74 65 |sion_track_syste|\r\n"
+ "|00000090| 6d 5f 76 61 72 69 61 62 6c 65 73 2c 27 2c 74 72 |m_variables,',tr|\r\n"
+ "|000000a0| 61 6e 73 61 63 74 69 6f 6e 5f 69 73 6f 6c 61 74 |ansaction_isolat|\r\n"
+ "|000000b0| 69 6f 6e 27 29 2c 20 6e 61 6d 65 73 20 55 54 46 |ion'), names UTF|\r\n"
+ "|000000c0| 38 4d 42 34 |8MB4 |\r\n"
+ "+--------+-------------------------------------------------+----------------+";
if ((meta.isMariaDBServer() && !meta.minVersion(11, 1, 1))
|| (meta.getMajorVersion() < 8 && !meta.minVersion(5, 7, 20))
|| (meta.getMajorVersion() >= 8 && !meta.minVersion(8, 0, 3))) {
Assertions.assertTrue(
contents.contains(selectIsolation)
|| contents.contains(selectIsolation.replace("\r\n", "\n")),
contents);
} else if (meta.isMariaDBServer()) {
Assertions.assertTrue(
contents.contains(transactionIsolation)
|| contents.contains(transactionIsolation.replace("\r\n", "\n")),
contents);
} else {
Assertions.assertTrue(
contents.contains(selectOne) || contents.contains(selectOne.replace("\r\n", "\n")));
logger.setLevel(initialLevel);
logger.detachAppender(fa);
logger.setAdditive(true);
contents.contains(mysqlIsolation)
|| contents.contains(mysqlIsolation.replace("\r\n", "\n")),
contents);
}

String selectOne =
" +-------------------------------------------------+\r\n"
+ " | 0 1 2 3 4 5 6 7 8 9 a b c d e f |\r\n"
+ "+--------+-------------------------------------------------+----------------+\r\n"
+ "|00000000| 09 00 00 00 03 53 45 4c 45 43 54 20 31 |.....SELECT 1 |\r\n"
+ "+--------+-------------------------------------------------+----------------+";
Assertions.assertTrue(
contents.contains(selectOne) || contents.contains(selectOne.replace("\r\n", "\n")));
logger.setLevel(initialLevel);
logger.detachAppender(fa);
logger.setAdditive(true);
}

public String encodeHexString(byte[] byteArray) {
Expand Down

0 comments on commit a41a630

Please sign in to comment.