diff --git a/mysql-connector-java-8.0.30.tar.gz b/mysql-connector-java-8.0.30.tar.gz
deleted file mode 100644
index 83c7629d3b874e32a551912fd38b5c259bbd442c..0000000000000000000000000000000000000000
Binary files a/mysql-connector-java-8.0.30.tar.gz and /dev/null differ
diff --git a/mysql-connector-java-8.0.33.pom b/mysql-connector-java-8.0.33.pom
new file mode 100644
index 0000000000000000000000000000000000000000..e51eb1c371aa2e69145b393d89f205774b178c59
--- /dev/null
+++ b/mysql-connector-java-8.0.33.pom
@@ -0,0 +1,170 @@
+
+
+
+ 4.0.0
+
+ mysql
+ mysql-connector-java
+ 8.0.33
+
+
+
+ com.mysql
+ mysql-connector-j
+ MySQL Connector/J artifacts moved to reverse-DNS compliant Maven 2+ coordinates.
+
+
+
+
+ UTF-8
+ UTF-8
+ 1.8
+ 1.8
+ 1.8
+
+
+
+
+ org.junit.jupiter
+ junit-jupiter-api
+ 5.4.0
+
+
+
+ org.hamcrest
+ hamcrest
+ 2.2
+
+
+
+ org.junit.platform
+ junit-platform-engine
+ 1.4.0
+
+
+
+ org.junit.platform
+ junit-platform-launcher
+ 1.4.0
+
+
+
+ org.apache.maven.surefire
+ surefire-junit-platform
+ 2.22.0
+
+
+
+ javassist
+ javassist
+ 3.18.1.GA
+
+
+
+ org.slf4j
+ slf4j-api
+ 1.7.25
+
+
+
+ com.mchange
+ c3p0
+ 0.9.5.4
+
+
+
+ com.google.protobuf
+ protobuf-java
+ 3.19.6
+
+
+
+
+ src
+ test
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.8.0
+
+ 1.8
+ 1.8
+ UTF-8
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ 2.22.0
+
+
+ **/test/java/*
+
+
+
+
+ org.junit.platform
+ junit-platform-surefire-provider
+ 1.3.2
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-javadoc-plugin
+
+
+ **/test/java/*
+ **/test/java/com/mysql/cj/result/SqlTimestampValueFactoryTest.java
+ **/test/java/testsuite/x/devapi/BaseTableTestCase.java
+ **/test/java/testsuite/x/devapi/CollectionFindTest.java
+ **/test/java/testsuite/x/devapi/*.java
+ **/test/java/testsuite/regression/*.java
+ **/test/java/testsuite/perf/*.java
+ **/test/java/testsuite/simple/*.java
+ **/test/java/com/mysql/cj/protocol/x/SyncMessageReaderTest.java
+
+
+
+
+ attach-sources
+
+ jar
+
+
+
+
+
+
+
diff --git a/mysql-connector-java-8.0.33.tar.gz b/mysql-connector-java-8.0.33.tar.gz
new file mode 100644
index 0000000000000000000000000000000000000000..8598b0ff734efd69672f14c2df6a599cde28e37a
Binary files /dev/null and b/mysql-connector-java-8.0.33.tar.gz differ
diff --git a/mysql-connector-java.spec b/mysql-connector-java.spec
index 19bfaab8f53991597228d788b5200b3250df3ec8..0ffbfd2eff9785ea8904caf5b2c5bbed70a58eee 100644
--- a/mysql-connector-java.spec
+++ b/mysql-connector-java.spec
@@ -1,20 +1,32 @@
Summary: Official JDBC driver for MySQL
Name: mysql-connector-java
-Version: 8.0.30
+Version: 8.0.33
Release: 1
Epoch: 1
License: GPLv2 with exceptions
URL: http://dev.mysql.com/downloads/connector/j/
Source0: https://github.com/mysql/mysql-connector-j/archive/%{version}/%{name}-%{version}.tar.gz
+Source1: https://repo.maven.apache.org/maven2/mysql/mysql-connector-java/8.0.33/mysql-connector-java-8.0.33.pom
-Patch1: remove-coverage-test.patch
Patch2: remove-authentication-plugin.patch
Patch3: remove-StatementsTest.patch
BuildArch: noarch
-BuildRequires: ant >= 1.6.0 ant-contrib >= 1.0 ant-junit apache-commons-logging c3p0 git
-BuildRequires: hibernate java-devel >= 1:1.6.0 javapackages-local jta >= 1.0 junit5
-BuildRequires: protobuf-java slf4j
+BuildRequires: maven-local apache-commons-logging
+BuildRequires: hibernate java-devel >= 1:1.6.0 javapackages-local jta >= 1.0
+BuildRequires: java-17-openjdk-devel
+BuildRequires: mvn(org.junit.jupiter:junit-jupiter-api)
+BuildRequires: mvn(com.google.protobuf:protobuf-java)
+BuildRequires: mvn(org.junit.platform:junit-platform-engine)
+BuildRequires: mvn(org.apache.maven.surefire:surefire-junit-platform)
+BuildRequires: mvn(org.hamcrest:hamcrest)
+BuildRequires: mvn(javassist:javassist)
+BuildRequires: mvn(org.slf4j:slf4j-api)
+BuildRequires: mvn(com.mchange:c3p0)
+BuildRequires: mvn(org.eclipse.aether:aether-connector-basic)
+BuildRequires: mvn(org.eclipse.aether:aether-transport-wagon)
+BuildRequires: mvn(org.apache.maven.wagon:wagon-http)
+BuildRequires: mvn(org.apache.maven.wagon:wagon-provider-api)
Requires: jta >= 1.0 slf4j
%description
@@ -26,8 +38,13 @@ data, even in a heterogeneous environment. MySQL Connector/J is a Type
IV JDBC driver and has a complete JDBC feature set that supports the
capabilities of MySQL.
+%package javadoc
+Summary: Javadoc for mysql-connector-java
+%description javadoc
+Javadoc for mysql-connector-java
+
%prep
-%setup -q -n mysql-connector-j-%{version}
+%autosetup -p1 -n mysql-connector-j-%{version}
for file in README README.md; do
sed -i.orig 's|\r||g' $file
@@ -35,31 +52,29 @@ for file in README README.md; do
rm $file.orig
done
sed -i 's/>@.*>%{version}' src/build/misc/pom.xml
-
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
+cp %{SOURCE1} ./pom.xml
%build
export CLASSPATH=$(build-classpath jdbc-stdext jta junit slf4j commons-logging.jar)
rm -rf src/main/user-impl/java/com/mysql/cj/jdbc/integration/jboss
-rm src/test/java/testsuite/regression/ConnectionRegressionTest.java
-rm src/test/java/testsuite/regression/DataSourceRegressionTest.java
-rm src/test/java/testsuite/simple/StatementsTest.java
-ant -Dcom.mysql.cj.build.jdk=%{java_home} \
- -Dcom.mysql.cj.extra.libs=/usr/share/java \
- test dist
+rm src/test/java/testsuite/regression/StatementRegressionTest.java
+%mvn_build -b --xmvn-javadoc
%install
%mvn_file mysql:mysql-connector-java %{name}
-%mvn_artifact src/build/misc/pom.xml build/%{name}-%{version}-SNAPSHOT/%{name}-%{version}-SNAPSHOT.jar
%mvn_install
%files -f .mfiles
%doc CHANGES README README.md
%license LICENSE
+%files javadoc -f .mfiles-javadoc
+%license LICENSE
+
%changelog
+* Wed Jan 17 2024 Ge Wang - 1:8.0.33-1
+- UPgrade to 8.0.33
+
* Tue Sep 26 2023 xu_ping <707078654@qq.com> - 1:8.0.30-1
- Upgrade to 8.0.30
diff --git a/remove-authentication-plugin.patch b/remove-authentication-plugin.patch
index aed85cc9c6e742d44224b4b6c7d4f0b6b355cf27..921e47b599757e55e365263bffcf66ded7ea385d 100644
--- a/remove-authentication-plugin.patch
+++ b/remove-authentication-plugin.patch
@@ -2,16 +2,16 @@ From 47793b89300a19c5fd13b781f03dd580fc0186a6 Mon Sep 17 00:00:00 2001
From: Ondrej Dubaj
Date: Tue, 18 Jan 2022 14:58:57 +0100
Subject: [PATCH] remove AuthenticationOciClient plugin due to missing oracle dependency
-
+
---
.../a/NativeAuthenticationProvider.java | 2 -
- .../AuthenticationOciClient.java | 177 ------------------
- .../cj/LocalizedErrorMessages.properties | 6 -
- 3 files changed, 185 deletions(-)
+ .../AuthenticationOciClient.java | 218 ------------------
+ .../cj/LocalizedErrorMessages.properties | 12 -
+ 3 files changed, 232 deletions(-)
delete mode 100644 src/main/protocol-impl/java/com/mysql/cj/protocol/a/authentication/AuthenticationOciClient.java
-
+
diff --git a/src/main/protocol-impl/java/com/mysql/cj/protocol/a/NativeAuthenticationProvider.java b/src/main/protocol-impl/java/com/mysql/cj/protocol/a/NativeAuthenticationProvider.java
-index 0d94061d..58bbf23b 100644
+index b9a8ca6..3d5f145 100644
--- a/src/main/protocol-impl/java/com/mysql/cj/protocol/a/NativeAuthenticationProvider.java
+++ b/src/main/protocol-impl/java/com/mysql/cj/protocol/a/NativeAuthenticationProvider.java
@@ -58,7 +58,6 @@ import com.mysql.cj.protocol.a.NativeConstants.StringSelfDataType;
@@ -22,7 +22,7 @@ index 0d94061d..58bbf23b 100644
import com.mysql.cj.protocol.a.authentication.CachingSha2PasswordPlugin;
import com.mysql.cj.protocol.a.authentication.MysqlClearPasswordPlugin;
import com.mysql.cj.protocol.a.authentication.MysqlNativePasswordPlugin;
-@@ -256,7 +255,6 @@ public class NativeAuthenticationProvider implements AuthenticationProvider protocol = null;
- private MysqlCallbackHandler usernameCallbackHandler = null;
-- private String fingerprint = null;
+- private String configFingerprint = null;
+- private String configKeyFile = null;
+- private String configSecurityTokenFile = null;
- private RSAPrivateKey privateKey = null;
+- private byte[] token = null;
-
- @Override
- public void init(Protocol prot, MysqlCallbackHandler cbh) {
@@ -111,7 +115,7 @@ index 473e532f..00000000
-
- @Override
- public void reset() {
-- this.fingerprint = null;
+- this.configFingerprint = null;
- this.privateKey = null;
- }
-
@@ -161,74 +165,118 @@ index 473e532f..00000000
- return true;
- }
-
+- loadOciConfig();
- initializePrivateKey();
+- initializeToken();
-
- byte[] nonce = fromServer.readBytes(StringSelfDataType.STRING_EOF);
- byte[] signature = ExportControlled.sign(nonce, this.privateKey);
- if (signature == null) {
- signature = new byte[0];
- }
-- String payload = String.format("{\"fingerprint\":\"%s\", \"signature\":\"%s\"}", this.fingerprint, Base64.getEncoder().encodeToString(signature));
+- String payload = String.format("{\"fingerprint\":\"%s\", \"signature\":\"%s\", \"token\":\"%s\"}", this.configFingerprint,
+- Base64.getEncoder().encodeToString(signature), new String(this.token));
- toServer.add(new NativePacketPayload(payload.getBytes(Charset.defaultCharset())));
- return true;
- }
-
-- private void initializePrivateKey() {
-- if (this.privateKey != null) {
-- // Already initialized.
-- return;
-- }
--
+- private void loadOciConfig() {
- ConfigFile configFile;
- try {
- String configFilePath = this.protocol.getPropertySet().getStringProperty(PropertyKey.ociConfigFile.getKeyName()).getStringValue();
+- String configProfile = this.protocol.getPropertySet().getStringProperty(PropertyKey.ociConfigProfile.getKeyName()).getStringValue();
- if (StringUtils.isNullOrEmpty(configFilePath)) {
-- configFile = ConfigFileReader.parseDefault();
+- configFile = ConfigFileReader.parseDefault(configProfile);
- } else if (Files.exists(Paths.get(configFilePath))) {
-- configFile = ConfigFileReader.parse(configFilePath);
+- configFile = ConfigFileReader.parse(configFilePath, configProfile);
- } else {
-- throw ExceptionFactory.createException("configuration file does not exist");
+- throw ExceptionFactory.createException(Messages.getString("AuthenticationOciClientPlugin.ConfigFileNotFound"));
- }
- } catch (NoClassDefFoundError e) {
-- throw ExceptionFactory.createException(Messages.getString("AuthenticationOciClientPlugin.SdkNotFound"), e);
+- throw ExceptionFactory.createException(Messages.getString("AuthenticationOciClientPlugin.OciSdkNotFound"), e);
- } catch (IOException e) {
- throw ExceptionFactory.createException(Messages.getString("AuthenticationOciClientPlugin.OciConfigFileError"), e);
+- } catch (IllegalArgumentException e) {
+- throw ExceptionFactory.createException(Messages.getString("AuthenticationOciClientPlugin.ProfileNotFound"), e);
- }
-- this.fingerprint = configFile.get("fingerprint");
-- if (StringUtils.isNullOrEmpty(this.fingerprint)) {
+-
+- this.configFingerprint = configFile.get("fingerprint");
+- if (StringUtils.isNullOrEmpty(this.configFingerprint)) {
- throw ExceptionFactory.createException(Messages.getString("AuthenticationOciClientPlugin.OciConfigFileMissingEntry"));
- }
-- String keyFilePath = configFile.get("key_file");
-- if (StringUtils.isNullOrEmpty(keyFilePath)) {
+- this.configKeyFile = configFile.get("key_file");
+- if (StringUtils.isNullOrEmpty(this.configKeyFile)) {
- throw ExceptionFactory.createException(Messages.getString("AuthenticationOciClientPlugin.OciConfigFileMissingEntry"));
- }
+- this.configSecurityTokenFile = configFile.get("security_token_file");
+- }
-
+- private void initializePrivateKey() {
+- if (this.privateKey != null) {
+- // Already initialized.
+- return;
+- }
- try {
-- String key = new String(Files.readAllBytes(Paths.get(keyFilePath)), Charset.defaultCharset());
+- Path keyFilePath = Paths.get(this.configKeyFile);
+- if (Files.notExists(keyFilePath)) {
+- throw ExceptionFactory.createException(Messages.getString("AuthenticationOciClientPlugin.PrivateKeyNotFound"));
+- }
+- String key = new String(Files.readAllBytes(keyFilePath));
- this.privateKey = ExportControlled.decodeRSAPrivateKey(key);
- } catch (IOException e) {
-- throw ExceptionFactory.createException(Messages.getString("AuthenticationOciClientPlugin.PrivateKeyNotFound"), e);
+- throw ExceptionFactory.createException(Messages.getString("AuthenticationOciClientPlugin.FailedReadingPrivateKey"), e);
- } catch (RSAException | IllegalArgumentException e) {
- throw ExceptionFactory.createException(Messages.getString("AuthenticationOciClientPlugin.PrivateKeyNotValid"), e);
- }
- }
+-
+- private void initializeToken() {
+- if (this.token != null) {
+- // Already initialized.
+- return;
+- }
+- if (StringUtils.isNullOrEmpty(this.configSecurityTokenFile)) {
+- this.token = new byte[0];
+- return;
+- }
+- try {
+- Path securityTokenFilePath = Paths.get(this.configSecurityTokenFile);
+- if (Files.notExists(securityTokenFilePath)) {
+- throw ExceptionFactory.createException(Messages.getString("AuthenticationOciClientPlugin.SecurityTokenFileNotFound"));
+- }
+- long size = Files.size(securityTokenFilePath);
+- if (size > 10240) { // Fail if above 10KB.
+- throw ExceptionFactory.createException(Messages.getString("AuthenticationOciClientPlugin.SecurityTokenTooBig"));
+- }
+- this.token = Files.readAllBytes(Paths.get(this.configSecurityTokenFile));
+- } catch (IOException e) {
+- throw ExceptionFactory.createException(Messages.getString("AuthenticationOciClientPlugin.FailedReadingSecurityTokenFile"), e);
+- }
+- }
-}
diff --git a/src/main/resources/com/mysql/cj/LocalizedErrorMessages.properties b/src/main/resources/com/mysql/cj/LocalizedErrorMessages.properties
-index e4709a75..d29cdeb3 100644
+index 786c4cc..6268362 100644
--- a/src/main/resources/com/mysql/cj/LocalizedErrorMessages.properties
+++ b/src/main/resources/com/mysql/cj/LocalizedErrorMessages.properties
-@@ -50,12 +50,6 @@ AuthenticationLdapSaslClientPlugin.MissingLdapServerHostname=An LDAP Server host
+@@ -49,18 +49,6 @@ AuthenticationLdapSaslClientPlugin.MissingLdapServerHostname=An LDAP Server host
AuthenticationLdapSaslClientPlugin.FailCreateSaslClient=Failed creating a SASL client for the authentication mechanism ''{0}''.
AuthenticationLdapSaslClientPlugin.ErrProcessingAuthIter=Error while processing an authentication iteration for the authentication mechanism ''{0}''.
--AuthenticationOciClientPlugin.SdkNotFound=The OCI SDK could not be found or is not installed.
--AuthenticationOciClientPlugin.OciConfigFileError=OCI configuration file could not be read.
--AuthenticationOciClientPlugin.OciConfigFileMissingEntry=OCI configuration file does not contain a ''fingerprint'' or ''key_file'' entry.
--AuthenticationOciClientPlugin.PrivateKeyNotFound=Private key could not be found at location given by OCI configuration entry ''key_file''.
--AuthenticationOciClientPlugin.PrivateKeyNotValid=OCI configuration entry ''key_file'' does not reference a valid key file.
+-AuthenticationOciClientPlugin.ConfigFileNotFound=OCI configuration file not found.
+-AuthenticationOciClientPlugin.OciSdkNotFound=The OCI SDK cannot be found or it is not installed.
+-AuthenticationOciClientPlugin.OciConfigFileError=The OCI configuration file cannot be read.
+-AuthenticationOciClientPlugin.ProfileNotFound=The specified profile is not found in the OCI configuration file.
+-AuthenticationOciClientPlugin.OciConfigFileMissingEntry=The OCI configuration file does not contain a ''fingerprint'' or ''key_file'' entry.
+-AuthenticationOciClientPlugin.PrivateKeyNotFound=The private key cannot be found at the location referenced in the OCI configuration entry ''key_file''.
+-AuthenticationOciClientPlugin.FailedReadingPrivateKey=Failed reading the private key file referenced in the OCI configuration entry ''key_file''.
+-AuthenticationOciClientPlugin.PrivateKeyNotValid=The OCI configuration entry ''key_file'' does not reference a valid key file.
+-AuthenticationOciClientPlugin.SecurityTokenFileNotFound=The security token file cannot be found at the location referenced in the OCI configuration entry ''security_token_file''.
+-AuthenticationOciClientPlugin.SecurityTokenTooBig=Invalid security token file. File size above 10 KB.
+-AuthenticationOciClientPlugin.FailedReadingSecurityTokenFile=Failed reading the security token file referenced in the OCI configuration entry ''security_token_file''.
-
- AuthenticationProvider.BadAuthenticationPlugin=Unable to load authentication plugin ''{0}''.
AuthenticationProvider.BadDefaultAuthenticationPlugin=Improper value "{0}" for property ''defaultAuthenticationPlugin''.
AuthenticationProvider.DefaultAuthenticationPluginIsNotListed=Default authentication plugin "{0}" is neither one of the built-in plugins nor one of the plugins listed in ''authenticationPlugins''.
+ AuthenticationProvider.BadDisabledAuthenticationPlugin=Can''t disable the default authentication plugin. Either remove "{0}" from the disabled authentication plugins list, or choose a different default authentication plugin.
--
-2.35.1
+2.33.0
+
diff --git a/remove-coverage-test.patch b/remove-coverage-test.patch
deleted file mode 100644
index 7705ec65913ff1e002f4b27e085707d116adc1f2..0000000000000000000000000000000000000000
--- a/remove-coverage-test.patch
+++ /dev/null
@@ -1,191 +0,0 @@
-From cde027a4886ac1160ac42a6e4ba1fa2d271009be Mon Sep 17 00:00:00 2001
-From: Ondrej Dubaj
-Date: Thu, 28 Jul 2022 09:54:06 +0200
-Subject: [PATCH] Remove coverage test
-
----
- build.xml | 162 ------------------------------------------------------
- 1 file changed, 162 deletions(-)
-
-diff --git a/build.xml b/build.xml
-index 8c4e9f5d..3d13bf45 100644
---- a/build.xml
-+++ b/build.xml
-@@ -1279,82 +1279,6 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
-
- ${com.mysql.cj.testsuite.message.test.mode}
-
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
-
-
-
-@@ -1367,92 +1291,6 @@ See also com.mysql.cj.conf.PropertyDefinitions.SYSP_* variables for other test o
-
-
-
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
--
-
-
-
---
-2.37.1