Skip to content

Commit 5fab63c

Browse files
committed
Merge branch 'release/1.0.2'
2 parents d8dcd72 + 4fa0d52 commit 5fab63c

File tree

203 files changed

+3726
-3997
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

203 files changed

+3726
-3997
lines changed

.travis.yml

Lines changed: 31 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
os: linux
2+
dist: focal
23
language: java
34
services: docker
45
jdk: openjdk11
56
addons:
67
hosts:
78
- mariadb.example.com
9+
- mariadb2.example.com
810

911
before_install:
1012
- git clone https://github.com/mariadb-corporation/connector-test-machine.git
11-
13+
env: packet=40
1214
install:
1315
- |-
1416
case $TRAVIS_OS_NAME in
@@ -18,39 +20,50 @@ install:
1820
connector-test-machine/launch.bat -t "$srv" -v "$v" -d testr2
1921
;;
2022
linux)
21-
source connector-test-machine/launch.sh -t "$srv" -v "$v" -d testr2
23+
source connector-test-machine/launch.sh -t "$srv" -v "$v" -d testr2 -n 0 -l "$local" -p "$packet"
2224
;;
2325
esac
2426
2527
jobs:
2628
fast_finish: true
2729
allow_failures:
28-
- env: srv=skysql
29-
- env: srv=skysql-ha
30-
- env: srv=mariadb-es v=10.5
30+
- env: srv=build v=10.6
3131
include:
3232
- env: srv=mariadb v=10.5
3333
os: windows
3434
language: shell
35-
- env: srv=mariadb v=10.2
36-
- env: srv=mariadb v=10.3
37-
- env: srv=mariadb v=10.4
38-
- env: srv=mariadb v=10.5
35+
- env: srv=mariadb v=10.2 local=1 packet=20
36+
dist: bionic
37+
- env: srv=mariadb v=10.3 local=1
38+
- env: srv=mariadb v=10.4 local=1
39+
- env: srv=mariadb v=10.5 local=1
40+
- env: srv=mariadb v=10.5 local=1
41+
jdk: openjdk8
42+
dist: bionic
43+
- env: srv=mariadb v=10.6 local=1
3944
- env: srv=mariadb v=10.5 NO_BACKSLASH_ESCAPES=true
40-
- env: srv=mariadb v=10.5 BENCH=1
41-
- env: srv=maxscale
42-
- env: srv=skysql
43-
- env: srv=skysql-ha
44-
- env: srv=build v=10.6
45-
- env: srv=mysql v=5.7
46-
- env: srv=mysql v=8.0
45+
- env: srv=mariadb v=10.6 BENCH=1
46+
- if: env(CONNECTOR_TEST_SECRET_KEY)
47+
env: srv=maxscale
48+
- if: env(CONNECTOR_TEST_SECRET_KEY)
49+
env: srv=mariadb-es v=10.5
50+
- if: env(CONNECTOR_TEST_SECRET_KEY)
51+
env: srv=skysql
52+
- if: env(CONNECTOR_TEST_SECRET_KEY)
53+
env: srv=skysql-ha
54+
- if: env(CONNECTOR_TEST_SECRET_KEY)
55+
env: srv=build v=10.6
56+
- if: env(CONNECTOR_TEST_SECRET_KEY)
57+
env: srv=mysql v=5.7
58+
- if: env(CONNECTOR_TEST_SECRET_KEY)
59+
env: srv=mysql v=8.0
4760

4861
script:
4962
- mvn clean -Dmaven.test.skip > /dev/null
5063
- if [ -n "$BENCH" ] ; then mvn package -P bench -Dmaven.test.skip; fi
5164
- if [ -n "$BENCH" ] ; then java -Duser.country=US -Duser.language=en -DTEST_PORT=$TEST_DB_PORT -DTEST_HOST=$TEST_DB_HOST -DTEST_USERNAME=$TEST_DB_USER -DTEST_PASSWORD=$TEST_DB_PASSWORD -jar target/benchmarks.jar; fi
52-
- if [ -z "$BENCH" ] ; then MAVEN_SKIP_RC=true MAVEN_OPTS="-Xmx2g -XX:MaxPermSize=512m" mvn test -DjobId=${TRAVIS_JOB_ID}; fi
65+
- if [ -z "$BENCH" ] ; then MAVEN_SKIP_RC=true MAVEN_OPTS="-Xmx2g -XX:MaxPermSize=512m" mvn test -P continuous-integration -DjobId=${TRAVIS_JOB_ID}; fi
5366

