Skip to content

Commit

Permalink
Merge branch 'release/1.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
rusher committed Jul 2, 2021
2 parents d8dcd72 + 4fa0d52 commit 5fab63c
Show file tree
Hide file tree
Showing 203 changed files with 3,726 additions and 3,997 deletions.
49 changes: 31 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
os: linux
dist: focal
language: java
services: docker
jdk: openjdk11
addons:
hosts:
- mariadb.example.com
- mariadb2.example.com

before_install:
- git clone https://github.com/mariadb-corporation/connector-test-machine.git

env: packet=40
install:
- |-
case $TRAVIS_OS_NAME in
Expand All @@ -18,39 +20,50 @@ install:
connector-test-machine/launch.bat -t "$srv" -v "$v" -d testr2
;;
linux)
source connector-test-machine/launch.sh -t "$srv" -v "$v" -d testr2
source connector-test-machine/launch.sh -t "$srv" -v "$v" -d testr2 -n 0 -l "$local" -p "$packet"
;;
esac
jobs:
fast_finish: true
allow_failures:
- env: srv=skysql
- env: srv=skysql-ha
- env: srv=mariadb-es v=10.5
- env: srv=build v=10.6
include:
- env: srv=mariadb v=10.5
os: windows
language: shell
- env: srv=mariadb v=10.2
- env: srv=mariadb v=10.3
- env: srv=mariadb v=10.4
- env: srv=mariadb v=10.5
- env: srv=mariadb v=10.2 local=1 packet=20
dist: bionic
- env: srv=mariadb v=10.3 local=1
- env: srv=mariadb v=10.4 local=1
- env: srv=mariadb v=10.5 local=1
- env: srv=mariadb v=10.5 local=1
jdk: openjdk8
dist: bionic
- env: srv=mariadb v=10.6 local=1
- env: srv=mariadb v=10.5 NO_BACKSLASH_ESCAPES=true
- env: srv=mariadb v=10.5 BENCH=1
- env: srv=maxscale
- env: srv=skysql
- env: srv=skysql-ha
- env: srv=build v=10.6
- env: srv=mysql v=5.7
- env: srv=mysql v=8.0
- env: srv=mariadb v=10.6 BENCH=1
- if: env(CONNECTOR_TEST_SECRET_KEY)
env: srv=maxscale
- if: env(CONNECTOR_TEST_SECRET_KEY)
env: srv=mariadb-es v=10.5
- if: env(CONNECTOR_TEST_SECRET_KEY)
env: srv=skysql
- if: env(CONNECTOR_TEST_SECRET_KEY)
env: srv=skysql-ha
- if: env(CONNECTOR_TEST_SECRET_KEY)
env: srv=build v=10.6
- if: env(CONNECTOR_TEST_SECRET_KEY)
env: srv=mysql v=5.7
- if: env(CONNECTOR_TEST_SECRET_KEY)
env: srv=mysql v=8.0

script:
- mvn clean -Dmaven.test.skip > /dev/null
- if [ -n "$BENCH" ] ; then mvn package -P bench -Dmaven.test.skip; fi
- 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
- if [ -z "$BENCH" ] ; then MAVEN_SKIP_RC=true MAVEN_OPTS="-Xmx2g -XX:MaxPermSize=512m" mvn test -DjobId=${TRAVIS_JOB_ID}; fi
- if [ -z "$BENCH" ] ; then MAVEN_SKIP_RC=true MAVEN_OPTS="-Xmx2g -XX:MaxPermSize=512m" mvn test -P continuous-integration -DjobId=${TRAVIS_JOB_ID}; fi


