Skip to content

Commit a41a630

Browse files
committed
bump 1.2.0 version
1 parent 6c8c634 commit a41a630

File tree

4 files changed

+107
-85
lines changed

4 files changed

+107
-85
lines changed

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
# Change Log
22

3+
## [1.2.0](https://github.com/mariadb-corporation/mariadb-connector-r2dbc/tree/1.2.0) (08 Feb 2024)
4+
5+
[Full Changelog](https://github.com/mariadb-corporation/mariadb-connector-r2dbc/compare/1.1.4...1.2.0)
6+
7+
Notable Changes:
8+
9+
* R2DBC-93 new timezone option
10+
* R2DBC-66 add support for connection redirection
11+
12+
Bugs Fixed:
13+
14+
* R2DBC-92 Properly end connection (in place of RST TCP packet)
15+
* R2DBC-86 Failover High availability mode "r2dbc:mariadb:[sequential|loadbalancing]://..." wrongly parsed
16+
* R2DBC-87 Compatibility with mariadb 11.1.1
17+
* R2DBC-88 java 8 compatibility regression
18+
* R2DBC-91 ensure respecting server collation
19+
* R2DBC-94 session tracking wrong implementation when multiple system variable changes
20+
21+
322
## [1.1.4](https://github.com/mariadb-corporation/mariadb-connector-r2dbc/tree/1.1.4) (16 Mar 2023)
423

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

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The MariaDB Connector is available through maven using :
3232
<dependency>
3333
<groupId>org.mariadb</groupId>
3434
<artifactId>r2dbc-mariadb</artifactId>
35-
<version>1.1.4</version>
35+
<version>1.2.0</version>
3636
</dependency>
3737
```
3838

@@ -114,6 +114,9 @@ Basic example:
114114
| **`loopResources`** | permits to share netty EventLoopGroup among multiple async libraries/framework | *LoopResources* | |
115115
| **`sslContextBuilderCustomizer`** | Permits to customized SSL context builder. | *UnaryOperator<SslContextBuilder>* | |
116116
| **`sslTunnelDisableHostVerification`** | Disable hostname verification during SSLHandshake when SslMode.TUNNEL is set | *boolean* | |
117+
| **`permitRedirect`** | Permit server redirection | *boolean* | true |
118+
| **`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' |
119+
117120

118121
## Failover
119122

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<modelVersion>4.0.0</modelVersion>
1212
<groupId>org.mariadb</groupId>
1313
<artifactId>r2dbc-mariadb</artifactId>
14-
<version>1.2.0-SNAPSHOT</version>
14+
<version>1.2.0</version>
1515
<packaging>jar</packaging>
1616
<url>https://github.com/mariadb-corporation/mariadb-connector-r2dbc</url>
1717

src/test/java/org/mariadb/r2dbc/integration/LoggingTest.java

Lines changed: 83 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -67,90 +67,90 @@ void basicLogging() throws IOException {
6767
MariadbConnectionMetadata meta = connection.getMetadata();
6868
connection.close().block();
6969

70-
String contents = new String(Files.readAllBytes(Paths.get(tempFile.getPath())));
71-
String selectIsolation =
72-
" +-------------------------------------------------+\r\n"+
73-
" | 0 1 2 3 4 5 6 7 8 9 a b c d e f |\r\n"+
74-
"+--------+-------------------------------------------------+----------------+\r\n"+
75-
"|00000000| b9 00 00 00 03 53 45 54 20 61 75 74 6f 63 6f 6d |.....SET autocom|\r\n"+
76-
"|00000010| 6d 69 74 3d 31 2c 74 78 5f 69 73 6f 6c 61 74 69 |mit=1,tx_isolati|\r\n"+
77-
"|00000020| 6f 6e 3d 27 52 45 50 45 41 54 41 42 4c 45 2d 52 |on='REPEATABLE-R|\r\n"+
78-
"|00000030| 45 41 44 27 2c 73 65 73 73 69 6f 6e 5f 74 72 61 |EAD',session_tra|\r\n"+
79-
"|00000040| 63 6b 5f 73 63 68 65 6d 61 3d 31 2c 73 65 73 73 |ck_schema=1,sess|\r\n"+
80-
"|00000050| 69 6f 6e 5f 74 72 61 63 6b 5f 73 79 73 74 65 6d |ion_track_system|\r\n"+
81-
"|00000060| 5f 76 61 72 69 61 62 6c 65 73 3d 43 4f 4e 43 41 |_variables=CONCA|\r\n"+
82-
"|00000070| 54 28 40 40 73 65 73 73 69 6f 6e 5f 74 72 61 63 |T(@@session_trac|\r\n"+
83-
"|00000080| 6b 5f 73 79 73 74 65 6d 5f 76 61 72 69 61 62 6c |k_system_variabl|\r\n"+
84-
"|00000090| 65 73 2c 27 2c 61 75 74 6f 63 6f 6d 6d 69 74 2c |es,',autocommit,|\r\n"+
85-
"|000000a0| 74 78 5f 69 73 6f 6c 61 74 69 6f 6e 27 29 2c 20 |tx_isolation'), |\r\n"+
86-
"|000000b0| 6e 61 6d 65 73 20 55 54 46 38 4d 42 34 |names UTF8MB4 |\r\n"+
87-
"+--------+-------------------------------------------------+----------------+\r\n";
88-
String transactionIsolation =
89-
" +-------------------------------------------------+\r\n"
90-
+ " | 0 1 2 3 4 5 6 7 8 9 a b c d e f |\r\n"
91-
+ "+--------+-------------------------------------------------+----------------+\r\n"
92-
+ "|00000000| cb 00 00 00 03 53 45 54 20 61 75 74 6f 63 6f 6d |.....SET autocom|\r\n"
93-
+ "|00000010| 6d 69 74 3d 31 2c 74 72 61 6e 73 61 63 74 69 6f |mit=1,transactio|\r\n"
94-
+ "|00000020| 6e 5f 69 73 6f 6c 61 74 69 6f 6e 3d 27 52 45 50 |n_isolation='REP|\r\n"
95-
+ "|00000030| 45 41 54 41 42 4c 45 2d 52 45 41 44 27 2c 73 65 |EATABLE-READ',se|\r\n"
96-
+ "|00000040| 73 73 69 6f 6e 5f 74 72 61 63 6b 5f 73 63 68 65 |ssion_track_sche|\r\n"
97-
+ "|00000050| 6d 61 3d 31 2c 73 65 73 73 69 6f 6e 5f 74 72 61 |ma=1,session_tra|\r\n"
98-
+ "|00000060| 63 6b 5f 73 79 73 74 65 6d 5f 76 61 72 69 61 62 |ck_system_variab|\r\n"
99-
+ "|00000070| 6c 65 73 3d 43 4f 4e 43 41 54 28 40 40 73 65 73 |les=CONCAT(@@ses|\r\n"
100-
+ "|00000080| 73 69 6f 6e 5f 74 72 61 63 6b 5f 73 79 73 74 65 |sion_track_syste|\r\n"
101-
+ "|00000090| 6d 5f 76 61 72 69 61 62 6c 65 73 2c 27 2c 61 75 |m_variables,',au|\r\n"
102-
+ "|000000a0| 74 6f 63 6f 6d 6d 69 74 2c 74 72 61 6e 73 61 63 |tocommit,transac|\r\n"
103-
+ "|000000b0| 74 69 6f 6e 5f 69 73 6f 6c 61 74 69 6f 6e 27 29 |tion_isolation')|\r\n"
104-
+ "|000000c0| 2c 20 6e 61 6d 65 73 20 55 54 46 38 4d 42 34 |, names UTF8MB4 |\r\n"
105-
+ "+--------+-------------------------------------------------+----------------+";
106-
String mysqlIsolation =
107-
" +-------------------------------------------------+\r\n" +
108-
" | 0 1 2 3 4 5 6 7 8 9 a b c d e f |\r\n" +
109-
"+--------+-------------------------------------------------+----------------+\r\n" +
110-
"|00000000| c0 00 00 00 03 53 45 54 20 61 75 74 6f 63 6f 6d |.....SET autocom|\r\n" +
111-
"|00000010| 6d 69 74 3d 31 2c 74 72 61 6e 73 61 63 74 69 6f |mit=1,transactio|\r\n" +
112-
"|00000020| 6e 5f 69 73 6f 6c 61 74 69 6f 6e 3d 27 52 45 50 |n_isolation='REP|\r\n" +
113-
"|00000030| 45 41 54 41 42 4c 45 2d 52 45 41 44 27 2c 73 65 |EATABLE-READ',se|\r\n" +
114-
"|00000040| 73 73 69 6f 6e 5f 74 72 61 63 6b 5f 73 63 68 65 |ssion_track_sche|\r\n" +
115-
"|00000050| 6d 61 3d 31 2c 73 65 73 73 69 6f 6e 5f 74 72 61 |ma=1,session_tra|\r\n" +
116-
"|00000060| 63 6b 5f 73 79 73 74 65 6d 5f 76 61 72 69 61 62 |ck_system_variab|\r\n" +
117-
"|00000070| 6c 65 73 3d 43 4f 4e 43 41 54 28 40 40 73 65 73 |les=CONCAT(@@ses|\r\n" +
118-
"|00000080| 73 69 6f 6e 5f 74 72 61 63 6b 5f 73 79 73 74 65 |sion_track_syste|\r\n" +
119-
"|00000090| 6d 5f 76 61 72 69 61 62 6c 65 73 2c 27 2c 74 72 |m_variables,',tr|\r\n" +
120-
"|000000a0| 61 6e 73 61 63 74 69 6f 6e 5f 69 73 6f 6c 61 74 |ansaction_isolat|\r\n" +
121-
"|000000b0| 69 6f 6e 27 29 2c 20 6e 61 6d 65 73 20 55 54 46 |ion'), names UTF|\r\n" +
122-
"|000000c0| 38 4d 42 34 |8MB4 |\r\n" +
123-
"+--------+-------------------------------------------------+----------------+";
124-
if ((meta.isMariaDBServer() && !meta.minVersion(11, 1, 1))
125-
|| (meta.getMajorVersion() < 8 && !meta.minVersion(5, 7, 20))
126-
|| (meta.getMajorVersion() >= 8 && !meta.minVersion(8, 0, 3))) {
127-
Assertions.assertTrue(
128-
contents.contains(selectIsolation)
129-
|| contents.contains(selectIsolation.replace("\r\n", "\n")),
130-
contents);
131-
} else if (meta.isMariaDBServer()) {
132-
Assertions.assertTrue(
133-
contents.contains(transactionIsolation)
134-
|| contents.contains(transactionIsolation.replace("\r\n", "\n")),
135-
contents);
136-
} else {
137-
Assertions.assertTrue(
138-
contents.contains(mysqlIsolation)
139-
|| contents.contains(mysqlIsolation.replace("\r\n", "\n")),
140-
contents);
141-
}
142-
143-
String selectOne =
144-
" +-------------------------------------------------+\r\n"
145-
+ " | 0 1 2 3 4 5 6 7 8 9 a b c d e f |\r\n"
146-
+ "+--------+-------------------------------------------------+----------------+\r\n"
147-
+ "|00000000| 09 00 00 00 03 53 45 4c 45 43 54 20 31 |.....SELECT 1 |\r\n"
148-
+ "+--------+-------------------------------------------------+----------------+";
70+
String contents = new String(Files.readAllBytes(Paths.get(tempFile.getPath())));
71+
String selectIsolation =
72+
" +-------------------------------------------------+\r\n"
73+
+ " | 0 1 2 3 4 5 6 7 8 9 a b c d e f |\r\n"
74+
+ "+--------+-------------------------------------------------+----------------+\r\n"
75+
+ "|00000000| b9 00 00 00 03 53 45 54 20 61 75 74 6f 63 6f 6d |.....SET autocom|\r\n"
76+
+ "|00000010| 6d 69 74 3d 31 2c 74 78 5f 69 73 6f 6c 61 74 69 |mit=1,tx_isolati|\r\n"
77+
+ "|00000020| 6f 6e 3d 27 52 45 50 45 41 54 41 42 4c 45 2d 52 |on='REPEATABLE-R|\r\n"
78+
+ "|00000030| 45 41 44 27 2c 73 65 73 73 69 6f 6e 5f 74 72 61 |EAD',session_tra|\r\n"
79+
+ "|00000040| 63 6b 5f 73 63 68 65 6d 61 3d 31 2c 73 65 73 73 |ck_schema=1,sess|\r\n"
80+
+ "|00000050| 69 6f 6e 5f 74 72 61 63 6b 5f 73 79 73 74 65 6d |ion_track_system|\r\n"
81+
+ "|00000060| 5f 76 61 72 69 61 62 6c 65 73 3d 43 4f 4e 43 41 |_variables=CONCA|\r\n"
82+
+ "|00000070| 54 28 40 40 73 65 73 73 69 6f 6e 5f 74 72 61 63 |T(@@session_trac|\r\n"
83+
+ "|00000080| 6b 5f 73 79 73 74 65 6d 5f 76 61 72 69 61 62 6c |k_system_variabl|\r\n"
84+
+ "|00000090| 65 73 2c 27 2c 61 75 74 6f 63 6f 6d 6d 69 74 2c |es,',autocommit,|\r\n"
85+
+ "|000000a0| 74 78 5f 69 73 6f 6c 61 74 69 6f 6e 27 29 2c 20 |tx_isolation'), |\r\n"
86+
+ "|000000b0| 6e 61 6d 65 73 20 55 54 46 38 4d 42 34 |names UTF8MB4 |\r\n"
87+
+ "+--------+-------------------------------------------------+----------------+\r\n";
88+
String transactionIsolation =
89+
" +-------------------------------------------------+\r\n"
90+
+ " | 0 1 2 3 4 5 6 7 8 9 a b c d e f |\r\n"
91+
+ "+--------+-------------------------------------------------+----------------+\r\n"
92+
+ "|00000000| cb 00 00 00 03 53 45 54 20 61 75 74 6f 63 6f 6d |.....SET autocom|\r\n"
93+
+ "|00000010| 6d 69 74 3d 31 2c 74 72 61 6e 73 61 63 74 69 6f |mit=1,transactio|\r\n"
94+
+ "|00000020| 6e 5f 69 73 6f 6c 61 74 69 6f 6e 3d 27 52 45 50 |n_isolation='REP|\r\n"
95+
+ "|00000030| 45 41 54 41 42 4c 45 2d 52 45 41 44 27 2c 73 65 |EATABLE-READ',se|\r\n"
96+
+ "|00000040| 73 73 69 6f 6e 5f 74 72 61 63 6b 5f 73 63 68 65 |ssion_track_sche|\r\n"
97+
+ "|00000050| 6d 61 3d 31 2c 73 65 73 73 69 6f 6e 5f 74 72 61 |ma=1,session_tra|\r\n"
98+
+ "|00000060| 63 6b 5f 73 79 73 74 65 6d 5f 76 61 72 69 61 62 |ck_system_variab|\r\n"
99+
+ "|00000070| 6c 65 73 3d 43 4f 4e 43 41 54 28 40 40 73 65 73 |les=CONCAT(@@ses|\r\n"
100+
+ "|00000080| 73 69 6f 6e 5f 74 72 61 63 6b 5f 73 79 73 74 65 |sion_track_syste|\r\n"
101+
+ "|00000090| 6d 5f 76 61 72 69 61 62 6c 65 73 2c 27 2c 61 75 |m_variables,',au|\r\n"
102+
+ "|000000a0| 74 6f 63 6f 6d 6d 69 74 2c 74 72 61 6e 73 61 63 |tocommit,transac|\r\n"
103+
+ "|000000b0| 74 69 6f 6e 5f 69 73 6f 6c 61 74 69 6f 6e 27 29 |tion_isolation')|\r\n"
104+
+ "|000000c0| 2c 20 6e 61 6d 65 73 20 55 54 46 38 4d 42 34 |, names UTF8MB4 |\r\n"
105+
+ "+--------+-------------------------------------------------+----------------+";
106+
String mysqlIsolation =
107+
" +-------------------------------------------------+\r\n"
108+
+ " | 0 1 2 3 4 5 6 7 8 9 a b c d e f |\r\n"
109+
+ "+--------+-------------------------------------------------+----------------+\r\n"
110+
+ "|00000000| c0 00 00 00 03 53 45 54 20 61 75 74 6f 63 6f 6d |.....SET autocom|\r\n"
111+
+ "|00000010| 6d 69 74 3d 31 2c 74 72 61 6e 73 61 63 74 69 6f |mit=1,transactio|\r\n"
112+
+ "|00000020| 6e 5f 69 73 6f 6c 61 74 69 6f 6e 3d 27 52 45 50 |n_isolation='REP|\r\n"
113+
+ "|00000030| 45 41 54 41 42 4c 45 2d 52 45 41 44 27 2c 73 65 |EATABLE-READ',se|\r\n"
114+
+ "|00000040| 73 73 69 6f 6e 5f 74 72 61 63 6b 5f 73 63 68 65 |ssion_track_sche|\r\n"
115+
+ "|00000050| 6d 61 3d 31 2c 73 65 73 73 69 6f 6e 5f 74 72 61 |ma=1,session_tra|\r\n"
116+
+ "|00000060| 63 6b 5f 73 79 73 74 65 6d 5f 76 61 72 69 61 62 |ck_system_variab|\r\n"
117+
+ "|00000070| 6c 65 73 3d 43 4f 4e 43 41 54 28 40 40 73 65 73 |les=CONCAT(@@ses|\r\n"
118+
+ "|00000080| 73 69 6f 6e 5f 74 72 61 63 6b 5f 73 79 73 74 65 |sion_track_syste|\r\n"
119+
+ "|00000090| 6d 5f 76 61 72 69 61 62 6c 65 73 2c 27 2c 74 72 |m_variables,',tr|\r\n"
120+
+ "|000000a0| 61 6e 73 61 63 74 69 6f 6e 5f 69 73 6f 6c 61 74 |ansaction_isolat|\r\n"
121+
+ "|000000b0| 69 6f 6e 27 29 2c 20 6e 61 6d 65 73 20 55 54 46 |ion'), names UTF|\r\n"
122+
+ "|000000c0| 38 4d 42 34 |8MB4 |\r\n"
123+
+ "+--------+-------------------------------------------------+----------------+";
124+
if ((meta.isMariaDBServer() && !meta.minVersion(11, 1, 1))
125+
|| (meta.getMajorVersion() < 8 && !meta.minVersion(5, 7, 20))
126+
|| (meta.getMajorVersion() >= 8 && !meta.minVersion(8, 0, 3))) {
127+
Assertions.assertTrue(
128+
contents.contains(selectIsolation)
129+
|| contents.contains(selectIsolation.replace("\r\n", "\n")),
130+
contents);
131+
} else if (meta.isMariaDBServer()) {
132+
Assertions.assertTrue(
133+
contents.contains(transactionIsolation)
134+
|| contents.contains(transactionIsolation.replace("\r\n", "\n")),
135+
contents);
136+
} else {
149137
Assertions.assertTrue(
150-
contents.contains(selectOne) || contents.contains(selectOne.replace("\r\n", "\n")));
151-
logger.setLevel(initialLevel);
152-
logger.detachAppender(fa);
153-
logger.setAdditive(true);
138+
contents.contains(mysqlIsolation)
139+
|| contents.contains(mysqlIsolation.replace("\r\n", "\n")),
140+
contents);
141+
}
142+
143+
String selectOne =
144+
" +-------------------------------------------------+\r\n"
145+
+ " | 0 1 2 3 4 5 6 7 8 9 a b c d e f |\r\n"
146+
+ "+--------+-------------------------------------------------+----------------+\r\n"
147+
+ "|00000000| 09 00 00 00 03 53 45 4c 45 43 54 20 31 |.....SELECT 1 |\r\n"
148+
+ "+--------+-------------------------------------------------+----------------+";
149+
Assertions.assertTrue(
150+
contents.contains(selectOne) || contents.contains(selectOne.replace("\r\n", "\n")));
151+
logger.setLevel(initialLevel);
152+
logger.detachAppender(fa);
153+
logger.setAdditive(true);
154154
}
155155

156156
public String encodeHexString(byte[] byteArray) {

0 commit comments

Comments
 (0)