Skip to content

Commit

Permalink
tag 1.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
rusher committed Feb 19, 2018
2 parents 88040b4 + 8edfd27 commit efa503a
Show file tree
Hide file tree
Showing 35 changed files with 526 additions and 120 deletions.
13 changes: 6 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,18 @@ Tracker link <a href="https://jira.mariadb.org/projects/CONJ/issues/">https://ji

| Java version | current version |
|:------------:|:-------------------------:|
| 6 | 1.7.1 |
| 7 | 1.7.1 |
| 8 | 2.2.1 |
| 9 | 2.2.1 |

| 6 | 1.7.2 |
| 7 | 1.7.2 |
| 8 | 2.2.2 |
| 9 | 2.2.2 |

The driver (jar) can be downloaded from [mariadb connector download](https://mariadb.com/products/connectors-plugins)
or maven :
```script
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>2.2.1</version>
<version>2.2.2</version>
</dependency>
```

Expand All @@ -52,7 +51,7 @@ Development snapshot are available on sonatype nexus repository
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>2.2.2-SNAPSHOT</version>
<version>2.3.0-SNAPSHOT</version>
</dependency>
</dependencies>
```
Expand Down
40 changes: 32 additions & 8 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,32 @@
version: '{build}'
skip_tags: true
clone_depth: 10
environment:
matrix:
- JAVA_HOME: C:\Program Files\Java\jdk1.8.0
os: Windows Server 2012
services:
- mysql
- DB: '10.2.12'
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
CMAKE_PARAM: 'Visual Studio 15 2017 Win64'
JAVA_HOME: C:\Program Files\Java\jdk1.8.0

- DB: '10.3.4'
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
CMAKE_PARAM: 'Visual Studio 15 2017 Win64'
JAVA_HOME: C:\Program Files\Java\jdk1.8.0

- DB: '10.1.30'
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
CMAKE_PARAM: 'Visual Studio 15 2017 Win64'
JAVA_HOME: C:\Program Files\Java\jdk1.8.0

- DB: '10.0.33'
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
CMAKE_PARAM: 'Visual Studio 15 2017 Win64'
JAVA_HOME: C:\Program Files\Java\jdk1.8.0

- DB: '5.5.59'
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
CMAKE_PARAM: 'Visual Studio 15 2017 Win64'
JAVA_HOME: C:\Program Files\Java\jdk1.8.0

clone_folder: c:\projects\mariadb-connector-j
install:
- ps: |
Add-Type -AssemblyName System.IO.Compression.FileSystem
Expand All @@ -15,15 +35,19 @@ install:
[System.IO.Compression.ZipFile]::ExtractToDirectory("C:\maven-bin.zip", "C:\maven")
}
# Prepend Java entry, remove Ruby entry (C:\Ruby193\bin;) from PATH
- cmd: systeminfo
- cmd: set FILE=http://mariadb.mirrors.ovh.net/MariaDB/mariadb-%DB%/winx64-packages/mariadb-%DB%-winx64.msi
- ps: Start-FileDownload $Env:FILE -FileName server.msi
- cmd: msiexec /i server.msi INSTALLDIR=c:\projects\server SERVICENAME=mariadb ALLOWREMOTEROOTACCESS=true /qn
- cmd: "\"c:\\projects\\server\\bin\\mysql.exe\" -e \"create database testj\" --user=root"
- cmd: SET PATH=C:\maven\apache-maven-3.5.2\bin;%JAVA_HOME%\bin;%PATH:C:\Ruby193\bin;=%;
- cmd: SET MAVEN_OPTS=-Xms512m -Xms768m
- cmd: SET JAVA_OPTS=-Xms512m -Xmx768m
- cmd: SET M2_HOME=C:\maven\apache-maven-3.5.2
- cmd: SET M
- cmd: cd c:\projects\mariadb-connector-j
- cmd: mvn --version
- cmd: java -version
build_script:
- mvn clean package -Dmaven.test.skip=true
test_script:
- mvn test -DdbUrl="jdbc:mariadb://localhost/testj?user=root&createDatabaseIfNotExist=true&password=Password12!"
- mvn test -DdbUrl="jdbc:mariadb://localhost/testj?user=root"
15 changes: 15 additions & 0 deletions documentation/changelog.creole
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
= Changelog
* [[https://github.com/MariaDB/mariadb-connector-j/documentation/changelog.creole#172|1.7.2]] Released on 20 feb. 2018
* [[https://github.com/MariaDB/mariadb-connector-j/documentation/changelog.creole#171|1.7.1]] Released on 22 dec. 2017
* [[https://github.com/MariaDB/mariadb-connector-j/documentation/changelog.creole#170|1.7.0]] Released on 08 nov. 2017
* [[https://github.com/MariaDB/mariadb-connector-j/documentation/changelog.creole#165|1.6.5]] Released on 24 sept. 2017
Expand Down Expand Up @@ -28,6 +29,20 @@
* [[https://github.com/MariaDB/mariadb-connector-j/documentation/changelog.creole#140|1.4.0]] Released on 31 march 2016
---

== 1.7.2

Bug correction:
[CONJ-564] Never ever throw an instance of java.lang.Error
[CONJ-579] Keywords missing from DatabaseMetaData.getSQLKeywords()
[CONJ-567] UrlParser.initialUrl gets overwritten
[CONJ-571] Permit java 9 serialization filtering
[CONJ-574] forcing using toLowerCase/toUpperCase with Locale.ROOT
[CONJ-560] Automatic module name for java 9
[CONJ-578] windows testing using all mariadb server
[CONJ-570] Add tests for 10.3.3 INVISIBLE column


== 1.7.1

[CONJ-501] provide support for authentication plugin ed25519
Expand Down
2 changes: 1 addition & 1 deletion documentation/plugin/GSSAPI.creole
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

= GSSAPI Authentication

MariaDB GSSAPI support GSSAPI since the 10.1 version (Server configuration can be found on https://github.com/MariaDB/server/blob/10.2/plugin/auth_gssapi/README.md).
MariaDB GSSAPI support GSSAPI since the 10.1 version (Server configuration can be found on https://github.com/MariaDB/server/blob/10.2/plugin/auth_gssapi/README.md ).

The following subsections show how to implement GSSAPI Authentication with the java connector.

Expand Down
13 changes: 7 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<artifactId>mariadb-java-client</artifactId>
<packaging>jar</packaging>
<name>mariadb-java-client</name>
<version>1.7.1</version>
<version>1.7.2</version>
<description>JDBC driver for MariaDB and MySQL</description>
<url>https://mariadb.com/kb/en/mariadb/about-mariadb-connector-j/</url>

Expand All @@ -71,7 +71,7 @@
<checkstyle.plugin.version>2.15</checkstyle.plugin.version>
<driver.version.major>1</driver.version.major>
<driver.version.minor>7</driver.version.minor>
<driver.version.patch>1</driver.version.patch>
<driver.version.patch>2</driver.version.patch>
<driver.version.qualifier></driver.version.qualifier>
</properties>

Expand All @@ -82,8 +82,8 @@
</licenses>

<organization>
<name>mariadb</name>
<url>http://mariadb.org/</url>
<name>mariadb.org</name>
<url>https://mariadb.org</url>
</organization>

<developers>
Expand Down Expand Up @@ -271,11 +271,12 @@
<manifestEntries>
<Bundle-Version>${project.version}</Bundle-Version>
<Bundle-ManifestVersion>2</Bundle-ManifestVersion>
<Bundle-Name>MariaDB JDBC Client</Bundle-Name>
<Bundle-Name>mariadb-java-client</Bundle-Name>
<Bundle-SymbolicName>org.mariadb.jdbc</Bundle-SymbolicName>
<Automatic-Module-Name>org.mariadb.jdbc</Automatic-Module-Name>
<Export-Package>org.mariadb.jdbc</Export-Package>
<Import-Package>
javax.net;resolution:=optional,javax.net.ssl;resolution:=optional,javax.sql;resolution:=optional,javax.transaction.xa;resolution:=optional,org.slf4j;resolution:=optional
javax.naming,javax.management,javax.net;resolution:=optional,javax.net.ssl;resolution:=optional,javax.sql,javax.transaction.xa;resolution:=optional,org.slf4j;resolution:=optional
</Import-Package>
</manifestEntries>
</archive>
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/org/mariadb/jdbc/CallableParameterMetaData.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
import java.sql.*;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

Expand Down Expand Up @@ -108,7 +109,7 @@ public void readMetadataFromDbIfRequired() throws SQLException {

private int mapMariaDbTypeToJdbc(String str) {

str = str.toUpperCase();
str = str.toUpperCase(Locale.ROOT);
if ("BIT".equals(str)) return Types.BIT;
if ("TINYINT".equals(str)) return Types.TINYINT;
if ("SMALLINT".equals(str)) return Types.SMALLINT;
Expand Down Expand Up @@ -220,7 +221,7 @@ private void parseParamList(boolean isFunction, String paramList) throws SQLExce

callParameter.setName(matcher2.group(2).trim());
callParameter.setSigned(matcher2.group(3) == null);
callParameter.setTypeName(matcher2.group(4).trim().toUpperCase());
callParameter.setTypeName(matcher2.group(4).trim().toUpperCase(Locale.ROOT));

if (direction == null || direction.equalsIgnoreCase("IN")) {
callParameter.setInput(true);
Expand Down
28 changes: 13 additions & 15 deletions src/main/java/org/mariadb/jdbc/MariaDbBlob.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,15 @@
import java.io.*;
import java.sql.Blob;
import java.sql.SQLException;
import java.util.Arrays;


public class MariaDbBlob implements Blob, Serializable {
private static final long serialVersionUID = 8557003556592493381L;

private static final long serialVersionUID = -4736603161284649490L;
protected byte[] data;
protected int offset;
protected int length;
protected transient int offset;
protected transient int length;

/**
* Creates an empty blob.
Expand All @@ -82,7 +83,7 @@ public MariaDbBlob() {
*/
public MariaDbBlob(byte[] bytes) {
if (bytes == null) {
throw new AssertionError("byte array is null");
throw new NullPointerException("byte array is null");
}
data = bytes;
offset = 0;
Expand All @@ -98,7 +99,7 @@ public MariaDbBlob(byte[] bytes) {
*/
public MariaDbBlob(byte[] bytes, int offset, int length) {
if (bytes == null) {
throw new AssertionError("byte array is null");
throw new NullPointerException("byte array is null");
}
data = bytes;
this.offset = offset;
Expand All @@ -107,22 +108,19 @@ public MariaDbBlob(byte[] bytes, int offset, int length) {

private void writeObject(ObjectOutputStream out)
throws IOException {
out.writeInt(length);
if (length > 0) {
out.write(data, offset, length);
offset += length;
if (offset != 0 || data.length != length) {
data = Arrays.copyOfRange(data, offset, offset + length);
offset = 0;
length = 0;
}
out.defaultWriteObject();
}

private void readObject(ObjectInputStream in)
throws IOException {
throws IOException, ClassNotFoundException {
in.defaultReadObject();
offset = 0;
length = in.readInt();
data = new byte[length];
if (length > 0) {
in.readFully(data, 0, length);
}
length = data.length;
}

/**
Expand Down
21 changes: 9 additions & 12 deletions src/main/java/org/mariadb/jdbc/MariaDbClob.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
import java.sql.SQLException;

public class MariaDbClob extends MariaDbBlob implements Clob, NClob, Serializable {
private static final long serialVersionUID = -2006825230517923067L;

private static final long serialVersionUID = -3066501059817815286L;

/**
* Creates a Clob with content.
Expand Down Expand Up @@ -96,11 +97,7 @@ public MariaDbClob() {
* @return string value of blob content.
*/
public String toString() {
try {
return new String(data, offset, length, Buffer.UTF_8);
} catch (Exception e) {
throw new AssertionError(e);
}
return new String(data, offset, length, Buffer.UTF_8);
}

/**
Expand Down Expand Up @@ -191,15 +188,15 @@ private int utf8Position(int charPosition) {
if (byteValue < 0x80) {
pos += 1;
} else if (byteValue < 0xC2) {
throw new AssertionError("invalid UTF8");
throw new UncheckedIOException("invalid UTF8",new CharacterCodingException());
} else if (byteValue < 0xE0) {
pos += 2;
} else if (byteValue < 0xF0) {
pos += 3;
} else if (byteValue < 0xF8) {
pos += 4;
} else {
throw new AssertionError("invalid UTF8");
throw new UncheckedIOException("invalid UTF8",new CharacterCodingException());
}
}
return pos;
Expand Down Expand Up @@ -238,15 +235,15 @@ public long length() {
if (byteValue < 0x80) {
i += 1;
} else if (byteValue < 0xC2) {
throw new AssertionError("invalid UTF8");
throw new UncheckedIOException("invalid UTF8",new CharacterCodingException());
} else if (byteValue < 0xE0) {
i += 2;
} else if (byteValue < 0xF0) {
i += 3;
} else if (byteValue < 0xF8) {
i += 4;
} else {
throw new AssertionError("invalid UTF8");
throw new UncheckedIOException("invalid UTF8",new CharacterCodingException());
}
len++;
}
Expand All @@ -261,15 +258,15 @@ public void truncate(final long len) throws SQLException {
if (byteValue < 0x80) {
pos += 1;
} else if (byteValue < 0xC2) {
throw new AssertionError("invalid UTF8");
throw new UncheckedIOException("invalid UTF8",new CharacterCodingException());
} else if (byteValue < 0xE0) {
pos += 2;
} else if (byteValue < 0xF0) {
pos += 3;
} else if (byteValue < 0xF8) {
pos += 4;
} else {
throw new AssertionError("invalid UTF8");
throw new UncheckedIOException("invalid UTF8",new CharacterCodingException());
}
}
length = pos - offset;
Expand Down
22 changes: 11 additions & 11 deletions src/main/java/org/mariadb/jdbc/MariaDbDatabaseMetaData.java
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ private static int getImportedKeyAction(String actionKey) {
if (actionKey.equals("RESTRICT")) {
return DatabaseMetaData.importedKeyRestrict;
}
throw new AssertionError("should not happen");
throw new IllegalArgumentException("Illegal key action '" + actionKey + "' specified.");
}

private String dataTypeClause(String fullTypeColumnName) {
Expand Down Expand Up @@ -1063,16 +1063,16 @@ public String getIdentifierQuoteString() throws SQLException {
public String getSQLKeywords() throws SQLException {
return "ACCESSIBLE,ANALYZE,ASENSITIVE,BEFORE,BIGINT,BINARY,BLOB,CALL,CHANGE,CONDITION,DATABASE,DATABASES,"
+ "DAY_HOUR,DAY_MICROSECOND,DAY_MINUTE,DAY_SECOND,DELAYED,DETERMINISTIC,DISTINCTROW,DIV,DUAL,EACH,"
+ "ELSEIF,ENCLOSED,ESCAPED,EXIT,EXPLAIN,FLOAT4,FLOAT8,FORCE,FULLTEXT,HIGH_PRIORITY,HOUR_MICROSECOND,"
+ "HOUR_MINUTE,HOUR_SECOND,IF,IGNORE,INFILE,INOUT,INT1,INT2,INT3,INT4,INT8,ITERATE,KEY,KEYS,KILL,LEAVE,"
+ "LIMIT,LINEAR,LINES,LOAD,LOCALTIME,LOCALTIMESTAMP,LOCK,LONG,LONGBLOB,LONGTEXT,LOOP,LOW_PRIORITY,"
+ "MEDIUMBLOB,MEDIUMINT,MEDIUMTEXT,MIDDLEINT,MINUTE_MICROSECOND,MINUTE_SECOND,MOD,MODIFIES,"
+ "NO_WRITE_TO_BINLOG,OPTIMIZE,OPTIONALLY,OUT,OUTFILE,PURGE,RANGE,READS,READ_ONLY,READ_WRITE,REGEXP,"
+ "RELEASE,RENAME,REPEAT,REPLACE,REQUIRE,RETURN,RLIKE,SCHEMAS,SECOND_MICROSECOND,SENSITIVE,SEPARATOR,"
+ "SHOW,SPATIAL,SPECIFIC,SQLEXCEPTION,SQL_BIG_RESULT,SQL_CALC_FOUND_ROWS,SQL_SMALL_RESULT,SSL,STARTING,"
+ "STRAIGHT_JOIN,TERMINATED,TINYBLOB,TINYINT,TINYTEXT,TRIGGER,UNDO,UNLOCK,UNSIGNED,USE,UTC_DATE,"
+ "UTC_TIME,UTC_TIMESTAMP,VARBINARY,VARCHARACTER,WHILE,X509,XOR,YEAR_MONTH,ZEROFILL,GENERAL,"
+ "IGNORE_SERVER_IDS,MASTER_HEARTBEAT_PERIOD,MAXVALUE,RESIGNAL,SIGNALSLOW";
+ "ELSEIF,ENCLOSED,ESCAPED,EXIT,EXPLAIN,FLOAT4,FLOAT8,FORCE,FULLTEXT,GENERAL,HIGH_PRIORITY,"
+ "HOUR_MICROSECOND,HOUR_MINUTE,HOUR_SECOND,IF,IGNORE,IGNORE_SERVER_IDS,INDEX,INFILE,INOUT,INT1,INT2,"
+ "INT3,INT4,INT8,ITERATE,KEY,KEYS,KILL,LEAVE,LIMIT,LINEAR,LINES,LOAD,LOCALTIME,LOCALTIMESTAMP,LOCK,"
+ "LONG,LONGBLOB,LONGTEXT,LOOP,LOW_PRIORITY,MASTER_HEARTBEAT_PERIOD,MASTER_SSL_VERIFY_SERVER_CERT,"
+ "MAXVALUE,MEDIUMBLOB,MEDIUMINT,MEDIUMTEXT,MIDDLEINT,MINUTE_MICROSECOND,MINUTE_SECOND,MOD,MODIFIES,"
+ "NO_WRITE_TO_BINLOG,OPTIMIZE,OPTIONALLY,OUT,OUTFILE,PURGE,RANGE,READ_WRITE,READS,REGEXP,RELEASE,"
+ "RENAME,REPEAT,REPLACE,REQUIRE,RESIGNAL,RESTRICT,RETURN,RLIKE,SCHEMAS,SECOND_MICROSECOND,SENSITIVE,"
+ "SEPARATOR,SHOW,SIGNAL,SLOW,SPATIAL,SPECIFIC,SQL_BIG_RESULT,SQL_CALC_FOUND_ROWS,SQL_SMALL_RESULT,"
+ "SQLEXCEPTION,SSL,STARTING,STRAIGHT_JOIN,TERMINATED,TINYBLOB,TINYINT,TINYTEXT,TRIGGER,UNDO,UNLOCK,"
+ "UNSIGNED,USE,UTC_DATE,UTC_TIME,UTC_TIMESTAMP,VARBINARY,VARCHARACTER,WHILE,XOR,YEAR_MONTH,ZEROFILL";
}

/**
Expand Down
Loading

0 comments on commit efa503a

Please sign in to comment.