after_success:
after_script:
- bash <(curl -s https://codecov.io/bash)
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
# Change Log
## [1.0.2](https://github.com/mariadb-corporation/mariadb-connector-r2dbc/tree/1.0.2) (02 Jul 2021)
[Full Changelog](https://github.com/mariadb-corporation/mariadb-connector-r2dbc/compare/1.0.1...1.0.2)

Corrections:
* [R2DBC-24] columns of type Bit(1)/TINYINT(1) now convert as Boolean (new option `tinyInt1isBit`)
* [R2DBC-25] Statement::add correction after specification precision
* [R2DBC-26] handle error like 'too many connection" on socket creation
* [R2DBC-27] Options not parsed from connection string
* [R2DBC-28] mutual authentication not done when using ssl TRUST option
* [R2DBC-29] improve coverage to reaching 90%
* [R2DBC-30] Native Password plugin error

## [1.0.1](https://github.com/mariadb-corporation/mariadb-connector-r2dbc/tree/1.0.1) (09 Mar 2021)
[Full Changelog](https://github.com/mariadb-corporation/mariadb-connector-r2dbc/compare/1.0.0...1.0.1)

Expand Down
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[![Maven Central][maven-image]][maven-url]
[![Test Build][travis-image]][travis-url]
[![License][license-image]][license-url]

[![codecov][codecov-image]][codecov-url]

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

Expand All @@ -32,7 +32,7 @@ The MariaDB Connector is available through maven using :
<dependency>
<groupId>org.mariadb</groupId>
<artifactId>r2dbc-mariadb</artifactId>
<version>1.0.0</version>
<version>1.0.2</version>
</dependency>
```

Expand Down Expand Up @@ -67,7 +67,8 @@ Basic example:
MariadbConnectionFactory factory = new MariadbConnectionFactory(conf);

MariadbConnection connection = factory.create().block();
connection.createStatement("SELECT * FROM myTable")
connection.createStatement("SELECT * FROM myTable WHERE val = ?")
.bind(0, "myVal") // setting parameter
.execute()
.flatMap(r -> r.map((row, metadata) -> {
return "value=" + row.get(0, String.class);
Expand Down Expand Up @@ -97,7 +98,7 @@ Basic example:
| **`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*| |
| **`clientSslKey`** | client private key path(for mutual authentication) |*String* | |
| **`clientSslPassword`** | client private key password |*charsequence* | |
| **`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|
| **`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|
| **`rsaPublicKey`** | <i>only for MySQL server</i><br/> Server RSA public key, for SHA256 authentication |*String* | |
| **`cachingRsaPublicKey`** | <i>only for MySQL server</i><br/> Server caching RSA public key, for cachingSHA256 authentication |*String* | |
| **`allowPublicKeyRetrieval`** | <i>only for MySQL server</i><br/> Permit retrieved Server RSA public key from server. This can create a security issue |*boolean* | true |
Expand All @@ -106,6 +107,7 @@ Basic example:
| **`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 |
| **`pamOtherPwd`** | Permit to provide additional password for PAM authentication with multiple authentication step. If multiple passwords, value must be URL encoded.|*string* | |
| **`autocommit`** | Set default autocommit value on connection initialization" |*boolean* | true |
| **`tinyInt1isBit`** | Convert Bit(1)/TINYINT(1) default to boolean type |*boolean* | true |

## Roadmap

Expand All @@ -126,3 +128,5 @@ To file an issue or follow the development, see [JIRA](https://jira.mariadb.org/
[maven-url]:https://maven-badges.herokuapp.com/maven-central/org.mariadb/r2dbc-mariadb
[license-image]:https://img.shields.io/badge/License-Apache%202.0-blue.svg
[license-url]:https://opensource.org/licenses/Apache-2.0
[codecov-image]:https://codecov.io/gh/mariadb-corporation/mariadb-connector-r2dbc/branch/master/graph/badge.svg?token=8fIhax7q23
[codecov-url]:https://codecov.io/gh/mariadb-corporation/mariadb-connector-r2dbc
5 changes: 5 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
comment: off
codecov:
token: 4e71e90c-99a8-40b8-b69c-181457ec4861
ignore:
- "src/main/java/org/mariadb/r2dbc/authentication/ed25519/**/*"
15 changes: 2 additions & 13 deletions intellij-style.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
<!--
~ Copyright 2020 MariaDB Ab.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~ SPDX-License-Identifier: Apache-2.0
~ Copyright (c) 2020-2021 MariaDB Corporation Ab
-->

<code_scheme name="Project" version="173">
Expand Down
96 changes: 42 additions & 54 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
<!--
~ Copyright 2020 MariaDB Ab.
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
~ SPDX-License-Identifier: Apache-2.0
~ Copyright (c) 2020-2021 MariaDB Corporation Ab
-->

<project
Expand All @@ -22,7 +11,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.mariadb</groupId>
<artifactId>r2dbc-mariadb</artifactId>
<version>1.0.1</version>
<version>1.0.2</version>
<packaging>jar</packaging>
<url>https://github.com/mariadb-corporation/mariadb-connector-r2dbc</url>

Expand All @@ -32,15 +21,14 @@
<properties>
<java.version>1.8</java.version>
<jsr305.version>3.0.2</jsr305.version>
<junit.version>5.7.1</junit.version>
<jmh.version>1.27</jmh.version>
<junit.version>5.7.2</junit.version>
<jmh.version>1.32</jmh.version>
<logback.version>1.2.3</logback.version>
<netty.version>4.1.59.Final</netty.version>
<netty.version>4.1.65.Final</netty.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<r2dbc-spi.version>0.8.4.RELEASE</r2dbc-spi.version>
<reactor.version>Dysprosium-SR17</reactor.version>
<mariadb-jdbc.version>2.6.1</mariadb-jdbc.version>
<r2dbc-mysql.version>0.8.2.RELEASE</r2dbc-mysql.version>
<r2dbc-spi.version>0.8.5.RELEASE</r2dbc-spi.version>
<reactor.version>Dysprosium-SR21</reactor.version>
<mariadb-jdbc.version>3.0.0-alpha</mariadb-jdbc.version>
<uberjar.name>benchmarks</uberjar.name>
</properties>

Expand Down Expand Up @@ -172,31 +160,6 @@

<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.5</version>
<configuration>
<includes>
<include>org/mariadb/r2dbc</include>
<include>org/mariadb/r2dbc/**</include>
</includes>
</configuration>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
Expand Down Expand Up @@ -262,9 +225,8 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<version>3.0.0-M5</version>
<configuration>
<argLine>-Xmx1024m</argLine>
<systemPropertyVariables>
<io.netty.leakDetectionLevel>paranoid</io.netty.leakDetectionLevel>
<!-- <io.netty.leakDetection.targetRecords>1</io.netty.leakDetection.targetRecords>-->
Expand Down Expand Up @@ -303,7 +265,7 @@
<plugin>
<groupId>com.coveo</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.9</version>
<version>2.9.1</version>
<executions>
<execution>
<goals>
Expand Down Expand Up @@ -337,6 +299,37 @@
<activeByDefault>true</activeByDefault>
</activation>
</profile>
<profile>
<id>continuous-integration</id>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.5</version>
<configuration>
<excludes>
<exclude>**/ed25519/**/*.class</exclude>
</excludes>
</configuration>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>bench</id>
<dependencies>
Expand All @@ -355,11 +348,6 @@
<artifactId>mariadb-java-client</artifactId>
<version>${mariadb-jdbc.version}</version>
</dependency>
<!-- <dependency>-->
<!-- <groupId>dev.miku</groupId>-->
<!-- <artifactId>r2dbc-mysql</artifactId>-->
<!-- <version>${r2dbc-mysql.version}</version>-->
<!-- </dependency>-->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
Expand Down
23 changes: 7 additions & 16 deletions src/benchmark/java/org/mariadb/r2dbc/Common.java
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
/*
* Copyright 2020 MariaDB Ab.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// SPDX-License-Identifier: Apache-2.0
// Copyright (c) 2020-2021 MariaDB Corporation Ab

package org.mariadb.r2dbc;

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

// connections
protected Connection jdbc;
protected Connection jdbcPrepare;

protected io.r2dbc.spi.Connection r2dbc;
protected io.r2dbc.spi.Connection r2dbcPrepare;
// protected io.r2dbc.spi.Connection r2dbcMysql;
Expand Down Expand Up @@ -86,6 +75,7 @@ public void doSetup() throws Exception {

try {
jdbc = DriverManager.getConnection("jdbc:" + jdbcUrl);
jdbcPrepare = DriverManager.getConnection("jdbc:" + jdbcUrl + "&useServerPrepStmts=true");
r2dbc = MariadbConnectionFactory.from(conf).create().block();
r2dbcPrepare = MariadbConnectionFactory.from(confPrepare).create().block();
// r2dbcMysql = MySqlConnectionFactory.from(confMysql).create().block();
Expand All @@ -99,6 +89,7 @@ public void doSetup() throws Exception {
@TearDown(Level.Trial)
public void doTearDown() throws SQLException {
jdbc.close();
jdbcPrepare.close();
Mono.from(r2dbc.close()).block();
Mono.from(r2dbcPrepare.close()).block();
// Mono.from(r2dbcMysql.close()).block();
Expand Down
Loading

0 comments on commit 5fab63c

Please sign in to comment.