5467

55-
after_success:
68+
after_script:
5669
- bash <(curl -s https://codecov.io/bash)

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
11
# Change Log
2+
## [1.0.2](https://github.com/mariadb-corporation/mariadb-connector-r2dbc/tree/1.0.2) (02 Jul 2021)
3+
[Full Changelog](https://github.com/mariadb-corporation/mariadb-connector-r2dbc/compare/1.0.1...1.0.2)
4+
5+
Corrections:
6+
* [R2DBC-24] columns of type Bit(1)/TINYINT(1) now convert as Boolean (new option `tinyInt1isBit`)
7+
* [R2DBC-25] Statement::add correction after specification precision
8+
* [R2DBC-26] handle error like 'too many connection" on socket creation
9+
* [R2DBC-27] Options not parsed from connection string
10+
* [R2DBC-28] mutual authentication not done when using ssl TRUST option
11+
* [R2DBC-29] improve coverage to reaching 90%
12+
* [R2DBC-30] Native Password plugin error
13+
214
## [1.0.1](https://github.com/mariadb-corporation/mariadb-connector-r2dbc/tree/1.0.1) (09 Mar 2021)
315
[Full Changelog](https://github.com/mariadb-corporation/mariadb-connector-r2dbc/compare/1.0.0...1.0.1)
416

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
[![Maven Central][maven-image]][maven-url]
1010
[![Test Build][travis-image]][travis-url]
1111
[![License][license-image]][license-url]
12-
12+
[![codecov][codecov-image]][codecov-url]
1313

1414
**Non-blocking MariaDB and MySQL client.**
1515

@@ -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.0.0</version>
35+
<version>1.0.2</version>
3636
</dependency>
3737
```
3838

@@ -67,7 +67,8 @@ Basic example:
6767
MariadbConnectionFactory factory = new MariadbConnectionFactory(conf);
6868

6969
MariadbConnection connection = factory.create().block();
70-
connection.createStatement("SELECT * FROM myTable")
70+
connection.createStatement("SELECT * FROM myTable WHERE val = ?")
71+
.bind(0, "myVal") // setting parameter
7172
.execute()
7273
.flatMap(r -> r.map((row, metadata) -> {
7374
return "value=" + row.get(0, String.class);
@@ -97,7 +98,7 @@ Basic example:
9798
| **`clientSslCert`** | Permits providing client's certificate in DER form (use only for mutual authentication). Can be used in one of 3 forms : <ul><li>clientSslCert=/path/to/cert.pem (full path to certificate)</li><li> clientSslCert=classpath:relative/cert.pem (relative to current classpath)</li><li> as verbatim DER-encoded certificate string "------BEGIN CERTIFICATE-----"</li></ul> |*String*| |
9899
| **`clientSslKey`** | client private key path(for mutual authentication) |*String* | |
99100
| **`clientSslPassword`** | client private key password |*charsequence* | |
100-
| **`sslMode`** | ssl requirement. Possible value are <ul><li>DISABLED, // NO SSL</li><li>ENABLE_TRUST, // Encryption, but no certificate and hostname validation (DEVELOPMENT ONLY)</li><li>ENABLE_WITHOUT_HOSTNAME_VERIFICATION, // Encryption, certificates validation, BUT no hostname validation</li><li>ENABLE, // Standard SSL use: Encryption, certificate validation and hostname validation</li></ul> | SslMode |DISABLED|
101+
| **`sslMode`** | ssl requirement. Possible value are <ul><li>DISABLE, // NO SSL</li><li>TRUST, // Encryption, but no certificate and hostname validation (DEVELOPMENT ONLY)</li><li>VERIFY_CA, // Encryption, certificates validation, BUT no hostname validation</li><li>VERIFY_FULL, // Standard SSL use: Encryption, certificate validation and hostname validation</li></ul> | SslMode |DISABLE|
101102
| **`rsaPublicKey`** | <i>only for MySQL server</i><br/> Server RSA public key, for SHA256 authentication |*String* | |
102103
| **`cachingRsaPublicKey`** | <i>only for MySQL server</i><br/> Server caching RSA public key, for cachingSHA256 authentication |*String* | |
103104
| **`allowPublicKeyRetrieval`** | <i>only for MySQL server</i><br/> Permit retrieved Server RSA public key from server. This can create a security issue |*boolean* | true |
@@ -106,6 +107,7 @@ Basic example:
106107
| **`prepareCacheSize`** | if useServerPrepStmts = true, cache the prepared informations in a LRU cache to avoid re-preparation of command. Next use of that command, only prepared identifier and parameters (if any) will be sent to server. This mainly permit for server to avoid reparsing query. |*int* |256 |
107108
| **`pamOtherPwd`** | Permit to provide additional password for PAM authentication with multiple authentication step. If multiple passwords, value must be URL encoded.|*string* | |
108109
| **`autocommit`** | Set default autocommit value on connection initialization" |*boolean* | true |
110+
| **`tinyInt1isBit`** | Convert Bit(1)/TINYINT(1) default to boolean type |*boolean* | true |
109111

110112
## Roadmap
111113

@@ -126,3 +128,5 @@ To file an issue or follow the development, see [JIRA](https://jira.mariadb.org/
126128
[maven-url]:https://maven-badges.herokuapp.com/maven-central/org.mariadb/r2dbc-mariadb
127129
[license-image]:https://img.shields.io/badge/License-Apache%202.0-blue.svg
128130
[license-url]:https://opensource.org/licenses/Apache-2.0
131+
[codecov-image]:https://codecov.io/gh/mariadb-corporation/mariadb-connector-r2dbc/branch/master/graph/badge.svg?token=8fIhax7q23
132+
[codecov-url]:https://codecov.io/gh/mariadb-corporation/mariadb-connector-r2dbc

codecov.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
comment: off
2+
codecov:
3+
token: 4e71e90c-99a8-40b8-b69c-181457ec4861
4+
ignore:
5+
- "src/main/java/org/mariadb/r2dbc/authentication/ed25519/**/*"

intellij-style.xml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
11
<!--
2-
~ Copyright 2020 MariaDB Ab.
3-
~
4-
~ Licensed under the Apache License, Version 2.0 (the "License");
5-
~ you may not use this file except in compliance with the License.
6-
~ You may obtain a copy of the License at
7-
~
8-
~ http://www.apache.org/licenses/LICENSE-2.0
9-
~
10-
~ Unless required by applicable law or agreed to in writing, software
11-
~ distributed under the License is distributed on an "AS IS" BASIS,
12-
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
~ See the License for the specific language governing permissions and
14-
~ limitations under the License.
2+
~ SPDX-License-Identifier: Apache-2.0
3+
~ Copyright (c) 2020-2021 MariaDB Corporation Ab
154
-->
165

176
<code_scheme name="Project" version="173">

pom.xml

Lines changed: 42 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,6 @@
11
<!--
2-
~ Copyright 2020 MariaDB Ab.
3-
~
4-
~ Licensed under the Apache License, Version 2.0 (the "License");
5-
~ you may not use this file except in compliance with the License.
6-
~ You may obtain a copy of the License at
7-
~
8-
~ http://www.apache.org/licenses/LICENSE-2.0
9-
~
10-
~ Unless required by applicable law or agreed to in writing, software
11-
~ distributed under the License is distributed on an "AS IS" BASIS,
12-
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
~ See the License for the specific language governing permissions and
14-
~ limitations under the License.
2+
~ SPDX-License-Identifier: Apache-2.0
3+
~ Copyright (c) 2020-2021 MariaDB Corporation Ab
154
-->
165

176
<project
@@ -22,7 +11,7 @@
2211
<modelVersion>4.0.0</modelVersion>
2312
<groupId>org.mariadb</groupId>
2413
<artifactId>r2dbc-mariadb</artifactId>
25-
<version>1.0.1</version>
14+
<version>1.0.2</version>
2615
<packaging>jar</packaging>
2716
<url>https://github.com/mariadb-corporation/mariadb-connector-r2dbc</url>
2817

@@ -32,15 +21,14 @@
3221
<properties>
3322
<java.version>1.8</java.version>
3423
<jsr305.version>3.0.2</jsr305.version>
35-
<junit.version>5.7.1</junit.version>
36-
<jmh.version>1.27</jmh.version>
24+
<junit.version>5.7.2</junit.version>
25+
<jmh.version>1.32</jmh.version>
3726
<logback.version>1.2.3</logback.version>
38-
<netty.version>4.1.59.Final</netty.version>
27+
<netty.version>4.1.65.Final</netty.version>
3928
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
40-
<r2dbc-spi.version>0.8.4.RELEASE</r2dbc-spi.version>
41-
<reactor.version>Dysprosium-SR17</reactor.version>
42-
<mariadb-jdbc.version>2.6.1</mariadb-jdbc.version>
43-
<r2dbc-mysql.version>0.8.2.RELEASE</r2dbc-mysql.version>
29+
<r2dbc-spi.version>0.8.5.RELEASE</r2dbc-spi.version>
30+
<reactor.version>Dysprosium-SR21</reactor.version>
31+
<mariadb-jdbc.version>3.0.0-alpha</mariadb-jdbc.version>
4432
<uberjar.name>benchmarks</uberjar.name>
4533
</properties>
4634

@@ -172,31 +160,6 @@
172160

173161
<build>
174162
<plugins>
175-
<plugin>
176-
<groupId>org.jacoco</groupId>
177-
<artifactId>jacoco-maven-plugin</artifactId>
178-
<version>0.8.5</version>
179-
<configuration>
180-
<includes>
181-
<include>org/mariadb/r2dbc</include>
182-
<include>org/mariadb/r2dbc/**</include>
183-
</includes>
184-
</configuration>
185-
<executions>
186-
<execution>
187-
<goals>
188-
<goal>prepare-agent</goal>
189-
</goals>
190-
</execution>
191-
<execution>
192-
<id>report</id>
193-
<phase>test</phase>
194-
<goals>
195-
<goal>report</goal>
196-
</goals>
197-
</execution>
198-
</executions>
199-
</plugin>
200163
<plugin>
201164
<groupId>org.apache.maven.plugins</groupId>
202165
<artifactId>maven-compiler-plugin</artifactId>
@@ -262,9 +225,8 @@
262225
<plugin>
263226
<groupId>org.apache.maven.plugins</groupId>
264227
<artifactId>maven-surefire-plugin</artifactId>
265-
<version>2.22.2</version>
228+
<version>3.0.0-M5</version>
266229
<configuration>
267-
<argLine>-Xmx1024m</argLine>
268230
<systemPropertyVariables>
269231
<io.netty.leakDetectionLevel>paranoid</io.netty.leakDetectionLevel>
270232
<!-- <io.netty.leakDetection.targetRecords>1</io.netty.leakDetection.targetRecords>-->
@@ -303,7 +265,7 @@
303265
<plugin>
304266
<groupId>com.coveo</groupId>
305267
<artifactId>fmt-maven-plugin</artifactId>
306-
<version>2.9</version>
268+
<version>2.9.1</version>
307269
<executions>
308270
<execution>
309271
<goals>
@@ -337,6 +299,37 @@
337299
<activeByDefault>true</activeByDefault>
338300
</activation>
339301
</profile>
302+
<profile>
303+
<id>continuous-integration</id>
304+
<build>
305+
<plugins>
306+
<plugin>
307+
<groupId>org.jacoco</groupId>
308+
<artifactId>jacoco-maven-plugin</artifactId>
309+
<version>0.8.5</version>
310+
<configuration>
311+
<excludes>
312+
<exclude>**/ed25519/**/*.class</exclude>
313+
</excludes>
314+
</configuration>
315+
<executions>
316+
<execution>
317+
<goals>
318+
<goal>prepare-agent</goal>
319+
</goals>
320+
</execution>
321+
<execution>
322+
<id>report</id>
323+
<phase>test</phase>
324+
<goals>
325+
<goal>report</goal>
326+
</goals>
327+
</execution>
328+
</executions>
329+
</plugin>
330+
</plugins>
331+
</build>
332+
</profile>
340333
<profile>
341334
<id>bench</id>
342335
<dependencies>
@@ -355,11 +348,6 @@
355348
<artifactId>mariadb-java-client</artifactId>
356349
<version>${mariadb-jdbc.version}</version>
357350
</dependency>
358-
<!-- <dependency>-->
359-
<!-- <groupId>dev.miku</groupId>-->
360-
<!-- <artifactId>r2dbc-mysql</artifactId>-->
361-
<!-- <version>${r2dbc-mysql.version}</version>-->
362-
<!-- </dependency>-->
363351
<dependency>
364352
<groupId>ch.qos.logback</groupId>
365353
<artifactId>logback-classic</artifactId>

src/benchmark/java/org/mariadb/r2dbc/Common.java

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,5 @@
1-
/*
2-
* Copyright 2020 MariaDB Ab.
3-
*
4-
* Licensed under the Apache License, Version 2.0 (the "License");
5-
* you may not use this file except in compliance with the License.
6-
* You may obtain a copy of the License at
7-
*
8-
* http://www.apache.org/licenses/LICENSE-2.0
9-
*
10-
* Unless required by applicable law or agreed to in writing, software
11-
* distributed under the License is distributed on an "AS IS" BASIS,
12-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
* See the License for the specific language governing permissions and
14-
* limitations under the License.
15-
*/
1+
// SPDX-License-Identifier: Apache-2.0
2+
// Copyright (c) 2020-2021 MariaDB Corporation Ab
163

174
package org.mariadb.r2dbc;
185

@@ -27,7 +14,7 @@
2714
@State(Scope.Benchmark)
2815
@Warmup(iterations = 10, timeUnit = TimeUnit.SECONDS, time = 1)
2916
@Measurement(iterations = 10, timeUnit = TimeUnit.SECONDS, time = 1)
30-
@Fork(value = 5)
17+
@Fork(value = 2)
3118
@Threads(value = -1) // detecting CPU count
3219
@BenchmarkMode(Mode.AverageTime)
3320
@OutputTimeUnit(TimeUnit.MICROSECONDS)
@@ -46,6 +33,8 @@ public static class MyState {
4633

4734
// connections
4835
protected Connection jdbc;
36+
protected Connection jdbcPrepare;
37+
4938
protected io.r2dbc.spi.Connection r2dbc;
5039
protected io.r2dbc.spi.Connection r2dbcPrepare;
5140
// protected io.r2dbc.spi.Connection r2dbcMysql;
@@ -86,6 +75,7 @@ public void doSetup() throws Exception {
8675

8776
try {
8877
jdbc = DriverManager.getConnection("jdbc:" + jdbcUrl);
78+
jdbcPrepare = DriverManager.getConnection("jdbc:" + jdbcUrl + "&useServerPrepStmts=true");
8979
r2dbc = MariadbConnectionFactory.from(conf).create().block();
9080
r2dbcPrepare = MariadbConnectionFactory.from(confPrepare).create().block();
9181
// r2dbcMysql = MySqlConnectionFactory.from(confMysql).create().block();
@@ -99,6 +89,7 @@ public void doSetup() throws Exception {
9989
@TearDown(Level.Trial)
10090
public void doTearDown() throws SQLException {
10191
jdbc.close();
92+
jdbcPrepare.close();
10293
Mono.from(r2dbc.close()).block();
10394
Mono.from(r2dbcPrepare.close()).block();
10495
// Mono.from(r2dbcMysql.close()).block();

0 commit comments

Comments
 (0)