- Refonte graphique.
- Ajout de classe liée a la BDD.
- Debug et  améliorations .
This commit is contained in:
ccunatbrule
2022-07-05 15:17:07 +02:00
parent 464c9ffa3e
commit 495c6c6bb8
789 changed files with 2129 additions and 329354 deletions

View File

@@ -1,15 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-16">
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="//NASCCB/Documents/Programmation/eclipse-workspace/DB/mysql-connector-java-8.0.26/mariadb-java-client-2.7.4.jar">
<classpathentry kind="lib" path="//NASCCB/Workspace/JAVA-eclipse/DB/mysql-connector-java-8.0.26/mariadb-java-client-2.7.4.jar">
<attributes>
<attribute name="module" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="lib" path="miglayout15-swing.jar" sourcepath="miglayout-src.zip"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View File

@@ -1,5 +1,6 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=16
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=16

BIN
bin/images/Thumbs.db Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 43 KiB

BIN
bin/images/favicon2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +0,0 @@
build-date: 2021-06-08 16:39:29 +0000
os-info: Linux i386 4.1.12-124.48.6.el6uek.x86_64
compiler: javac 1.8.0_241
build-tool: Apache Ant(TM) version 1.10.7 compiled on September 1 2019

View File

@@ -1,5 +0,0 @@
version: 8.0.26
branch: release/8.0.26
date: 2021-06-08 14:49:03 +0100
commit: 9aae1e450989d62c06616c1dcda3e404ef84df70
short: 9aae1e45

File diff suppressed because it is too large Load Diff

View File

@@ -1,28 +0,0 @@
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
This is a release of MySQL Connector/J, a JDBC Type 4 driver for MySQL that
also supports the new X DevAPI.
License information can be found in the LICENSE file.
This distribution may include materials developed by third parties.
For license and attribution notices for these materials, please refer to the
LICENSE file.
For more information on MySQL Connector/J, visit
https://dev.mysql.com/doc/connector-j/8.0/en/
For additional downloads and the source of MySQL Connector/J, visit
https://dev.mysql.com/downloads/
MySQL Connector/J is brought to you by the MySQL team at Oracle.
Notice:
- In order to use the logging capabilities provided by the default
implementation com.mysql.cj.log.Slf4JLogger, it is required to add one or
more jars for Simple Logging Facade for Java (SLF4J) to your CLASSPATH.
- To use the X DevAPI features in Connector/J, you also need the external
library protobuf-java, which you can download manually from the official
Maven repository and add it to the CLASSPATH, or use Maven's automatic
dependency resolution features by adding a dependency to "GroupId: mysql"
and "ArtifactId: mysql-connector-java" to your project's pom.xml file.

File diff suppressed because it is too large Load Diff

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>misc</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>

View File

@@ -1,66 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2019, 2020, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License, version 2.0, as published by the
Free Software Foundation.
This program is also distributed with certain software (including but not
limited to OpenSSL) that is licensed under separate terms, as designated in a
particular file or component or in included license documentation. The
authors of MySQL hereby grant you an additional permission to link the
program and your derivative works with the separately licensed software that
they have included with MySQL.
Without limiting anything contained in the foregoing, this file, which is
part of MySQL Connector/J, is also subject to the Universal FOSS Exception,
version 1.0, a copy of which can be found at
http://oss.oracle.com/licenses/universal-foss-exception.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
for more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-->
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="MySQL Connector J" Language="1033" Version="$(var.ProductVersion)" Manufacturer="Oracle Corporation" UpgradeCode="a887f346-5f02-4cf1-bb85-bf34b4c5f248">
<Package InstallerVersion="200" Compressed="yes" />
<Upgrade Id="574f7b74-d753-4965-995d-2de6a79afd01">
<UpgradeVersion OnlyDetect="no"
Minimum="6.0.0"
IncludeMinimum="yes"
Maximum="8.0.12"
IncludeMaximum="yes"
Property="OLDERVERSIONBEINGUPGRADED_OLD"/>
</Upgrade>
<Upgrade Id="a887f346-5f02-4cf1-bb85-bf34b4c5f248">
<UpgradeVersion OnlyDetect="no"
Minimum="8.0.13"
IncludeMinimum="yes"
Maximum="$(var.ProductVersion)"
Property="OLDERVERSIONBEINGUPGRADED"
IncludeMaximum="yes" />
</Upgrade>
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="MySQL" Name="MySQL">
<Directory Id="INSTALLLOCATION" Name="MySQL Connector J 8.0">
<!-- Components Autogenerated using the WiX tool named Heat. See the Project properties for cmd line. -->
</Directory>
</Directory>
</Directory>
</Directory>
<Feature Id="ProductFeature" Title="wix_solution" Level="1">
<ComponentGroupRef Id="ConnJZipContents"/>
</Feature>
<InstallExecuteSequence>
<RemoveExistingProducts After="InstallInitialize" />
</InstallExecuteSequence>
</Product>
</Wix>

View File

@@ -1,5 +0,0 @@
@PRODUCT_NAME@@PRODUCT_SUFFIX@ (@MYSQL_CJ_VERSION@@MYSQL_CJ_VERSION_SNAPSHOT@@DEB_VERSION_SUFFIX@@ID_RELEASE@) @CODENAME@; urgency=low
* For release notes, please refer to https://dev.mysql.com/doc/relnotes/connector-j/8.0/en/
-- @MAINTAINER_EMAIL@ @PACKAGE_TIMESTAMP@

View File

@@ -1,14 +0,0 @@
Source: @PRODUCT_NAME@@PRODUCT_SUFFIX@
Section: database
Priority: optional
Maintainer: Oracle MySQL Product Engineering Team <mysql-build@oss.oracle.com>
Standards-Version: 3.9.2
Build-Depends: debhelper (>= 8.9.4)
Homepage: http://dev.mysql.com/downloads/connector/j/
Package: @PRODUCT_NAME@@PRODUCT_SUFFIX@
Section: database
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: MySQL Connector/J
Standardized MySQL database driver for Java

View File

@@ -1,9 +0,0 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: @PRODUCT@
Upstream-Contact: MySQL Release Engineering <mysql-build@oss.oracle.com>
Source: http://dev.mysql.com/
Files: *
Copyright: 2002, 2021, Oracle and/or its affiliates.
License:
For licensing information see the LICENSE file in this distribution.

View File

@@ -1,8 +0,0 @@
dist/toArchive/@PACKAGE_NAME@/@PRODUCT_NAME@@PRODUCT_SUFFIX@-@VERSION_FULL@.jar usr/share/java
#legal
dist/toArchive/@PACKAGE_NAME@/@LIC_FILE@ usr/share/doc/@PRODUCT_NAME@@PRODUCT_SUFFIX@
dist/toArchive/@PACKAGE_NAME@/README usr/share/doc/@PRODUCT_NAME@@PRODUCT_SUFFIX@
dist/toArchive/@PACKAGE_NAME@/CHANGES usr/share/doc/@PRODUCT_NAME@@PRODUCT_SUFFIX@
dist/toArchive/@PACKAGE_NAME@/INFO_SRC usr/share/doc/@PRODUCT_NAME@@PRODUCT_SUFFIX@
dist/toArchive/@PACKAGE_NAME@/INFO_BIN usr/share/doc/@PRODUCT_NAME@@PRODUCT_SUFFIX@

View File

@@ -1,77 +0,0 @@
#!/usr/bin/make -f
# Copyright (c) 2016, 2020, Oracle and/or its affiliates.
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License, version 2.0, as published by the
# Free Software Foundation.
#
# This program is also distributed with certain software (including but not
# limited to OpenSSL) that is licensed under separate terms, as designated in a
# particular file or component or in included license documentation. The
# authors of MySQL hereby grant you an additional permission to link the
# program and your derivative works with the separately licensed software that
# they have included with MySQL.
#
# Without limiting anything contained in the foregoing, this file, which is
# part of MySQL Connector/J, is also subject to the Universal FOSS Exception,
# version 1.0, a copy of which can be found at
# http://oss.oracle.com/licenses/universal-foss-exception.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
# for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
upstream_version := $(shell dpkg-parsechangelog | sed -n -e'/^Version: / { s/Version: //; s/-[^-]\+$$//; p }')
base_version = $(shell echo $(upstream_version) | sed -e's/r[0-9]\+$$//')
ANT_COMMON_OPTIONS=\
-Dcom.mysql.cj.build.dir.driver=build/driver \
-Dcom.mysql.cj.extra.libs=@WITH_JARDEPS@ \
-Dcom.mysql.cj.build.driver.version.status=@MYSQL_CJ_VERSION_STATUS@ \
-Dcom.mysql.cj.build.driver.version.extra=@MYSQL_CJ_VERSION_EXTRA@ \
-Dcom.mysql.cj.build.driver.version.snapshot=@MYSQL_CJ_VERSION_SNAPSHOT@ \
-Dcom.mysql.cj.build.driver.extraName=@PRODUCT_SUFFIX@ \
-Dcom.mysql.cj.dist.licenseUrl=@MYSQL_CJ_LICENSEURL@ \
-Djava.awt.headless=true
ifeq ($(ANT_HOME),)
ANT_CMD=ant
else
ANT_CMD=$(ANT_HOME)/bin/ant
endif
ANT_OPTS=-Xmx512M
ifneq ($(JAVA_HOME),)
ANT_JAVA_OPT=-Dcom.mysql.cj.build.jdk=$(JAVA_HOME)
endif
ifneq ($(COMMERCIAL),)
ANT_COM_OPT=-Dcom.mysql.cj.build.commercial=true
endif
%:
#dh $@ --with autoreconf
dh $@
override_dh_auto_configure:
override_dh_auto_build:
echo $(PATH)
echo $(JAVA_HOME)
$(ANT_CMD) \
$(ANT_COMMON_OPTIONS) \
$(ANT_JAVA_OPT) \
$(ANT_COM_OPT) \
full-package-no-sources
override_dh_auto_clean:
$(ANT_CMD) $(ANT_COMMON_OPTIONS) clean
override_dh_installchangelogs:
dh_installchangelogs -XCHANGES

View File

@@ -1,2 +0,0 @@
version=3
http://mysql.osuosl.org/Downloads/@PRODUCT_NAME@-(.+)\.tar\.gz

View File

@@ -1,67 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright (c) 2006, 2020, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License, version 2.0, as published by the
Free Software Foundation.
This program is also distributed with certain software (including but not
limited to OpenSSL) that is licensed under separate terms, as designated in a
particular file or component or in included license documentation. The
authors of MySQL hereby grant you an additional permission to link the
program and your derivative works with the separately licensed software that
they have included with MySQL.
Without limiting anything contained in the foregoing, this file, which is
part of MySQL Connector/J, is also subject to the Universal FOSS Exception,
version 1.0, a copy of which can be found at
http://oss.oracle.com/licenses/universal-foss-exception.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
for more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-->
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>@MYSQL_CJ_VERSION@</version>
<packaging>jar</packaging>
<name>MySQL Connector/J</name>
<description>JDBC Type 4 driver for MySQL</description>
<licenses>
<license>
<name>The GNU General Public License, v2 with FOSS exception</name>
<distribution>repo</distribution>
<comments>For detailed license information see the LICENSE file in this distribution.</comments>
</license>
</licenses>
<url>http://dev.mysql.com/doc/connector-j/en/</url>
<scm>
<connection>scm:git:git@github.com:mysql/mysql-connector-j.git</connection>
<url>https://github.com/mysql/mysql-connector-j</url>
</scm>
<organization>
<name>Oracle Corporation</name>
<url>http://www.oracle.com</url>
</organization>
<dependencies>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>3.11.4</version>
</dependency>
</dependencies>
</project>

View File

@@ -1,197 +0,0 @@
# Copyright (c) 2017, 2020, Oracle and/or its affiliates.
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License, version 2.0, as published by the
# Free Software Foundation.
#
# This program is also distributed with certain software (including but not
# limited to OpenSSL) that is licensed under separate terms, as designated in a
# particular file or component or in included license documentation. The
# authors of MySQL hereby grant you an additional permission to link the
# program and your derivative works with the separately licensed software that
# they have included with MySQL.
#
# Without limiting anything contained in the foregoing, this file, which is
# part of MySQL Connector/J, is also subject to the Universal FOSS Exception,
# version 1.0, a copy of which can be found at
# http://oss.oracle.com/licenses/universal-foss-exception.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
# for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# You can pass these options to "rpmbuild"
#
# --define="commercial <nonempty>"
# --define="with_ant <path>"
# --define="with_java <path>"
# --define="with_jardeps <path>"
# --define="with_docs <path>"
#
# The 'with_docs' option should have a path that points out
#
# <docs-base>/en/html/connector-j.html
# <docs-base>/en/html/mvl.css (not really used)
# <docs-base>/en/pdf/connector-j.pdf
# <docs-base>/en/txt/connector-j.txt
# Some linux distributions doesn't set the "dist" macro. There is a
# list how to identify dists here
# https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto
# SuSE will not set "dist", others do
%if 0%{?suse_version} == 1315
%global dist .sles12
%global sles12 1
%endif
%if 0%{?suse_version} == 1500
%global dist .sl15
%global sles15 1
%endif
%if 0%{?commercial:1}
%global lic_tag Commercial
%else
%global lic_tag GPLv2
%endif
Summary: Standardized MySQL database driver for Java
Name: @MYSQL_CJ_EXTENDED_PROD_NAME@
Version: @MYSQL_CJ_VERSION_NUMERIC@
Release: @MYSQL_CJ_RPM_RELEASE_FULL@%{?dist}
Epoch: 1
License: %{lic_tag}
Group: Development/Libraries
URL: http://dev.mysql.com/downloads/connector/j/
Source0: https://cdn.mysql.com/Downloads/Connector-J/@MYSQL_CJ_FULL_PROD_NAME@.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%if 0%{?commercial:1}
Obsoletes: mysql-connector-java < %{version}-%{release}
Provides: mysql-connector-java = %{version}-%{release}
%endif
%if 0%{!?with_ant:1}
BuildRequires: ant
%endif
%if 0%{!?with_java:1}
BuildRequires: java-devel >= 1:1.8.0
%endif
%if 0%{?sles12:1} || 0%{?sles15:1}
Requires: java-headless >= 1.8.0
%else
Requires: java-headless >= 1:1.8.0
%endif
%description
MySQL provides connectivity for client applications developed in the
Java programming language with @MYSQL_CJ_DISPLAY_PROD_NAME@, a driver that
implements the [Java Database Connectivity (JDBC) API]
(http://www.oracle.com/technetwork/java/javase/jdbc/).
@MYSQL_CJ_DISPLAY_PROD_NAME@ @MYSQL_CJ_VERSION_SERIES@ is a JDBC Type 4 driver that is compatible with
the [JDBC 4.2](http://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/)
specification. The Type 4 designation means that the driver is a pure
Java implementation of the MySQL protocol and does not rely on the
MySQL client libraries.
For detailed information please visit the official
[@MYSQL_CJ_DISPLAY_PROD_NAME@ documentation]
(http://dev.mysql.com/doc/connector-j/en/).
%prep
%setup -q -n @MYSQL_CJ_FULL_PROD_NAME@
%build
COMMON_OPTIONS="\
-Dcom.mysql.cj.build.dir.driver=build/driver
-Dcom.mysql.cj.extra.libs=%{with_jardeps} \
-Dcom.mysql.cj.build.driver.version.status=@MYSQL_CJ_VERSION_STATUS@ \
-Dcom.mysql.cj.build.driver.version.extra=@MYSQL_CJ_VERSION_EXTRA@ \
-Dcom.mysql.cj.build.driver.version.snapshot=@MYSQL_CJ_VERSION_SNAPSHOT@ \
-Dcom.mysql.cj.build.driver.extraName=@MYSQL_CJ_EXTRA_NAME@ \
-Dcom.mysql.cj.dist.licenseUrl=@MYSQL_CJ_LICENSEURL@ \
-Djava.awt.headless=true"
%if 0%{?with_ant:1}
export ANT_HOME=%{with_ant}
export ANT_CMD="${ANT_HOME}/bin/ant"
%else
export ANT_CMD="ant"
%endif
export ANT_OPTS=-Xmx512M
%if 0%{?with_java:1}
export JAVA_HOME=%{with_java}
export PATH=${JAVA_HOME}/bin:$PATH
COMMON_OPTIONS="${COMMON_OPTIONS} -Dcom.mysql.cj.build.jdk=${JAVA_HOME}"
%endif
%if 0%{?commercial:1}
COMMON_OPTIONS="${COMMON_OPTIONS} -Dcom.mysql.cj.build.commercial=true"
%endif
# Get the file revision-info.properties again because it was excluded
# from SOURCES
cp %{_tmppath}/@MYSQL_CJ_FULL_PROD_NAME@/revision-info.properties .
${ANT_CMD} \
${COMMON_OPTIONS} \
full-package-no-sources
# We use the 'full-package-no-sources' as there are changes done only
# when creating a package, 'dist' is not enough. To make it a bit easier
# in the install step, we rename the directory with the content
mv dist/toArchive/@PACKAGE_NAME@ package-content
# The 'package' target doesn't copy the HTML or PDF doc like 'dist',
# we copy it here
%if 0%{?with_docs:1}
mkdir -p package-content/docs
cp %{with_docs}/en/html/connector-j.html package-content/docs/
cp %{with_docs}/en/html/mvl.css package-content/docs/
cp %{with_docs}/en/pdf/connector-j.pdf package-content/docs/
cp %{with_docs}/en/txt/connector-j.txt package-content/docs/
%endif
%install
install -d -m 0755 %{buildroot}%{_javadir}
install -p -m 0644 package-content/@MYSQL_CJ_FULL_PROD_NAME@.jar %{buildroot}%{_javadir}/%{name}.jar
%clean
rm -rf %{buildroot}
%files
%doc package-content/CHANGES
# EL6 doesn't like 'license' macro here, so we use 'doc'
%doc package-content/LICENSE
%doc package-content/README
%doc package-content/INFO_BIN
%doc package-content/INFO_SRC
%if 0%{?with_docs:1}
# README.txt is a rename of "connector-j.txt"
%doc package-content/docs/connector-j.txt
%doc package-content/docs/connector-j.pdf
%doc package-content/docs/connector-j.html
%doc package-content/docs/mvl.css
%endif
%{_javadir}/%{name}.jar
%changelog
* Mon Nov 27 2017 MySQL Release Engineering <mysql-build@oss.oracle.com> - 8.0.9-1
- Set more in "build.xml"
* Tue Mar 14 2017 MySQL Release Engineering <mysql-build@oss.oracle.com> - 6.0.7-1
- initial package

View File

@@ -1,18 +0,0 @@
<body>
<h1>MySQL Connector/J Reference</h1>
<p/>
This is a full documentation of Connector/J.
<p/>
To get started with X DevAPI, check out some of the main classes:
<ul>
<li>Sessions can be created with {@link com.mysql.cj.xdevapi.SessionFactory}.</li>
<li>Session operations are available on a {@link com.mysql.cj.xdevapi.Session}.</li>
<li>JSON document collections are represented by a {@link com.mysql.cj.xdevapi.Collection}.</li>
<li>Working with JSON documents is done with a {@link com.mysql.cj.xdevapi.DbDoc}.</li>
</ul>
For an introduction to X DevAPI concepts, refer to the <a href="http://dev.mysql.com/doc/x-devapi-userguide/en/index.html">X DevAPI User Guide</a>.
</body>

View File

@@ -1,15 +0,0 @@
<body>
<h1>MySQL Connector/J X DevAPI Reference</h1>
<p></p>
This documentation covers the public classes and interfaces of the Java implementation of the X DevAPI. To get started, check out some of the main classes:
<ul>
<li>Sessions can be created with {@link com.mysql.cj.xdevapi.SessionFactory}.</li>
<li>Session operations are available on a {@link com.mysql.cj.xdevapi.Session}.</li>
<li>JSON document collections are represented by a {@link com.mysql.cj.xdevapi.Collection}.</li>
<li>Working with JSON documents is done with a {@link com.mysql.cj.xdevapi.DbDoc}.</li>
</ul>
For an introduction to concepts, refer to the <a href="http://dev.mysql.com/doc/x-devapi-userguide/en/index.html" target="_blank">X DevAPI User Guide</a>.
</body>

View File

@@ -1,110 +0,0 @@
# Copyright (c) 2019, 2020, Oracle and/or its affiliates.
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License, version 2.0, as published by the
# Free Software Foundation.
#
# This program is also distributed with certain software (including but not
# limited to OpenSSL) that is licensed under separate terms, as designated in a
# particular file or component or in included license documentation. The
# authors of MySQL hereby grant you an additional permission to link the
# program and your derivative works with the separately licensed software that
# they have included with MySQL.
#
# Without limiting anything contained in the foregoing, this file, which is
# part of MySQL Connector/J, is also subject to the Universal FOSS Exception,
# version 1.0, a copy of which can be found at
# http://oss.oracle.com/licenses/universal-foss-exception.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
# for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# Mandatory TLS Ciphers
TLSCiphers.Mandatory=\
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256,\
TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384,\
TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
# Approved TLS Ciphers
TLSCiphers.Approved=\
TLS_AES_128_GCM_SHA256,\
TLS_AES_256_GCM_SHA384,\
TLS_CHACHA20_POLY1305_SHA256,\
TLS_AES_128_CCM_SHA256,\
TLS_AES_128_CCM_8_SHA256,\
TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384,\
TLS_DHE_RSA_WITH_AES_128_GCM_SHA256,\
TLS_DHE_DSS_WITH_AES_128_GCM_SHA256,\
TLS_DHE_DSS_WITH_AES_256_GCM_SHA384,\
TLS_DHE_RSA_WITH_AES_256_GCM_SHA384,\
TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256,\
TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256,\
TLS_DH_DSS_WITH_AES_128_GCM_SHA256,\
TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256,\
TLS_DH_DSS_WITH_AES_256_GCM_SHA384,\
TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384,\
TLS_DH_RSA_WITH_AES_128_GCM_SHA256,\
TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256,\
TLS_DH_RSA_WITH_AES_256_GCM_SHA384,\
TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
# Deprecated TLS Ciphers
TLSCiphers.Deprecated=\
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256,\
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256,\
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,\
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,\
TLS_DHE_DSS_WITH_AES_128_CBC_SHA256,\
TLS_DHE_DSS_WITH_AES_256_CBC_SHA256,\
TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,\
TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,\
TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA,\
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA,\
TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,\
TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,\
TLS_DHE_DSS_WITH_AES_128_CBC_SHA,\
TLS_DHE_RSA_WITH_AES_128_CBC_SHA,\
TLS_DHE_DSS_WITH_AES_256_CBC_SHA,\
TLS_DHE_RSA_WITH_AES_256_CBC_SHA,\
TLS_DH_RSA_WITH_AES_128_CBC_SHA256,\
TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256,\
TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256,\
TLS_DH_RSA_WITH_AES_256_CBC_SHA256,\
TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384,\
TLS_DH_DSS_WITH_AES_128_CBC_SHA256,\
TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384,\
TLS_DH_DSS_WITH_AES_128_CBC_SHA,\
TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA,\
TLS_DH_DSS_WITH_AES_256_CBC_SHA,\
TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA,\
TLS_DH_DSS_WITH_AES_256_CBC_SHA256,\
TLS_DH_RSA_WITH_AES_128_CBC_SHA,\
TLS_ECDH_RSA_WITH_AES_128_CBC_SHA,\
TLS_DH_RSA_WITH_AES_256_CBC_SHA,\
TLS_ECDH_RSA_WITH_AES_256_CBC_SHA,\
TLS_RSA_WITH_AES_128_GCM_SHA256,\
TLS_RSA_WITH_AES_256_GCM_SHA384,\
TLS_RSA_WITH_AES_128_CBC_SHA256,\
TLS_RSA_WITH_AES_256_CBC_SHA256,\
TLS_RSA_WITH_AES_128_CBC_SHA,\
TLS_RSA_WITH_AES_256_CBC_SHA,\
TLS_RSA_WITH_CAMELLIA_256_CBC_SHA,\
TLS_RSA_WITH_CAMELLIA_128_CBC_SHA,\
TLS_DH_DSS_WITH_3DES_EDE_CBC_SHA,\
TLS_DH_RSA_WITH_3DES_EDE_CBC_SHA,\
TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA,\
TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA,\
TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA,\
TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA,\
TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA,\
TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA,\
TLS_RSA_WITH_3DES_EDE_CBC_SHA
# Unacceptable TLS Ciphers
TLSCiphers.Unacceptable.Mask=_ANON_,_NULL_,_EXPORT,_MD5,_DES,_RC2_,_RC4_,_PSK_

View File

@@ -1,16 +0,0 @@
#
# Settings to maintain Connector/J 3.0.x compatibility
# (as much as it can be)
#
emptyStringsConvertToZero=true
jdbcCompliantTruncation=false
noDatetimeStringSync=true
nullCatalogMeansCurrent=true
transformedBitIsBoolean=false
dontTrackOpenResources=true
zeroDateTimeBehavior=CONVERT_TO_NULL
useServerPrepStmts=false
autoClosePStmtStreams=true
processEscapeCodesForPrepStmts=false
populateInsertRowWithDefaultValues=false

View File

@@ -1,3 +0,0 @@
# Basic properties for clusters
autoReconnect=true
failOverReadOnly=false

View File

@@ -1,16 +0,0 @@
#
# Properties for optimal usage in ColdFusion
#
#
# CF's pool tends to be "chatty" like DBCP
#
alwaysSendSetIsolation=false
useLocalSessionState=true
#
# CF's pool seems to loose connectivity on page restart
#
autoReconnect=true

View File

@@ -1,6 +0,0 @@
# Settings for 'max-debug' style situations
profileSQL=true
gatherPerfMetrics=true
useUsageAdvisor=true
logSlowQueries=true
explainSlowQueries=true

View File

@@ -1,38 +0,0 @@
#
# A configuration that maximizes performance, while
# still staying JDBC-compliant and not doing anything that
# would be "dangerous" to run-of-the-mill J2EE applications
#
# Note that because we're caching things like callable statements
# and the server configuration, this bundle isn't appropriate
# for use with servers that get config'd dynamically without
# restarting the application using this configuration bundle.
cachePrepStmts=true
cacheCallableStmts=true
cacheServerConfiguration=true
#
# Reduces amount of calls to database to set
# session state. "Safe" as long as application uses
# Connection methods to set current database, autocommit
# and transaction isolation
#
useLocalSessionState=true
elideSetAutoCommits=true
alwaysSendSetIsolation=false
# Can cause high-GC pressure if timeouts are used on every
# query
enableQueryTimeouts=false
# Bypass connection attribute handling during connection
# setup
connectionAttributes=none
# INFORMATION_SCHEMA in MySQL 8.0 is more efficient because
# of integration with data dictionary
useInformationSchema=true

View File

@@ -1,34 +0,0 @@
#
# A configuration that maximizes performance, while
# still staying JDBC-compliant and not doing anything that
# would be "dangerous" to run-of-the-mill J2EE applications
#
# Note that because we're caching things like callable statements
# and the server configuration, this bundle isn't appropriate
# for use with servers that get config'd dynamically without
# restarting the application using this configuration bundle.
cachePrepStmts=true
cacheCallableStmts=true
cacheServerConfiguration=true
#
# Reduces amount of calls to database to set
# session state. "Safe" as long as application uses
# Connection methods to set current database, autocommit
# and transaction isolation
#
useLocalSessionState=true
elideSetAutoCommits=true
alwaysSendSetIsolation=false
# Can cause high-GC pressure if timeouts are used on every
# query
enableQueryTimeouts=false
# Bypass connection attribute handling during connection
# setup
connectionAttributes=none

View File

@@ -1,13 +0,0 @@
#
# Solaris has pretty high syscall overhead, so these configs
# remove as many syscalls as possible.
#
# Reduce recv() syscalls
useUnbufferedInput=false
useReadAheadInput=false
# Reduce number of calls to getTimeOfDay()
maintainTimeStats=false

View File

@@ -1,502 +0,0 @@
# Copyright (c) 2014, 2020, Oracle and/or its affiliates.
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License, version 2.0, as published by the
# Free Software Foundation.
#
# This program is also distributed with certain software (including but not
# limited to OpenSSL) that is licensed under separate terms, as designated in a
# particular file or component or in included license documentation. The
# authors of MySQL hereby grant you an additional permission to link the
# program and your derivative works with the separately licensed software that
# they have included with MySQL.
#
# Without limiting anything contained in the foregoing, this file, which is
# part of MySQL Connector/J, is also subject to the Universal FOSS Exception,
# version 1.0, a copy of which can be found at
# http://oss.oracle.com/licenses/universal-foss-exception.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
# for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#Windows Zones
#Mon Apr 24 23:22:45 WEST 2017
AUS\ Central\ Daylight\ Time=Australia/Darwin
AUS\ Central\ Standard\ Time=Australia/Darwin
AUS\ Eastern\ Daylight\ Time=Australia/Sydney
AUS\ Eastern\ Standard\ Time=Australia/Sydney
Afghanistan\ Daylight\ Time=Asia/Kabul
Afghanistan\ Standard\ Time=Asia/Kabul
Alaskan\ Daylight\ Time=America/Anchorage
Alaskan\ Standard\ Time=America/Anchorage
Aleutian\ Daylight\ Time=America/Adak
Aleutian\ Standard\ Time=America/Adak
Altai\ Daylight\ Time=Asia/Barnaul
Altai\ Standard\ Time=Asia/Barnaul
Arab\ Daylight\ Time=Asia/Riyadh
Arab\ Standard\ Time=Asia/Riyadh
Arabian\ Daylight\ Time=Asia/Dubai
Arabian\ Standard\ Time=Asia/Dubai
Arabic\ Daylight\ Time=Asia/Baghdad
Arabic\ Standard\ Time=Asia/Baghdad
Argentina\ Daylight\ Time=America/Buenos_Aires
Argentina\ Standard\ Time=America/Buenos_Aires
Astrakhan\ Daylight\ Time=Europe/Astrakhan
Astrakhan\ Standard\ Time=Europe/Astrakhan
Atlantic\ Daylight\ Time=America/Halifax
Atlantic\ Standard\ Time=America/Halifax
Aus\ Central\ W.\ Daylight\ Time=Australia/Eucla
Aus\ Central\ W.\ Standard\ Time=Australia/Eucla
Azerbaijan\ Daylight\ Time=Asia/Baku
Azerbaijan\ Standard\ Time=Asia/Baku
Azores\ Daylight\ Time=Atlantic/Azores
Azores\ Standard\ Time=Atlantic/Azores
Bahia\ Daylight\ Time=America/Bahia
Bahia\ Standard\ Time=America/Bahia
Bangladesh\ Daylight\ Time=Asia/Dhaka
Bangladesh\ Standard\ Time=Asia/Dhaka
Belarus\ Daylight\ Time=Europe/Minsk
Belarus\ Standard\ Time=Europe/Minsk
Bougainville\ Daylight\ Time=Pacific/Bougainville
Bougainville\ Standard\ Time=Pacific/Bougainville
Canada\ Central\ Daylight\ Time=America/Regina
Canada\ Central\ Standard\ Time=America/Regina
Cape\ Verde\ Daylight\ Time=Atlantic/Cape_Verde
Cape\ Verde\ Standard\ Time=Atlantic/Cape_Verde
Caucasus\ Daylight\ Time=Asia/Yerevan
Caucasus\ Standard\ Time=Asia/Yerevan
Cen.\ Australia\ Daylight\ Time=Australia/Adelaide
Cen.\ Australia\ Standard\ Time=Australia/Adelaide
Central\ America\ Daylight\ Time=America/Guatemala
Central\ America\ Standard\ Time=America/Guatemala
Central\ Asia\ Daylight\ Time=Asia/Almaty
Central\ Asia\ Standard\ Time=Asia/Almaty
Central\ Brazilian\ Daylight\ Time=America/Cuiaba
Central\ Brazilian\ Standard\ Time=America/Cuiaba
Central\ Daylight\ Time=America/Chicago
Central\ Daylight\ Time\ (Mexico)=America/Mexico_City
Central\ Europe\ Daylight\ Time=Europe/Budapest
Central\ Europe\ Standard\ Time=Europe/Budapest
Central\ European\ Daylight\ Time=Europe/Warsaw
Central\ European\ Standard\ Time=Europe/Warsaw
Central\ Pacific\ Daylight\ Time=Pacific/Guadalcanal
Central\ Pacific\ Standard\ Time=Pacific/Guadalcanal
Central\ Standard\ Time=America/Chicago
Central\ Standard\ Time\ (Mexico)=America/Mexico_City
Chatham\ Islands\ Daylight\ Time=Pacific/Chatham
Chatham\ Islands\ Standard\ Time=Pacific/Chatham
China\ Daylight\ Time=Asia/Shanghai
China\ Standard\ Time=Asia/Shanghai
Cuba\ Daylight\ Time=America/Havana
Cuba\ Standard\ Time=America/Havana
Dateline\ Daylight\ Time=Etc/GMT+12
Dateline\ Standard\ Time=Etc/GMT+12
E.\ Africa\ Daylight\ Time=Africa/Nairobi
E.\ Africa\ Standard\ Time=Africa/Nairobi
E.\ Australia\ Daylight\ Time=Australia/Brisbane
E.\ Australia\ Standard\ Time=Australia/Brisbane
E.\ Europe\ Daylight\ Time=Europe/Chisinau
E.\ Europe\ Standard\ Time=Europe/Chisinau
E.\ South\ America\ Daylight\ Time=America/Sao_Paulo
E.\ South\ America\ Standard\ Time=America/Sao_Paulo
Easter\ Island\ Daylight\ Time=Pacific/Easter
Easter\ Island\ Standard\ Time=Pacific/Easter
Eastern\ Daylight\ Time=America/New_York
Eastern\ Daylight\ Time\ (Mexico)=America/Cancun
Eastern\ Standard\ Time=America/New_York
Eastern\ Standard\ Time\ (Mexico)=America/Cancun
Egypt\ Daylight\ Time=Africa/Cairo
Egypt\ Standard\ Time=Africa/Cairo
Ekaterinburg\ Daylight\ Time=Asia/Yekaterinburg
Ekaterinburg\ Standard\ Time=Asia/Yekaterinburg
FLE\ Daylight\ Time=Europe/Kiev
FLE\ Standard\ Time=Europe/Kiev
Fiji\ Daylight\ Time=Pacific/Fiji
Fiji\ Standard\ Time=Pacific/Fiji
GMT\ Daylight\ Time=Europe/London
GMT\ Standard\ Time=Europe/London
GTB\ Daylight\ Time=Europe/Bucharest
GTB\ Standard\ Time=Europe/Bucharest
Georgian\ Daylight\ Time=Asia/Tbilisi
Georgian\ Standard\ Time=Asia/Tbilisi
Greenland\ Daylight\ Time=America/Godthab
Greenland\ Standard\ Time=America/Godthab
Greenwich\ Daylight\ Time=Atlantic/Reykjavik
Greenwich\ Standard\ Time=Atlantic/Reykjavik
Haiti\ Daylight\ Time=America/Port-au-Prince
Haiti\ Standard\ Time=America/Port-au-Prince
Hawaiian\ Daylight\ Time=Pacific/Honolulu
Hawaiian\ Standard\ Time=Pacific/Honolulu
India\ Daylight\ Time=Asia/Calcutta
India\ Standard\ Time=Asia/Calcutta
Iran\ Daylight\ Time=Asia/Tehran
Iran\ Standard\ Time=Asia/Tehran
Israel\ Daylight\ Time=Asia/Jerusalem
Israel\ Standard\ Time=Asia/Jerusalem
Jordan\ Daylight\ Time=Asia/Amman
Jordan\ Standard\ Time=Asia/Amman
Kaliningrad\ Daylight\ Time=Europe/Kaliningrad
Kaliningrad\ Standard\ Time=Europe/Kaliningrad
Korea\ Daylight\ Time=Asia/Seoul
Korea\ Standard\ Time=Asia/Seoul
Libya\ Daylight\ Time=Africa/Tripoli
Libya\ Standard\ Time=Africa/Tripoli
Line\ Islands\ Daylight\ Time=Pacific/Kiritimati
Line\ Islands\ Standard\ Time=Pacific/Kiritimati
Lord\ Howe\ Daylight\ Time=Australia/Lord_Howe
Lord\ Howe\ Standard\ Time=Australia/Lord_Howe
Magadan\ Daylight\ Time=Asia/Magadan
Magadan\ Standard\ Time=Asia/Magadan
Marquesas\ Daylight\ Time=Pacific/Marquesas
Marquesas\ Standard\ Time=Pacific/Marquesas
Mauritius\ Daylight\ Time=Indian/Mauritius
Mauritius\ Standard\ Time=Indian/Mauritius
Middle\ East\ Daylight\ Time=Asia/Beirut
Middle\ East\ Standard\ Time=Asia/Beirut
Montevideo\ Daylight\ Time=America/Montevideo
Montevideo\ Standard\ Time=America/Montevideo
Morocco\ Daylight\ Time=Africa/Casablanca
Morocco\ Standard\ Time=Africa/Casablanca
Mountain\ Daylight\ Time=America/Denver
Mountain\ Daylight\ Time\ (Mexico)=America/Chihuahua
Mountain\ Standard\ Time=America/Denver
Mountain\ Standard\ Time\ (Mexico)=America/Chihuahua
Myanmar\ Daylight\ Time=Asia/Rangoon
Myanmar\ Standard\ Time=Asia/Rangoon
N.\ Central\ Asia\ Daylight\ Time=Asia/Novosibirsk
N.\ Central\ Asia\ Standard\ Time=Asia/Novosibirsk
Namibia\ Daylight\ Time=Africa/Windhoek
Namibia\ Standard\ Time=Africa/Windhoek
Nepal\ Daylight\ Time=Asia/Katmandu
Nepal\ Standard\ Time=Asia/Katmandu
New\ Zealand\ Daylight\ Time=Pacific/Auckland
New\ Zealand\ Standard\ Time=Pacific/Auckland
Newfoundland\ Daylight\ Time=America/St_Johns
Newfoundland\ Standard\ Time=America/St_Johns
Norfolk\ Daylight\ Time=Pacific/Norfolk
Norfolk\ Standard\ Time=Pacific/Norfolk
North\ Asia\ Daylight\ Time=Asia/Krasnoyarsk
North\ Asia\ East\ Daylight\ Time=Asia/Irkutsk
North\ Asia\ East\ Standard\ Time=Asia/Irkutsk
North\ Asia\ Standard\ Time=Asia/Krasnoyarsk
North\ Korea\ Daylight\ Time=Asia/Pyongyang
North\ Korea\ Standard\ Time=Asia/Pyongyang
Omsk\ Daylight\ Time=Asia/Omsk
Omsk\ Standard\ Time=Asia/Omsk
Pacific\ Daylight\ Time=America/Los_Angeles
Pacific\ Daylight\ Time\ (Mexico)=America/Tijuana
Pacific\ SA\ Daylight\ Time=America/Santiago
Pacific\ SA\ Standard\ Time=America/Santiago
Pacific\ Standard\ Time=America/Los_Angeles
Pacific\ Standard\ Time\ (Mexico)=America/Tijuana
Pakistan\ Daylight\ Time=Asia/Karachi
Pakistan\ Standard\ Time=Asia/Karachi
Paraguay\ Daylight\ Time=America/Asuncion
Paraguay\ Standard\ Time=America/Asuncion
Romance\ Daylight\ Time=Europe/Paris
Romance\ Standard\ Time=Europe/Paris
Russia\ Time\ Zone\ 10=Asia/Srednekolymsk
Russia\ Time\ Zone\ 11=Asia/Kamchatka
Russia\ Time\ Zone\ 3=Europe/Samara
Russian\ Daylight\ Time=Europe/Moscow
Russian\ Standard\ Time=Europe/Moscow
SA\ Eastern\ Daylight\ Time=America/Cayenne
SA\ Eastern\ Standard\ Time=America/Cayenne
SA\ Pacific\ Daylight\ Time=America/Bogota
SA\ Pacific\ Standard\ Time=America/Bogota
SA\ Western\ Daylight\ Time=America/La_Paz
SA\ Western\ Standard\ Time=America/La_Paz
SE\ Asia\ Daylight\ Time=Asia/Bangkok
SE\ Asia\ Standard\ Time=Asia/Bangkok
Saint\ Pierre\ Daylight\ Time=America/Miquelon
Saint\ Pierre\ Standard\ Time=America/Miquelon
Sakhalin\ Daylight\ Time=Asia/Sakhalin
Sakhalin\ Standard\ Time=Asia/Sakhalin
Samoa\ Daylight\ Time=Pacific/Apia
Samoa\ Standard\ Time=Pacific/Apia
Singapore\ Daylight\ Time=Asia/Singapore
Singapore\ Standard\ Time=Asia/Singapore
South\ Africa\ Daylight\ Time=Africa/Johannesburg
South\ Africa\ Standard\ Time=Africa/Johannesburg
Sri\ Lanka\ Daylight\ Time=Asia/Colombo
Sri\ Lanka\ Standard\ Time=Asia/Colombo
Syria\ Daylight\ Time=Asia/Damascus
Syria\ Standard\ Time=Asia/Damascus
Taipei\ Daylight\ Time=Asia/Taipei
Taipei\ Standard\ Time=Asia/Taipei
Tasmania\ Daylight\ Time=Australia/Hobart
Tasmania\ Standard\ Time=Australia/Hobart
Tocantins\ Daylight\ Time=America/Araguaina
Tocantins\ Standard\ Time=America/Araguaina
Tokyo\ Daylight\ Time=Asia/Tokyo
Tokyo\ Standard\ Time=Asia/Tokyo
Tomsk\ Daylight\ Time=Asia/Tomsk
Tomsk\ Standard\ Time=Asia/Tomsk
Tonga\ Daylight\ Time=Pacific/Tongatapu
Tonga\ Standard\ Time=Pacific/Tongatapu
Transbaikal\ Daylight\ Time=Asia/Chita
Transbaikal\ Standard\ Time=Asia/Chita
Turkey\ Daylight\ Time=Europe/Istanbul
Turkey\ Standard\ Time=Europe/Istanbul
Turks\ And\ Caicos\ Daylight\ Time=America/Grand_Turk
Turks\ And\ Caicos\ Standard\ Time=America/Grand_Turk
US\ Eastern\ Daylight\ Time=America/Indianapolis
US\ Eastern\ Standard\ Time=America/Indianapolis
US\ Mountain\ Daylight\ Time=America/Phoenix
US\ Mountain\ Standard\ Time=America/Phoenix
UTC=Etc/GMT
UTC+12=Etc/GMT-12
UTC-02=Etc/GMT+2
UTC-08=Etc/GMT+8
UTC-09=Etc/GMT+9
UTC-11=Etc/GMT+11
Ulaanbaatar\ Daylight\ Time=Asia/Ulaanbaatar
Ulaanbaatar\ Standard\ Time=Asia/Ulaanbaatar
Venezuela\ Daylight\ Time=America/Caracas
Venezuela\ Standard\ Time=America/Caracas
Vladivostok\ Daylight\ Time=Asia/Vladivostok
Vladivostok\ Standard\ Time=Asia/Vladivostok
W.\ Australia\ Daylight\ Time=Australia/Perth
W.\ Australia\ Standard\ Time=Australia/Perth
W.\ Central\ Africa\ Daylight\ Time=Africa/Lagos
W.\ Central\ Africa\ Standard\ Time=Africa/Lagos
W.\ Europe\ Daylight\ Time=Europe/Berlin
W.\ Europe\ Standard\ Time=Europe/Berlin
W.\ Mongolia\ Daylight\ Time=Asia/Hovd
W.\ Mongolia\ Standard\ Time=Asia/Hovd
West\ Asia\ Daylight\ Time=Asia/Tashkent
West\ Asia\ Standard\ Time=Asia/Tashkent
West\ Bank\ Daylight\ Time=Asia/Hebron
West\ Bank\ Standard\ Time=Asia/Hebron
West\ Pacific\ Daylight\ Time=Pacific/Port_Moresby
West\ Pacific\ Standard\ Time=Pacific/Port_Moresby
Yakutsk\ Daylight\ Time=Asia/Yakutsk
Yakutsk\ Standard\ Time=Asia/Yakutsk
#Linked Time Zones alias
#Mon Apr 24 23:22:45 WEST 2017
Africa/Addis_Ababa=Africa/Nairobi
Africa/Asmara=Africa/Nairobi
Africa/Asmera=Africa/Nairobi
Africa/Bamako=Africa/Abidjan
Africa/Bangui=Africa/Lagos
Africa/Banjul=Africa/Abidjan
Africa/Blantyre=Africa/Maputo
Africa/Brazzaville=Africa/Lagos
Africa/Bujumbura=Africa/Maputo
Africa/Conakry=Africa/Abidjan
Africa/Dakar=Africa/Abidjan
Africa/Dar_es_Salaam=Africa/Nairobi
Africa/Djibouti=Africa/Nairobi
Africa/Douala=Africa/Lagos
Africa/Freetown=Africa/Abidjan
Africa/Gaborone=Africa/Maputo
Africa/Harare=Africa/Maputo
Africa/Juba=Africa/Khartoum
Africa/Kampala=Africa/Nairobi
Africa/Kigali=Africa/Maputo
Africa/Kinshasa=Africa/Lagos
Africa/Libreville=Africa/Lagos
Africa/Lome=Africa/Abidjan
Africa/Luanda=Africa/Lagos
Africa/Lubumbashi=Africa/Maputo
Africa/Lusaka=Africa/Maputo
Africa/Malabo=Africa/Lagos
Africa/Maseru=Africa/Johannesburg
Africa/Mbabane=Africa/Johannesburg
Africa/Mogadishu=Africa/Nairobi
Africa/Niamey=Africa/Lagos
Africa/Nouakchott=Africa/Abidjan
Africa/Ouagadougou=Africa/Abidjan
Africa/Porto-Novo=Africa/Lagos
Africa/Sao_Tome=Africa/Abidjan
Africa/Timbuktu=Africa/Abidjan
America/Anguilla=America/Port_of_Spain
America/Antigua=America/Port_of_Spain
America/Argentina/ComodRivadavia=America/Argentina/Catamarca
America/Aruba=America/Curacao
America/Atka=America/Adak
America/Buenos_Aires=America/Argentina/Buenos_Aires
America/Catamarca=America/Argentina/Catamarca
America/Cayman=America/Panama
America/Coral_Harbour=America/Atikokan
America/Cordoba=America/Argentina/Cordoba
America/Dominica=America/Port_of_Spain
America/Ensenada=America/Tijuana
America/Fort_Wayne=America/Indiana/Indianapolis
America/Grenada=America/Port_of_Spain
America/Guadeloupe=America/Port_of_Spain
America/Indianapolis=America/Indiana/Indianapolis
America/Jujuy=America/Argentina/Jujuy
America/Knox_IN=America/Indiana/Knox
America/Kralendijk=America/Curacao
America/Louisville=America/Kentucky/Louisville
America/Lower_Princes=America/Curacao
America/Marigot=America/Port_of_Spain
America/Mendoza=America/Argentina/Mendoza
America/Montreal=America/Toronto
America/Montserrat=America/Port_of_Spain
America/Porto_Acre=America/Rio_Branco
America/Rosario=America/Argentina/Cordoba
America/Santa_Isabel=America/Tijuana
America/Shiprock=America/Denver
America/St_Barthelemy=America/Port_of_Spain
America/St_Kitts=America/Port_of_Spain
America/St_Lucia=America/Port_of_Spain
America/St_Thomas=America/Port_of_Spain
America/St_Vincent=America/Port_of_Spain
America/Tortola=America/Port_of_Spain
America/Virgin=America/Port_of_Spain
Antarctica/McMurdo=Pacific/Auckland
Antarctica/South_Pole=Pacific/Auckland
Arctic/Longyearbyen=Europe/Oslo
Asia/Aden=Asia/Riyadh
Asia/Ashkhabad=Asia/Ashgabat
Asia/Bahrain=Asia/Qatar
Asia/Calcutta=Asia/Kolkata
Asia/Chongqing=Asia/Shanghai
Asia/Chungking=Asia/Shanghai
Asia/Dacca=Asia/Dhaka
Asia/Harbin=Asia/Shanghai
Asia/Istanbul=Europe/Istanbul
Asia/Kashgar=Asia/Urumqi
Asia/Katmandu=Asia/Kathmandu
Asia/Kuwait=Asia/Riyadh
Asia/Macao=Asia/Macau
Asia/Muscat=Asia/Dubai
Asia/Phnom_Penh=Asia/Bangkok
Asia/Rangoon=Asia/Yangon
Asia/Saigon=Asia/Ho_Chi_Minh
Asia/Tel_Aviv=Asia/Jerusalem
Asia/Thimbu=Asia/Thimphu
Asia/Ujung_Pandang=Asia/Makassar
Asia/Ulan_Bator=Asia/Ulaanbaatar
Asia/Vientiane=Asia/Bangkok
Atlantic/Faeroe=Atlantic/Faroe
Atlantic/Jan_Mayen=Europe/Oslo
Atlantic/St_Helena=Africa/Abidjan
Australia/ACT=Australia/Sydney
Australia/Canberra=Australia/Sydney
Australia/LHI=Australia/Lord_Howe
Australia/NSW=Australia/Sydney
Australia/North=Australia/Darwin
Australia/Queensland=Australia/Brisbane
Australia/South=Australia/Adelaide
Australia/Tasmania=Australia/Hobart
Australia/Victoria=Australia/Melbourne
Australia/West=Australia/Perth
Australia/Yancowinna=Australia/Broken_Hill
Brazil/Acre=America/Rio_Branco
Brazil/DeNoronha=America/Noronha
Brazil/East=America/Sao_Paulo
Brazil/West=America/Manaus
Canada/Atlantic=America/Halifax
Canada/Central=America/Winnipeg
Canada/East-Saskatchewan=America/Regina
Canada/Eastern=America/Toronto
Canada/Mountain=America/Edmonton
Canada/Newfoundland=America/St_Johns
Canada/Pacific=America/Vancouver
Canada/Saskatchewan=America/Regina
Canada/Yukon=America/Whitehorse
Chile/Continental=America/Santiago
Chile/EasterIsland=Pacific/Easter
Cuba=America/Havana
Egypt=Africa/Cairo
Eire=Europe/Dublin
Europe/Belfast=Europe/London
Europe/Bratislava=Europe/Prague
Europe/Busingen=Europe/Zurich
Europe/Guernsey=Europe/London
Europe/Isle_of_Man=Europe/London
Europe/Jersey=Europe/London
Europe/Ljubljana=Europe/Belgrade
Europe/Mariehamn=Europe/Helsinki
Europe/Nicosia=Asia/Nicosia
Europe/Podgorica=Europe/Belgrade
Europe/San_Marino=Europe/Rome
Europe/Sarajevo=Europe/Belgrade
Europe/Skopje=Europe/Belgrade
Europe/Tiraspol=Europe/Chisinau
Europe/Vaduz=Europe/Zurich
Europe/Vatican=Europe/Rome
Europe/Zagreb=Europe/Belgrade
GB=Europe/London
GB-Eire=Europe/London
GMT+0=Etc/GMT
GMT-0=Etc/GMT
GMT0=Etc/GMT
Greenwich=Etc/GMT
Hongkong=Asia/Hong_Kong
Iceland=Atlantic/Reykjavik
Indian/Antananarivo=Africa/Nairobi
Indian/Comoro=Africa/Nairobi
Indian/Mayotte=Africa/Nairobi
Iran=Asia/Tehran
Israel=Asia/Jerusalem
Jamaica=America/Jamaica
Japan=Asia/Tokyo
Kwajalein=Pacific/Kwajalein
Libya=Africa/Tripoli
Mexico/BajaNorte=America/Tijuana
Mexico/BajaSur=America/Mazatlan
Mexico/General=America/Mexico_City
NZ=Pacific/Auckland
NZ-CHAT=Pacific/Chatham
Navajo=America/Denver
PRC=Asia/Shanghai
Pacific/Johnston=Pacific/Honolulu
Pacific/Midway=Pacific/Pago_Pago
Pacific/Ponape=Pacific/Pohnpei
Pacific/Saipan=Pacific/Guam
Pacific/Samoa=Pacific/Pago_Pago
Pacific/Truk=Pacific/Chuuk
Pacific/Yap=Pacific/Chuuk
Poland=Europe/Warsaw
Portugal=Europe/Lisbon
ROC=Asia/Taipei
ROK=Asia/Seoul
Singapore=Asia/Singapore
Turkey=Europe/Istanbul
UCT=Etc/UCT
US/Alaska=America/Anchorage
US/Aleutian=America/Adak
US/Arizona=America/Phoenix
US/Central=America/Chicago
US/East-Indiana=America/Indiana/Indianapolis
US/Eastern=America/New_York
US/Hawaii=Pacific/Honolulu
US/Indiana-Starke=America/Indiana/Knox
US/Michigan=America/Detroit
US/Mountain=America/Denver
US/Pacific=America/Los_Angeles
US/Pacific-New=America/Los_Angeles
US/Samoa=Pacific/Pago_Pago
Universal=Etc/UTC
W-SU=Europe/Moscow
Zulu=Etc/UTC
#Standard (IANA) abbreviations
#Mon Apr 24 23:22:45 WEST 2017
AWST=Australia/Perth
BST=Europe/London
CAT=Africa/Maputo
ChST=Pacific/Guam
HDT=America/Adak
HKT=Asia/Hong_Kong
IDT=Asia/Jerusalem
JST=Asia/Tokyo
NDT=America/St_Johns
NST=America/St_Johns
NZDT=Pacific/Auckland
NZST=Pacific/Auckland
PKT=Asia/Karachi
SAST=Africa/Johannesburg
SST=Pacific/Pago_Pago
WAST=Africa/Windhoek
WIT=Asia/Jayapura
WITA=Asia/Makassar

View File

@@ -1,24 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIEGzCCAwOgAwIBAgIUFkSKT1xCWg2PSu8fZs6OlZps+WIwDQYJKoZIhvcNAQEL
BQAwgZwxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRcwFQYDVQQH
DA5SZWR3b29kIFNob3JlczEPMA0GA1UECgwGT3JhY2xlMQ4wDAYDVQQLDAVNeVNR
TDEdMBsGA1UEAwwUTXlTUUwgQ29ubmVjdG9yL0ogQ0ExHzAdBgkqhkiG9w0BCQEW
EG15c3FsQG9yYWNsZS5jb20wHhcNMjAwNjAzMjMyNTMwWhcNMzAwNjAxMjMyNTMw
WjCBnDELMAkGA1UEBhMCVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFzAVBgNVBAcM
DlJlZHdvb2QgU2hvcmVzMQ8wDQYDVQQKDAZPcmFjbGUxDjAMBgNVBAsMBU15U1FM
MR0wGwYDVQQDDBRNeVNRTCBDb25uZWN0b3IvSiBDQTEfMB0GCSqGSIb3DQEJARYQ
bXlzcWxAb3JhY2xlLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEB
AMkV8+jk2aOxHxnNOu86Ejlqd28i6BcfXtjXz9c7sEDrKJStrOzSHI94wka7HEYe
r3lcMf5rBO3/hNGcL6YLzkpZVKfttR/lvqsihxatLgZ0mFHp2onXd7yPkK3Ana6q
xmHCQ1ASAq4sFXCmNN7Zo6u5Y48pg1ZEMCyGlz3Stu9jov4/YrXY8r3bvnda+B9S
FNJenl8ynSxy6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Qn0xtn7rHp/IpPFBc7FUqcTPFnc9YrIrBaS5yvhmv94yOf+4MCq0
7FYG2XRl9QRl+FSsxHFl8m/sl38GdIl7CQvafc2BXozdwTrzSjTSuA==
-----END RSA PRIVATE KEY-----

View File

@@ -1,129 +0,0 @@
===================================
STEPS TO GENERATE TEST CERTIFICATES
===================================
1. CA key and certficate
========================
(Generate the CA key)
$ openssl genrsa -out ca-key.pem 2048
(Generate a self-signed certificate for the CA)
$ openssl req -new -x509 -nodes -sha256 -days 3650 -key ca-key.pem -out ca-cert.pem
(...)
Country Name (2 letter code) []:US
State or Province Name (full name) []:California
Locality Name (eg, city) []:Redwood Shores
Organization Name (eg, company) []:Oracle
Organizational Unit Name (eg, section) []:MySQL
Common Name (e.g. server FQDN or YOUR name) []:MySQL Connector/J CA
Email Address []:mysql@oracle.com
2. Server key and certificate
=============================
(Generate the server key)
$ openssl genrsa -out server-key.pem 2048
(Generate a certificate signing request for the server)
$ openssl req -new -key server-key.pem -out server-csr.pem
(Or, if the Subject Alternative Name field is required for testing - *used together with below sign command*)
$ openssl req -new -key server-key.pem -out server-csr.pem \
-reqexts SAN \
-config <(cat /etc/ssl/openssl.cnf <(printf "\n[SAN]\n\nsubjectAltName=@alt_names\n\n[alt_names]\nDNS.1=bug99767.mysql.san1.tst\nDNS.2=*.mysql.san2.tst\nDNS.3=bug*.mysql.san3.tst\nDNS.4=*99767.mysql.san4.tst\nDNS.5=bug99767.*.san5.tst\nDNS.6=bug99767.*\nDNS.7=*\nIP.1=9.9.7.67\nIP.2=99.7.6.7"))
(...)
Country Name (2 letter code) []:US
State or Province Name (full name) []:California
Locality Name (eg, city) []:Redwood Shores
Organization Name (eg, company) []:Oracle
Organizational Unit Name (eg, section) []:MySQL
Common Name (e.g. server FQDN or YOUR name) []:MySQL Connector/J Server
Email Address []:mysql@oracle.com
(...)
A challenge password []:
An optional company name []:
(Sign the server certificate signing request)
$ openssl x509 -req -in server-csr.pem -CA ca-cert.pem -CAkey ca-key.pem -set_serial 01 -days 3650 -sha256 -out server-cert.pem
(Or, if the Subject Alternative Name field is required for testing - *used together with above request command*)
$ openssl x509 -req -in server-csr.pem -CA ca-cert.pem -CAkey ca-key.pem -set_serial 01 -days 3650 -sha256 -out server-cert.pem \
-extfile <(printf "subjectAltName=@alt_names\n\n[alt_names]\nDNS.1=bug99767.mysql.san1.tst\nDNS.2=*.mysql.san2.tst\nDNS.3=bug*.mysql.san3.tst\nDNS.4=*99767.mysql.san4.tst\nDNS.5=bug99767.*.san5.tst\nDNS.6=bug99767.*\nDNS.7=*\nIP.1=9.9.7.67\nIP.2=99.7.6.7")
(OPTIONAL: Delete the certificate signing request file)
$ rm server-csr.pem
(OPTIONAL: Verify the server certificate)
$ openssl verify -CAfile ca-cert.pem server-cert.pem
3. Client key and certificate
=============================
(Generate the client key)
$ openssl genrsa -out client-key.pem 2048
(Generate a certificate signing request for the client)
$ openssl req -new -key client-key.pem -out client-csr.pem
(...)
Country Name (2 letter code) []:US
State or Province Name (full name) []:California
Locality Name (eg, city) []:Redwood Shores
Organization Name (eg, company) []:Oracle
Organizational Unit Name (eg, section) []:MySQL
Common Name (e.g. server FQDN or YOUR name) []:MySQL Connector/J Client
Email Address []:mysql@oracle.com
(...)
A challenge password []:
An optional company name []:
(Sign the client certificate signing request)
$ openssl x509 -req -in client-csr.pem -CA ca-cert.pem -CAkey ca-key.pem -set_serial 01 -days 3650 -sha256 -out client-cert.pem
(OPTIONAL: Delete the certificate signing request file)
$ rm client-csr.pem
(OPTIONAL: Verify the client certificate)
$ openssl verify -CAfile ca-cert.pem client-cert.pem
4. CA truststore
================
(Create a truststore containing the CA certificate)
$ keytool -importcert -alias mysqlcacert -file ca-cert.pem -keystore ca-truststore -storepass password
Trust this certificate? [no]: yes
(OPTIONAL: List the contents of the truststore)
$ keytool -list -keystore ca-truststore -storepass password
5. Client key and certificate keystore
======================================
(Convert client key to pkcs12 format)
$ openssl pkcs12 -export -in client-cert.pem -inkey client-key.pem -name "mysqlclient" -passout pass:password -out client-keystore.p12
(Create a keystore containing the client key)
$ keytool -importkeystore -srckeystore client-keystore.p12 -srcstoretype pkcs12 -srcstorepass password -destkeystore client-keystore -deststoretype JKS -deststorepass password
(OPTIONAL: Delete the client key in pkcs12 format)
$ rm client-keystore.p12
(OPTIONAL: List the contents of the client keystore)
$ keytool -list -keystore client-keystore -storepass password
==========================
RUN SERVER WITH TEST CERTS
==========================
Add to my.conf:
[mysqld]
ssl-key = "/path/server-key.pem"
ssl-cert = "/path/server-cert.pem"
ssl-ca = "/path/ca-cert.pem"

View File

@@ -1,22 +0,0 @@
-----BEGIN CERTIFICATE-----
MIIDsjCCApoCAQEwDQYJKoZIhvcNAQELBQAwgZwxCzAJBgNVBAYTAlVTMRMwEQYD
VQQIDApDYWxpZm9ybmlhMRcwFQYDVQQHDA5SZWR3b29kIFNob3JlczEPMA0GA1UE
CgwGT3JhY2xlMQ4wDAYDVQQLDAVNeVNRTDEdMBsGA1UEAwwUTXlTUUwgQ29ubmVj
dG9yL0ogQ0ExHzAdBgkqhkiG9w0BCQEWEG15c3FsQG9yYWNsZS5jb20wHhcNMjAw
NjAzMjMzMDE5WhcNMzAwNjAxMjMzMDE5WjCBoDELMAkGA1UEBhMCVVMxEzARBgNV
BAgMCkNhbGlmb3JuaWExFzAVBgNVBAcMDlJlZHdvb2QgU2hvcmVzMQ8wDQYDVQQK
DAZPcmFjbGUxDjAMBgNVBAsMBU15U1FMMSEwHwYDVQQDDBhNeVNRTCBDb25uZWN0
b3IvSiBDbGllbnQxHzAdBgkqhkiG9w0BCQEWEG15c3FsQG9yYWNsZS5jb20wggEi
MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDcO3YhUeTcyj8F3R6OqRrcLLKx
h3FW6bGZL5jSO+GkMLoSWasN8wlaUGz7TJ3bmYmr1XZ8aBWVKlZVzN3vdIaOMd0/
ceoG1oiyLNHfsqo3bdA0RNMzEDj1sts8i8Ucs+sa5mI+vS7RY7gqYeybLRGYRGWu
5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zUzaAN7jvdsqAiVaiRvObtBLj76/
17INnOECgYEA0E2ZHzVg9MaMUhC9dwHawGbbqeZfnAC89J9Hapt0WDtMuulsA+V8
C2Ek4Rxpe62DuXdcvYSSuL3VJ4oWffkKngll5m+SiCSuuaDT9KAJ01sklIsGDAWE
E0gYWg1sqsj5UE2r7O5TzfRnitglDwyNY87KYvxX7jI6mpHCPSHbblECgYEAwAKy
DaIS6gtOfXLhXfzV+Qslsulcf4FRdI06XFVhmXziW6spdl2qVuKTWAiKK69zTRQD
2cXVxMf+VEvF7btyllNBYEdU1NcX3gCqCmb1LRqngIQkL0oPlXVaZnN5q17tXAPO
Oxd3waefIqBjWJ03qc37oQzuCAXBiYKlUFLVJR8CgYAmgNF29VTwqeqyGKoM32jh
+6FK7Gxr168VwINg7084J+3s9syig77EE7bPbYMJ+27Hz4py9ZhxUZWe82Vo76nI
wI/3YlRBmhY59cJ4C0UFrmk6k+AQRMy/C6qEqsqVXwTGlTTcXMlc3nptLbrb50QT
WNwMI/zU6K/wdlTjG+kFoQKBgG79X+UHib1mOcHENUe6Dgm+itUnlcNSgj5IILMc
26T4jnQEtZvpOrysjhV2IkBsU877QdqRRCdSn84kWs43612/1GuN8Bh0GSTH54LJ
zvF6ldZxC+WV/voa8t2D5JHN9pCY1o5L23rCpPdEFQk1H+b03X5T1ggnI5+UOHD8
4J5rAoGBAJ2x4bRSj/vBgiNUvyvTv6JQoH1hCvDNEYT4TUr8XzMjVcS5voqokAQc
mGseepXn6OU+JDW7N/DvgNStkgN6Gj1J/aTwPerC7exkMr4c6YOudjZUZJnOjUj4
qHfAGQ5Vwo7fc9S6ymaxzAw5bFNHhZd4P3D1qzpU4804r8CMExUM
-----END RSA PRIVATE KEY-----

View File

@@ -0,0 +1,49 @@
package controleur;
public class Article {
private int id, prix, qtestock;
private String reference, categorie, description, libelle, imagearticle;
public Article() {//ALL
this.id=this.prix=this.qtestock=0;
this.reference=this.categorie=this.description=this.libelle="";
}
public Article (int id, String reference, String categorie, String description, String libelle, int prix, int qtestock, String imagearticle)
{//ALL
this.id= id;
this.reference= reference;
this.categorie= categorie;
this.description = description;
this.libelle = libelle;
this.prix = prix;
this.qtestock = qtestock;
this.imagearticle = imagearticle;
}
public Article (String reference, String categorie, String description, String libelle, int prix, int qtestock)
{//ADD & Modify
this.reference = reference;
this.categorie= categorie;
this.description = description;
this.libelle = libelle;
this.prix = prix;
this.qtestock = qtestock;
}
public Article (String reference) {//DELETE
this.reference = reference;
}
public int getId() { return id; }
public String getReference() { return reference; }
public String getCategorie() { return categorie; }
public int getPrix() { return prix; }
public String getDescription() { return description; }
public String getLibelle() { return libelle; }
public int getQtestock() { return qtestock; }
public String getImageArticle() { return imagearticle; }
public void setid(int id) { this.id = id; }
public void setReference(String reference) { this.reference = reference; }
public void setCategorie(String categorie) { this.categorie = categorie; }
public void setPrix(int prix) { this.prix = prix; }
public void setDescription(String description) { this.description = description; }
public void setLibelle(String libelle) { this.libelle = libelle; }
public void setQtestock(int qtestock) { this.qtestock = qtestock; }
public void setImageArticle(String imagearticle) { this.imagearticle = imagearticle; }
}

53
src/controleur/Event.java Normal file
View File

@@ -0,0 +1,53 @@
package controleur;
public class Event {
private int id, prix;
private String reference, categorie, description, libelle, imageevent, lieu, date;
public Event() {//ALL
this.id=this.prix=0;
this.reference=this.categorie=this.description=this.libelle=this.lieu=this.date="";
}
public Event (int id, String reference, String categorie, String description, String libelle, int prix, String lieu, String date, String imageevent)
{//ALL
this.id= id;
this.reference= reference;
this.categorie= categorie;
this.description = description;
this.libelle = libelle;
this.prix = prix;
this.lieu = lieu;
this.date = date;
this.imageevent = imageevent;
}
public Event (String reference, String categorie, String description, String libelle, int prix, String lieu, String date)
{//ADD & Modify
this.reference = reference;
this.categorie= categorie;
this.description = description;
this.libelle = libelle;
this.prix = prix;
this.lieu = lieu;
this.date = date;
}
public Event (String reference) {//DELETE
this.reference = reference;
}
public int getId() { return id; }
public String getReference() { return reference; }
public String getCategorie() { return categorie; }
public int getPrix() { return prix; }
public String getDescription() { return description; }
public String getLibelle() { return libelle; }
public String getLieu() { return lieu; }
public String getDate() { return date; }
public String getImageEvent() { return imageevent; }
public void setid(int id) { this.id = id; }
public void setReference(String reference) { this.reference = reference; }
public void setCategorie(String categorie) { this.categorie = categorie; }
public void setPrix(int prix) { this.prix = prix; }
public void setDescription(String description) { this.description = description; }
public void setLibelle(String libelle) { this.libelle = libelle; }
public void setLieu(String lieu) { this.lieu = lieu; }
public void setDate(String date) { this.date = date; }
public void setImageEvent(String imageevent) { this.imageevent = imageevent; }
}

View File

@@ -3,7 +3,7 @@ package controleur;
import vue.Connexion;
public class Gestion
{
{/*GESTION N EST PAS UTILISER CAR INCOMPREHENSIBLE POUR CCB - ALL IS IN Connexion*/
private static Connexion uneConnexion;
public Gestion()
{
@@ -20,4 +20,5 @@ public class Gestion
{
new Gestion();
}
}

BIN
src/images/Thumbs.db Normal file

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 43 KiB

BIN
src/images/favicon2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@@ -9,10 +9,10 @@ public class BDD {
private Connection maConnexion;
public BDD() {
this.serveur = "localhost";
this.serveur = "nasccb:3307";
this.nombdd = "Ecurie";
this.user = "USER";
this.mdp = "MDP";
this.user = "christian";
this.mdp = "F8orP#NRqd#oKLQ#";
this.maConnexion = null;
}
public void chargerPilote() {

View File

@@ -0,0 +1,133 @@
package modele;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import controleur.Article;
public class ModeleArticle {
public static ArrayList<Article> selectAll() {
ArrayList<Article> lesArticles = new ArrayList<Article>();
String requete = "select * from Article;";
try {
BDD uneBDD = new BDD();
uneBDD.seConnecter();
Statement unStat = uneBDD.getMaConnexion().createStatement();
ResultSet unRes = unStat.executeQuery(requete);
while(unRes.next()) {
int id = unRes.getInt("idarticle");
String reference = unRes.getString("reference");
String categorie = unRes.getString("idcategorie");
String description = unRes.getString("description");
String libelle = unRes.getString("libelle");
int prix = unRes.getInt("prix");
int qtestock = unRes.getInt("qtestock");
String image = unRes.getString("imagearticle");
Article unArticle = new Article(id, reference, categorie, description, libelle, prix, qtestock, image);
lesArticles.add(unArticle);
}
unStat.close();
unRes.close();
uneBDD.seDeconnecter();
}
catch(SQLException exp) {
System.out.println("Erreur d'execution de la requete " + requete);
}
return lesArticles;
}
public static Article selectWhere(String reference) {
String requete = "select * from Article where reference='" + reference + "';";
Article unArticle = null;
try {
BDD uneBDD = new BDD();
uneBDD.seConnecter();
Statement unStat = uneBDD.getMaConnexion().createStatement();
ResultSet unRes = unStat.executeQuery(requete);
if(unRes.next()) {
int id = unRes.getInt("idarticle");
String categorie = unRes.getString("idcategorie");
String description = unRes.getString("description");
String libelle = unRes.getString("libelle");
int prix = unRes.getInt("prix");
int qtestock = unRes.getInt("qtestock");
String image = unRes.getString("imagearticle");
unArticle = new Article(id, reference, categorie, description, libelle, prix, qtestock, image);
}
unStat.close();
unRes.close();
uneBDD.seDeconnecter();
}
catch(SQLException exp) {
System.out.println("Erreur d'execution de la requete " + requete);
}
return unArticle;
}
public static void insert(Article unArticle) {
String requete = "insert into Article (reference, idcategorie, description, libelle, prix, qtestock, imagearticle) values ('"
+ unArticle.getReference() + "', '"
+ unArticle.getCategorie() + "', '"
+ unArticle.getDescription() + "', '"
+ unArticle.getLibelle() + "', "
+ unArticle.getPrix() + ", "
+ unArticle.getQtestock() + ", '"
+ "/images/articles/img_shop.jpg');";
try {
BDD uneBDD = new BDD();
uneBDD.seConnecter();
Statement unStat = uneBDD.getMaConnexion().createStatement();
unStat.execute(requete);
unStat.close();
uneBDD.seDeconnecter();
}
catch(SQLException exp) {
System.out.println("Erreur d'execution de la requete " + requete);
}
}
public static void update(Article unArticle, String reference) {
String valueCategorie = unArticle.getCategorie();
String valueDescription = unArticle.getDescription();
String valueLibelle = unArticle.getLibelle();
String valuePrix = String.valueOf(unArticle.getPrix());
String valueQtestock = String.valueOf(unArticle.getQtestock());
if (unArticle.getCategorie().equals("")) { valueCategorie = ""; }
else { valueCategorie = " idcategorie = '"+ unArticle.getCategorie() +"'"; }
if (unArticle.getDescription().equals("")) { valueDescription = ""; }
else { valueDescription = ", description = '"+ unArticle.getDescription() +"'"; }
if (unArticle.getLibelle().equals("")) { valueLibelle = ""; }
else { valueLibelle = ", libelle = '"+ unArticle.getLibelle() +"'"; }
if (String.valueOf(unArticle.getPrix()).equals("")) { valuePrix = ""; }
else { valuePrix = ", prix = "+ unArticle.getPrix(); }
if (String.valueOf(unArticle.getQtestock()).equals("")) { valueQtestock = ""; }
else { valueQtestock = ", qtestock = "+ unArticle.getQtestock(); }
String requete = "update Article set " + valueCategorie + valueDescription + valueLibelle + valuePrix + valueQtestock + " where reference='"+ reference +"';";
try {
BDD uneBDD = new BDD();
uneBDD.seConnecter();
Statement unStat = uneBDD.getMaConnexion().createStatement();
unStat.execute(requete);
unStat.close();
uneBDD.seDeconnecter();
}
catch(SQLException exp) {
System.out.println("Erreur d'execution de la requete " + requete);
}
}
public static void delete(String reference) {
String requete = "delete from Article where reference='" + reference + "';";
try {
BDD uneBDD = new BDD();
uneBDD.seConnecter();
Statement unStat = uneBDD.getMaConnexion().createStatement();
unStat.execute(requete);
unStat.close();
uneBDD.seDeconnecter();
}
catch(SQLException exp) {
System.out.println("Erreur d'execution de la requete " + requete);
}
}
}

View File

@@ -68,15 +68,15 @@ public class ModeleCheval {
return unCheval;
}
public static void insert(Cheval unCheval) {
String requete = "insert into Cheval (nom, sexe, robe, type, race, proprietaire, age) values ('"
String requete = "insert into Cheval (nom, sexe, robe, type, race, proprietaire, age, imagecheval) values ('"
+ unCheval.getNom() + "', '"
+ unCheval.getSexe() + "', '"
+ unCheval.getRobe() + "', '"
+ unCheval.getType() + "', '"
+ unCheval.getRace() + "', '"
+ unCheval.getProprietaire() + "', '"
+ unCheval.getAge() + "');";
/*+ unCheval.getImage()+ "');";*/
+ unCheval.getAge() + "', '"
+ "/images/chevaux/img_cheval.jpg');";
try {
BDD uneBDD = new BDD();
uneBDD.seConnecter();

View File

@@ -83,10 +83,10 @@ public class ModeleEleve
+ unEleve.getSexe() + "', "
+ unEleve.getAge() + ", '"
+ unEleve.getAdresse() + "', '"
+ "CCB', '"
+ unEleve.getMdp() + "', '"
+ unEleve.getMail() + "', "
+ unEleve.getGalop() + ", '"
+ "./images/avatars/img_user.jpg');";
+ "/images/avatars/img_user.jpg');";
try {
BDD uneBDD = new BDD();
uneBDD.seConnecter();

139
src/modele/ModeleEvent.java Normal file
View File

@@ -0,0 +1,139 @@
package modele;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import controleur.Event;
public class ModeleEvent {
public static ArrayList<Event> selectAll() {
ArrayList<Event> lesEvents = new ArrayList<Event>();
String requete = "select * from Event;";
try {
BDD uneBDD = new BDD();
uneBDD.seConnecter();
Statement unStat = uneBDD.getMaConnexion().createStatement();
ResultSet unRes = unStat.executeQuery(requete);
while(unRes.next()) {
int id = unRes.getInt("idevent");
String reference = unRes.getString("reference");
String categorie = unRes.getString("idtype");
String description = unRes.getString("description");
String libelle = unRes.getString("nom");
int prix = unRes.getInt("prix");
String lieu = unRes.getString("lieu");
String date = unRes.getString("dateevent");
String image = unRes.getString("imageevent");
Event unEvent = new Event(id, reference, categorie, description, libelle, prix, lieu, date, image);
lesEvents.add(unEvent);
}
unStat.close();
unRes.close();
uneBDD.seDeconnecter();
}
catch(SQLException exp) {
System.out.println("Erreur d'execution de la requete " + requete);
}
return lesEvents;
}
public static Event selectWhere(String reference) {
String requete = "select * from Event where reference='" + reference + "';";
Event unEvent = null;
try {
BDD uneBDD = new BDD();
uneBDD.seConnecter();
Statement unStat = uneBDD.getMaConnexion().createStatement();
ResultSet unRes = unStat.executeQuery(requete);
if(unRes.next()) {
int id = unRes.getInt("idevent");
String categorie = unRes.getString("idtype");
String description = unRes.getString("description");
String libelle = unRes.getString("nom");
int prix = unRes.getInt("prix");
String lieu = unRes.getString("lieu");
String date = unRes.getString("dateevent");
String image = unRes.getString("imageevent");
unEvent = new Event(id, reference, categorie, description, libelle, prix, lieu, date, image);
}
unStat.close();
unRes.close();
uneBDD.seDeconnecter();
}
catch(SQLException exp) {
System.out.println("Erreur d'execution de la requete " + requete);
}
return unEvent;
}
public static void insert(Event unEvent) {
String requete = "insert into Event (dateevent, reference, idtype, description, nom, lieu, prix, imageevent) values ("
+ "NOW(), '"
+ unEvent.getReference() + "', '"
+ unEvent.getCategorie() + "', '"
+ unEvent.getDescription() + "', '"
+ unEvent.getLibelle() + "', '"
+ unEvent.getLieu() + "', "
+ unEvent.getPrix() + ", '"
+ "/images/evenements/img_event.jpg');";
try {
BDD uneBDD = new BDD();
uneBDD.seConnecter();
Statement unStat = uneBDD.getMaConnexion().createStatement();
unStat.execute(requete);
unStat.close();
uneBDD.seDeconnecter();
}
catch(SQLException exp) {
System.out.println("Erreur d'execution de la requete " + requete);
}
}
public static void update(Event unEvent, String reference) {
String valueCategorie = unEvent.getCategorie();
String valueDescription = unEvent.getDescription();
String valueLibelle = unEvent.getLibelle();
String valuePrix = String.valueOf(unEvent.getPrix());
String valueLieu = unEvent.getLieu();
String valueDate = unEvent.getDate();
if (unEvent.getCategorie().equals("")) { valueCategorie = ""; }
else { valueCategorie = " idtype = '"+ unEvent.getCategorie() +"'"; }
if (unEvent.getDescription().equals("")) { valueDescription = ""; }
else { valueDescription = ", description = '"+ unEvent.getDescription() +"'"; }
if (unEvent.getLibelle().equals("")) { valueLibelle = ""; }
else { valueLibelle = ", nom = '"+ unEvent.getLibelle() +"'"; }
if (String.valueOf(unEvent.getPrix()).equals("")) { valuePrix = ""; }
else { valuePrix = ", prix = "+ unEvent.getPrix(); }
if (String.valueOf(unEvent.getLieu()).equals("")) { valueLieu = ""; }
else { valueLieu = ", lieu = '"+ unEvent.getLieu() + "'";}
if (String.valueOf(unEvent.getDate()).equals("")) { valueDate = ""; }
else { valueDate = ", dateevent = Now()"; }
String requete = "update Event set " + valueCategorie + valueDescription + valueLibelle + valuePrix + valueLieu + valueDate + " where reference='"+ reference +"';";
try {
BDD uneBDD = new BDD();
uneBDD.seConnecter();
Statement unStat = uneBDD.getMaConnexion().createStatement();
unStat.execute(requete);
unStat.close();
uneBDD.seDeconnecter();
}
catch(SQLException exp) {
System.out.println("Erreur d'execution de la requete " + requete);
}
}
public static void delete(String reference) {
String requete = "delete from Event where reference='" + reference + "';";
try {
BDD uneBDD = new BDD();
uneBDD.seConnecter();
Statement unStat = uneBDD.getMaConnexion().createStatement();
unStat.execute(requete);
unStat.close();
uneBDD.seDeconnecter();
}
catch(SQLException exp) {
System.out.println("Erreur d'execution de la requete " + requete);
}
}
}

View File

@@ -39,7 +39,38 @@ public class ModeleFormateur
}
return lesFormateurs;
}
public static Formateur selectWhere(String mail, String mdp) {
public static Formateur selectWhere(String mail) {
String requete = "select * from Formateur where adressemail='" + mail + "';";
Formateur unFormateur = null;
try {
BDD uneBDD = new BDD();
uneBDD.seConnecter();
Statement unStat = uneBDD.getMaConnexion().createStatement();
ResultSet unRes = unStat.executeQuery(requete);
if(unRes.next())
{
int idformateur = unRes.getInt("idformateur");
String login = unRes.getString("login");
int privilege = unRes.getInt("privilege");
String prenom = unRes.getString("prenom");
String nom = unRes.getString("nom");
int age = unRes.getInt("age");
int galop = unRes.getInt("galop");
String sexe = unRes.getString("sexe");
String mdp = unRes.getString("mdp");
// adressemail
unFormateur = new Formateur(idformateur, login, privilege, prenom, nom, age, galop, sexe, mail, mdp);
}
unStat.close();
unRes.close();
uneBDD.seDeconnecter();
}
catch(SQLException exp) {
System.out.println("Erreur d'execution de la requete " + requete);
}
return unFormateur;
}
public static Formateur selectCompte(String mail, String mdp) {
String requete = "select * from Formateur where adressemail='" + mail + "' and mdp='" + mdp + "';";
Formateur unFormateur = null;
try {

File diff suppressed because it is too large Load Diff

View File

@@ -1,4 +0,0 @@
build-date: 2021-06-08 16:39:29 +0000
os-info: Linux i386 4.1.12-124.48.6.el6uek.x86_64
compiler: javac 1.8.0_241
build-tool: Apache Ant(TM) version 1.10.7 compiled on September 1 2019

View File

@@ -1,5 +0,0 @@
version: 8.0.26
branch: release/8.0.26
date: 2021-06-08 14:49:03 +0100
commit: 9aae1e450989d62c06616c1dcda3e404ef84df70
short: 9aae1e45

File diff suppressed because it is too large Load Diff

View File

@@ -1,28 +0,0 @@
Copyright (c) 2000, 2021, Oracle and/or its affiliates.
This is a release of MySQL Connector/J, a JDBC Type 4 driver for MySQL that
also supports the new X DevAPI.
License information can be found in the LICENSE file.
This distribution may include materials developed by third parties.
For license and attribution notices for these materials, please refer to the
LICENSE file.
For more information on MySQL Connector/J, visit
https://dev.mysql.com/doc/connector-j/8.0/en/
For additional downloads and the source of MySQL Connector/J, visit
https://dev.mysql.com/downloads/
MySQL Connector/J is brought to you by the MySQL team at Oracle.
Notice:
- In order to use the logging capabilities provided by the default
implementation com.mysql.cj.log.Slf4JLogger, it is required to add one or
more jars for Simple Logging Facade for Java (SLF4J) to your CLASSPATH.
- To use the X DevAPI features in Connector/J, you also need the external
library protobuf-java, which you can download manually from the official
Maven repository and add it to the CLASSPATH, or use Maven's automatic
dependency resolution features by adding a dependency to "GroupId: mysql"
and "ArtifactId: mysql-connector-java" to your project's pom.xml file.

File diff suppressed because it is too large Load Diff

View File

@@ -1,84 +0,0 @@
/*
* Copyright (c) 2002, 2020, Oracle and/or its affiliates.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 2.0, as published by the
* Free Software Foundation.
*
* This program is also distributed with certain software (including but not
* limited to OpenSSL) that is licensed under separate terms, as designated in a
* particular file or component or in included license documentation. The
* authors of MySQL hereby grant you an additional permission to link the
* program and your derivative works with the separately licensed software that
* they have included with MySQL.
*
* Without limiting anything contained in the foregoing, this file, which is
* part of MySQL Connector/J, is also subject to the Universal FOSS Exception,
* version 1.0, a copy of which can be found at
* http://oss.oracle.com/licenses/universal-foss-exception.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
* for more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
package documentation;
import java.util.HashMap;
import java.util.Map;
import java.util.TreeMap;
import com.mysql.cj.exceptions.MysqlErrorNumbers;
/**
* Creates XML file describing mapping of MySQL error #'s to SQL92 and X/Open states.
*/
public class ErrorMappingsDocGenerator {
public static void main(String[] args) throws Exception {
dumpSqlStatesMappingsAsXml();
}
public static void dumpSqlStatesMappingsAsXml() throws Exception {
TreeMap<Integer, Integer> allErrorNumbers = new TreeMap<>();
Map<Object, String> mysqlErrorNumbersToNames = new HashMap<>();
// Integer errorNumber = null;
//
// First create a list of all 'known' error numbers that are mapped.
//
for (Integer errorNumber : MysqlErrorNumbers.mysqlToSql99State.keySet()) {
allErrorNumbers.put(errorNumber, errorNumber);
}
//
// Now create a list of the actual MySQL error numbers we know about
//
java.lang.reflect.Field[] possibleFields = MysqlErrorNumbers.class.getDeclaredFields();
for (int i = 0; i < possibleFields.length; i++) {
String fieldName = possibleFields[i].getName();
if (fieldName.startsWith("ER_")) {
mysqlErrorNumbersToNames.put(possibleFields[i].get(null), fieldName);
}
}
System.out.println("<ErrorMappings>");
for (Integer errorNumber : allErrorNumbers.keySet()) {
String sql92State = MysqlErrorNumbers.mysqlToSql99(errorNumber.intValue());
System.out.println(" <ErrorMapping mysqlErrorNumber=\"" + errorNumber + "\" mysqlErrorName=\"" + mysqlErrorNumbersToNames.get(errorNumber)
+ "\" legacySqlState=\"" + "" + "\" sql92SqlState=\"" + ((sql92State == null) ? "" : sql92State) + "\"/>");
}
System.out.println("</ErrorMappings>");
}
}

View File

@@ -1,143 +0,0 @@
/*
* Copyright (c) 2002, 2020, Oracle and/or its affiliates.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 2.0, as published by the
* Free Software Foundation.
*
* This program is also distributed with certain software (including but not
* limited to OpenSSL) that is licensed under separate terms, as designated in a
* particular file or component or in included license documentation. The
* authors of MySQL hereby grant you an additional permission to link the
* program and your derivative works with the separately licensed software that
* they have included with MySQL.
*
* Without limiting anything contained in the foregoing, this file, which is
* part of MySQL Connector/J, is also subject to the Universal FOSS Exception,
* version 1.0, a copy of which can be found at
* http://oss.oracle.com/licenses/universal-foss-exception.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
* for more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
package documentation;
import java.util.HashMap;
import java.util.Map;
import java.util.TreeMap;
import com.mysql.cj.conf.PropertyDefinition;
import com.mysql.cj.conf.PropertyDefinitions;
/**
* Creates docbook table of connection properties from ConnectionProperties class.
*/
public class PropertiesDocGenerator {
public static void main(String[] args) {
System.out.println(exposeAsXml());
}
static class XmlMap {
protected Map<Integer, Map<String, PropertyDefinition<?>>> ordered = new TreeMap<>();
protected Map<String, PropertyDefinition<?>> alpha = new TreeMap<>();
}
/**
* Returns a description of the connection properties as an XML document.
*
* @return the connection properties as an XML document.
*/
public static String exposeAsXml() {
StringBuilder xmlBuf = new StringBuilder();
xmlBuf.append("<ConnectionProperties>");
int numCategories = PropertyDefinitions.PROPERTY_CATEGORIES.length;
Map<String, XmlMap> propertyListByCategory = new HashMap<>();
for (int i = 0; i < numCategories; i++) {
propertyListByCategory.put(PropertyDefinitions.PROPERTY_CATEGORIES[i], new XmlMap());
}
for (PropertyDefinition<?> pdef : PropertyDefinitions.PROPERTY_KEY_TO_PROPERTY_DEFINITION.values()) {
XmlMap sortMaps = propertyListByCategory.get(pdef.getCategory());
int orderInCategory = pdef.getOrder();
if (orderInCategory == Integer.MIN_VALUE) {
sortMaps.alpha.put(pdef.getName(), pdef);
} else {
Integer order = Integer.valueOf(orderInCategory);
Map<String, PropertyDefinition<?>> orderMap = sortMaps.ordered.get(order);
if (orderMap == null) {
orderMap = new TreeMap<>();
sortMaps.ordered.put(order, orderMap);
}
orderMap.put(pdef.getName(), pdef);
}
}
for (int j = 0; j < numCategories; j++) {
XmlMap sortMaps = propertyListByCategory.get(PropertyDefinitions.PROPERTY_CATEGORIES[j]);
xmlBuf.append("\n <PropertyCategory name=\"");
xmlBuf.append(PropertyDefinitions.PROPERTY_CATEGORIES[j]);
xmlBuf.append("\">");
for (Map<String, PropertyDefinition<?>> orderedEl : sortMaps.ordered.values()) {
for (PropertyDefinition<?> pdef : orderedEl.values()) {
xmlBuf.append("\n <Property name=\"");
xmlBuf.append(pdef.getName());
xmlBuf.append("\" default=\"");
if (pdef.getDefaultValue() != null) {
xmlBuf.append(pdef.getDefaultValue());
}
xmlBuf.append("\" sortOrder=\"");
xmlBuf.append(pdef.getOrder());
xmlBuf.append("\" since=\"");
xmlBuf.append(pdef.getSinceVersion());
xmlBuf.append("\">\n");
xmlBuf.append(" ");
String escapedDescription = pdef.getDescription();
escapedDescription = escapedDescription.replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;");
xmlBuf.append(escapedDescription);
xmlBuf.append("\n </Property>");
}
}
for (PropertyDefinition<?> pdef : sortMaps.alpha.values()) {
xmlBuf.append("\n <Property name=\"");
xmlBuf.append(pdef.getName());
xmlBuf.append("\" default=\"");
if (pdef.getDefaultValue() != null) {
xmlBuf.append(pdef.getDefaultValue());
}
xmlBuf.append("\" sortOrder=\"alpha\" since=\"");
xmlBuf.append(pdef.getSinceVersion());
xmlBuf.append("\">\n");
xmlBuf.append(" ");
xmlBuf.append(pdef.getDescription());
xmlBuf.append("\n </Property>");
}
xmlBuf.append("\n </PropertyCategory>");
}
xmlBuf.append("\n</ConnectionProperties>");
return xmlBuf.toString();
}
}

View File

@@ -1,139 +0,0 @@
/*
* Copyright (c) 2017, 2020, Oracle and/or its affiliates.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 2.0, as published by the
* Free Software Foundation.
*
* This program is also distributed with certain software (including but not
* limited to OpenSSL) that is licensed under separate terms, as designated in a
* particular file or component or in included license documentation. The
* authors of MySQL hereby grant you an additional permission to link the
* program and your derivative works with the separately licensed software that
* they have included with MySQL.
*
* Without limiting anything contained in the foregoing, this file, which is
* part of MySQL Connector/J, is also subject to the Universal FOSS Exception,
* version 1.0, a copy of which can be found at
* http://oss.oracle.com/licenses/universal-foss-exception.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
* for more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
package instrumentation;
import java.util.Collection;
import com.mysql.cj.conf.BooleanPropertyDefinition;
import com.mysql.cj.conf.EnumPropertyDefinition;
import com.mysql.cj.conf.IntegerPropertyDefinition;
import com.mysql.cj.conf.LongPropertyDefinition;
import com.mysql.cj.conf.MemorySizePropertyDefinition;
import com.mysql.cj.conf.PropertyDefinition;
import com.mysql.cj.conf.PropertyDefinitions;
import com.mysql.cj.conf.StringPropertyDefinition;
import com.mysql.cj.jdbc.MysqlDataSource;
import javassist.ClassPool;
import javassist.CtClass;
import javassist.CtMethod;
import javassist.CtNewMethod;
import javassist.bytecode.DuplicateMemberException;
public class AddMethods {
private static boolean verbose = false;
public static void main(String[] args) throws Exception {
System.out.println("Applying AddMethods.");
verbose = "true".equalsIgnoreCase(args[1]);
ClassPool pool = ClassPool.getDefault();
pool.insertClassPath(args[0]);
sysOut("---");
CtClass clazz = pool.get(MysqlDataSource.class.getName());
sysOut("Add properties setters/getters to " + clazz.getName());
addPropertiesGettersSetters(clazz, PropertyDefinitions.PROPERTY_KEY_TO_PROPERTY_DEFINITION.values());
clazz.writeFile(args[0]);
}
private static void sysOut(String s) {
if (verbose) {
System.out.println(s);
}
}
private static void addPropertiesGettersSetters(CtClass clazz, Collection<PropertyDefinition<?>> propertyDefinitions) throws Exception {
for (PropertyDefinition<?> def : propertyDefinitions) {
if (def.getCategory().equals(PropertyDefinitions.CATEGORY_XDEVAPI)) {
continue;
}
String pname = def.hasCcAlias() ? def.getCcAlias() : def.getName();
if (def instanceof StringPropertyDefinition) {
addGetter(clazz, pname, String.class.getName(), "getStringRuntimeProperty");
addSetter(clazz, pname, String.class.getName(), "setStringRuntimeProperty");
} else if (def instanceof BooleanPropertyDefinition) {
addGetter(clazz, pname, Boolean.TYPE.getName(), "getBooleanRuntimeProperty");
addSetter(clazz, pname, Boolean.TYPE.getName(), "setBooleanRuntimeProperty");
} else if (def instanceof IntegerPropertyDefinition) {
addGetter(clazz, pname, Integer.TYPE.getName(), "getIntegerRuntimeProperty");
addSetter(clazz, pname, Integer.TYPE.getName(), "setIntegerRuntimeProperty");
} else if (def instanceof LongPropertyDefinition) {
addGetter(clazz, pname, Long.TYPE.getName(), "getLongRuntimeProperty");
addSetter(clazz, pname, Long.TYPE.getName(), "setLongRuntimeProperty");
} else if (def instanceof MemorySizePropertyDefinition) {
addGetter(clazz, pname, Integer.TYPE.getName(), "getMemorySizeRuntimeProperty");
addSetter(clazz, pname, Integer.TYPE.getName(), "setMemorySizeRuntimeProperty");
} else if (def instanceof EnumPropertyDefinition<?>) {
addGetter(clazz, pname, String.class.getName(), "getEnumRuntimeProperty");
addSetter(clazz, pname, "java.lang.String", "setEnumRuntimeProperty");
} else {
throw new Exception("Unknown " + def.getName() + " property type.");
}
}
}
private static void addGetter(CtClass clazz, String pname, String paramType, String getPropertyMethod) throws Exception {
String mname = "get" + pname.substring(0, 1).toUpperCase() + pname.substring(1);
String mbody = "public " + paramType + " " + mname + "() throws java.sql.SQLException { return " + getPropertyMethod + "(\"" + pname + "\");}";
sysOut(mbody);
try {
CtMethod m = CtNewMethod.make(mbody, clazz);
clazz.addMethod(m);
sysOut(m.toString());
} catch (DuplicateMemberException ex) {
// ignore
}
}
private static void addSetter(CtClass clazz, String pname, String paramType, String setPropertyMethod) throws Exception {
String mname = "set" + pname.substring(0, 1).toUpperCase() + pname.substring(1);
String mbody = "public void " + mname + "(" + paramType + " value) throws java.sql.SQLException { " + setPropertyMethod + "(\"" + pname
+ "\", value);}";
sysOut(mbody);
try {
CtMethod m = CtNewMethod.make(mbody, clazz);
clazz.addMethod(m);
sysOut(m.toString());
} catch (DuplicateMemberException ex) {
// ignore
}
}
}

View File

@@ -1,193 +0,0 @@
/*
* Copyright (c) 2015, 2020, Oracle and/or its affiliates.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 2.0, as published by the
* Free Software Foundation.
*
* This program is also distributed with certain software (including but not
* limited to OpenSSL) that is licensed under separate terms, as designated in a
* particular file or component or in included license documentation. The
* authors of MySQL hereby grant you an additional permission to link the
* program and your derivative works with the separately licensed software that
* they have included with MySQL.
*
* Without limiting anything contained in the foregoing, this file, which is
* part of MySQL Connector/J, is also subject to the Universal FOSS Exception,
* version 1.0, a copy of which can be found at
* http://oss.oracle.com/licenses/universal-foss-exception.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
* for more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
package instrumentation;
import java.sql.Savepoint;
import java.util.Map;
import com.mysql.cj.jdbc.ConnectionImpl;
import com.mysql.cj.jdbc.ConnectionWrapper;
import javassist.ClassPool;
import javassist.CtClass;
import javassist.CtMethod;
public class CommonChecks {
private static boolean verbose = false;
public static void main(String[] args) throws Exception {
System.out.println("Applying CommonChecks.");
verbose = "true".equalsIgnoreCase(args[1]);
ClassPool pool = ClassPool.getDefault();
pool.insertClassPath(args[0]);
// params classes
CtClass ctClazz = pool.get(Class.class.getName());
//CtClass ctClob = pool.get(java.sql.Clob.class.getName());
//CtClass ctBindValue = pool.get(BindValue.class.getName());
CtClass ctBool = pool.get(boolean.class.getName());
//CtClass ctBoolArray = pool.get(boolean[].class.getName());
//CtClass ctByteArray2 = pool.get(byte[][].class.getName());
//CtClass ctBuffer = pool.get(Buffer.class.getName());
//CtClass ctExecutor = pool.get(Executor.class.getName());
//CtClass ctFieldArray = pool.get(Field[].class.getName());
CtClass ctInt = pool.get(int.class.getName());
CtClass ctIntArray = pool.get(int[].class.getName());
//CtClass ctInputStreamArray = pool.get(InputStream[].class.getName());
//CtClass ctLong = pool.get(long.class.getName());
CtClass ctMap = pool.get(Map.class.getName());
//CtClass ctMysqlSavepoint = pool.get(MysqlSavepoint.class.getName());
CtClass ctObjectArray = pool.get(Object[].class.getName());
//CtClass ctProperties = pool.get(Properties.class.getName());
//CtClass ctReader = pool.get(Reader.class.getName());
CtClass ctSavepoint = pool.get(Savepoint.class.getName());
//CtClass ctStatement = pool.get(Statement.class.getName());
CtClass ctString = pool.get(String.class.getName());
CtClass ctStringArray = pool.get(String[].class.getName());
CtClass clazz = pool.get(ConnectionImpl.class.getName());
// addClosedCheck(clazz.getDeclaredMethod("changeUser", new CtClass[] { ctString, ctString }));
addClosedCheck(clazz.getDeclaredMethod("clientPrepareStatement", new CtClass[] { ctString, ctInt, ctInt, ctBool }));
// addClosedCheck(clazz.getDeclaredMethod("commit", new CtClass[] {}));
addClosedCheck(clazz.getDeclaredMethod("createStatement", new CtClass[] { ctInt, ctInt }));
// addClosedCheck(clazz.getDeclaredMethod("getMetaData", new CtClass[] { ctBool, ctBool }));
// addClosedCheck(clazz.getDeclaredMethod("getNetworkTimeout", new CtClass[] {}));
// addClosedCheck(clazz.getDeclaredMethod("getSchema", new CtClass[] {}));
// addClosedCheck(clazz.getDeclaredMethod("isAutoCommitNonDefaultOnServer", new CtClass[] {}));
// addClosedCheck(clazz.getDeclaredMethod("isServerLocal", new CtClass[] {}));
addClosedCheck(clazz.getDeclaredMethod("isWrapperFor", new CtClass[] { ctClazz }));
// addClosedCheck(clazz.getDeclaredMethod("prepareStatement", new CtClass[] { ctString, ctInt, ctInt }));
// addClosedCheck(clazz.getDeclaredMethod("rollback", new CtClass[] {}));
// addClosedCheck(clazz.getDeclaredMethod("rollback", new CtClass[] { ctSavepoint }));
// addClosedCheck(clazz.getDeclaredMethod("setAutoCommit", new CtClass[] { ctBool }));
// addClosedCheck(clazz.getDeclaredMethod("setCatalog", new CtClass[] { ctString }));
// addClosedCheck(clazz.getDeclaredMethod("setNetworkTimeout", new CtClass[] { ctExecutor, ctInt }));
addClosedCheck(clazz.getDeclaredMethod("setReadOnly", new CtClass[] { ctBool }));
// addClosedCheck(clazz.getDeclaredMethod("setSavepoint", new CtClass[] { ctMysqlSavepoint }));
// addClosedCheck(clazz.getDeclaredMethod("setSchema", new CtClass[] { ctString }));
// addClosedCheck(clazz.getDeclaredMethod("setTransactionIsolation", new CtClass[] { ctInt }));
addClosedCheck(clazz.getDeclaredMethod("versionMeetsMinimum", new CtClass[] { ctInt, ctInt, ctInt }));
clazz.writeFile(args[0]);
clazz = pool.get(ConnectionWrapper.class.getName());
addClosedCheck(clazz.getDeclaredMethod("changeUser", new CtClass[] { ctString, ctString }));
addClosedCheck(clazz.getDeclaredMethod("clientPrepare", new CtClass[] { ctString }));
addClosedCheck(clazz.getDeclaredMethod("clientPrepare", new CtClass[] { ctString, ctInt, ctInt }));
addClosedCheck(clazz.getDeclaredMethod("clientPrepareStatement", new CtClass[] { ctString }));
addClosedCheck(clazz.getDeclaredMethod("clientPrepareStatement", new CtClass[] { ctString, ctInt }));
addClosedCheck(clazz.getDeclaredMethod("clientPrepareStatement", new CtClass[] { ctString, ctIntArray }));
addClosedCheck(clazz.getDeclaredMethod("clientPrepareStatement", new CtClass[] { ctString, ctStringArray }));
addClosedCheck(clazz.getDeclaredMethod("clientPrepareStatement", new CtClass[] { ctString, ctInt, ctInt }));
addClosedCheck(clazz.getDeclaredMethod("clientPrepareStatement", new CtClass[] { ctString, ctInt, ctInt, ctInt }));
addClosedCheck(clazz.getDeclaredMethod("commit", new CtClass[] {}));
addClosedCheck(clazz.getDeclaredMethod("clearWarnings", new CtClass[] {}));
addClosedCheck(clazz.getDeclaredMethod("createArrayOf", new CtClass[] { ctString, ctObjectArray }));
addClosedCheck(clazz.getDeclaredMethod("createBlob", new CtClass[] {}));
addClosedCheck(clazz.getDeclaredMethod("createClob", new CtClass[] {}));
addClosedCheck(clazz.getDeclaredMethod("createNClob", new CtClass[] {}));
addClosedCheck(clazz.getDeclaredMethod("createStatement", new CtClass[] {}));
addClosedCheck(clazz.getDeclaredMethod("createStatement", new CtClass[] { ctInt, ctInt }));
addClosedCheck(clazz.getDeclaredMethod("createStatement", new CtClass[] { ctInt, ctInt, ctInt }));
addClosedCheck(clazz.getDeclaredMethod("createSQLXML", new CtClass[] {}));
addClosedCheck(clazz.getDeclaredMethod("createStruct", new CtClass[] { ctString, ctObjectArray }));
addClosedCheck(clazz.getDeclaredMethod("getAutoCommit", new CtClass[] {}));
addClosedCheck(clazz.getDeclaredMethod("getCatalog", new CtClass[] {}));
addClosedCheck(clazz.getDeclaredMethod("getClientInfo", new CtClass[] {}));
addClosedCheck(clazz.getDeclaredMethod("getClientInfo", new CtClass[] { ctString }));
addClosedCheck(clazz.getDeclaredMethod("getDatabase", new CtClass[] {}));
addClosedCheck(clazz.getDeclaredMethod("getHoldability", new CtClass[] {}));
// addClosedCheck(clazz.getDeclaredMethod("getProcessHost", new CtClass[] {}));
addClosedCheck(clazz.getDeclaredMethod("getMetaData", new CtClass[] {}));
// addClosedCheck(clazz.getDeclaredMethod("getNetworkTimeout", new CtClass[] {}));
addClosedCheck(clazz.getDeclaredMethod("getTransactionIsolation", new CtClass[] {}));
addClosedCheck(clazz.getDeclaredMethod("getTypeMap", new CtClass[] {}));
addClosedCheck(clazz.getDeclaredMethod("getWarnings", new CtClass[] {}));
addClosedCheck(clazz.getDeclaredMethod("isReadOnly", new CtClass[] {}));
addClosedCheck(clazz.getDeclaredMethod("isReadOnly", new CtClass[] { ctBool }));
//addClosedCheck(clazz.getDeclaredMethod("isWrapperFor", new CtClass[] { ctClazz }));
addClosedCheck(clazz.getDeclaredMethod("nativeSQL", new CtClass[] { ctString }));
addClosedCheck(clazz.getDeclaredMethod("prepareCall", new CtClass[] { ctString }));
addClosedCheck(clazz.getDeclaredMethod("prepareCall", new CtClass[] { ctString, ctInt, ctInt }));
addClosedCheck(clazz.getDeclaredMethod("prepareCall", new CtClass[] { ctString, ctInt, ctInt, ctInt }));
addClosedCheck(clazz.getDeclaredMethod("prepareStatement", new CtClass[] { ctString }));
addClosedCheck(clazz.getDeclaredMethod("prepareStatement", new CtClass[] { ctString, ctInt }));
// addClosedCheck(clazz.getDeclaredMethod("prepareStatement", new CtClass[] { ctString, ctStringArray }));
addClosedCheck(clazz.getDeclaredMethod("prepareStatement", new CtClass[] { ctString, ctIntArray }));
addClosedCheck(clazz.getDeclaredMethod("prepareStatement", new CtClass[] { ctString, ctInt, ctInt }));
addClosedCheck(clazz.getDeclaredMethod("prepareStatement", new CtClass[] { ctString, ctInt, ctInt, ctInt }));
addClosedCheck(clazz.getDeclaredMethod("prepareStatement", new CtClass[] { ctString, ctStringArray }));
addClosedCheck(clazz.getDeclaredMethod("releaseSavepoint", new CtClass[] { ctSavepoint }));
addClosedCheck(clazz.getDeclaredMethod("resetServerState", new CtClass[] {}));
addClosedCheck(clazz.getDeclaredMethod("rollback", new CtClass[] {}));
addClosedCheck(clazz.getDeclaredMethod("rollback", new CtClass[] { ctSavepoint }));
addClosedCheck(clazz.getDeclaredMethod("serverPrepareStatement", new CtClass[] { ctString }));
addClosedCheck(clazz.getDeclaredMethod("serverPrepareStatement", new CtClass[] { ctString, ctInt }));
addClosedCheck(clazz.getDeclaredMethod("serverPrepareStatement", new CtClass[] { ctString, ctIntArray }));
addClosedCheck(clazz.getDeclaredMethod("serverPrepareStatement", new CtClass[] { ctString, ctStringArray }));
addClosedCheck(clazz.getDeclaredMethod("serverPrepareStatement", new CtClass[] { ctString, ctInt, ctInt }));
addClosedCheck(clazz.getDeclaredMethod("serverPrepareStatement", new CtClass[] { ctString, ctInt, ctInt, ctInt }));
addClosedCheck(clazz.getDeclaredMethod("setAutoCommit", new CtClass[] { ctBool }));
addClosedCheck(clazz.getDeclaredMethod("setCatalog", new CtClass[] { ctString }));
// addClosedCheck(clazz.getDeclaredMethod("setClientInfo", new CtClass[] { ctString, ctString }));
// addClosedCheck(clazz.getDeclaredMethod("setClientInfo", new CtClass[] { ctProperties }));
addClosedCheck(clazz.getDeclaredMethod("setDatabase", new CtClass[] { ctString }));
addClosedCheck(clazz.getDeclaredMethod("setHoldability", new CtClass[] { ctInt }));
// addClosedCheck(clazz.getDeclaredMethod("setNetworkTimeout", new CtClass[] { ctExecutor, ctInt }));
addClosedCheck(clazz.getDeclaredMethod("setReadOnly", new CtClass[] { ctBool }));
addClosedCheck(clazz.getDeclaredMethod("setSavepoint", new CtClass[] {}));
addClosedCheck(clazz.getDeclaredMethod("setSavepoint", new CtClass[] { ctString }));
addClosedCheck(clazz.getDeclaredMethod("setSchema", new CtClass[] { ctString }));
addClosedCheck(clazz.getDeclaredMethod("setTransactionIsolation", new CtClass[] { ctInt }));
addClosedCheck(clazz.getDeclaredMethod("setTypeMap", new CtClass[] { ctMap }));
addClosedCheck(clazz.getDeclaredMethod("shutdownServer", new CtClass[] {}));
//addClosedCheck(clazz.getDeclaredMethod("versionMeetsMinimum", new CtClass[] { ctInt, ctInt, ctInt }));
clazz.writeFile(args[0]);
//clazz = pool.get(MultiHostMySQLConnection.class.getName());
//addClosedCheck(clazz.getDeclaredMethod("isWrapperFor", new CtClass[] { ctClazz }));
//clazz.writeFile(args[0]);
}
private static void addClosedCheck(CtMethod m) throws Exception {
sysOut(m.toString());
m.insertBefore("checkClosed();");
}
private static void sysOut(String s) {
if (verbose) {
System.out.println(s);
}
}
}

View File

@@ -1,734 +0,0 @@
/*
* Copyright (c) 2015, 2020, Oracle and/or its affiliates.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 2.0, as published by the
* Free Software Foundation.
*
* This program is also distributed with certain software (including but not
* limited to OpenSSL) that is licensed under separate terms, as designated in a
* particular file or component or in included license documentation. The
* authors of MySQL hereby grant you an additional permission to link the
* program and your derivative works with the separately licensed software that
* they have included with MySQL.
*
* Without limiting anything contained in the foregoing, this file, which is
* part of MySQL Connector/J, is also subject to the Universal FOSS Exception,
* version 1.0, a copy of which can be found at
* http://oss.oracle.com/licenses/universal-foss-exception.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
* for more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
package instrumentation;
import java.lang.reflect.Method;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Savepoint;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.TreeMap;
import com.mysql.cj.QueryBindings;
import com.mysql.cj.exceptions.CJException;
import com.mysql.cj.jdbc.Blob;
import com.mysql.cj.jdbc.BlobFromLocator;
import com.mysql.cj.jdbc.CallableStatement;
import com.mysql.cj.jdbc.CallableStatement.CallableStatementParamInfo;
import com.mysql.cj.jdbc.ClientPreparedStatement;
import com.mysql.cj.jdbc.Clob;
import com.mysql.cj.jdbc.ConnectionImpl;
import com.mysql.cj.jdbc.ConnectionWrapper;
import com.mysql.cj.jdbc.DatabaseMetaData;
import com.mysql.cj.jdbc.DatabaseMetaDataUsingInfoSchema;
import com.mysql.cj.jdbc.JdbcConnection;
import com.mysql.cj.jdbc.JdbcStatement;
import com.mysql.cj.jdbc.MysqlConnectionPoolDataSource;
import com.mysql.cj.jdbc.MysqlDataSource;
import com.mysql.cj.jdbc.MysqlParameterMetadata;
import com.mysql.cj.jdbc.MysqlPooledConnection;
import com.mysql.cj.jdbc.MysqlSQLXML;
import com.mysql.cj.jdbc.MysqlSavepoint;
import com.mysql.cj.jdbc.MysqlXAConnection;
import com.mysql.cj.jdbc.MysqlXADataSource;
import com.mysql.cj.jdbc.MysqlXid;
import com.mysql.cj.jdbc.NClob;
import com.mysql.cj.jdbc.NonRegisteringDriver;
import com.mysql.cj.jdbc.ServerPreparedStatement;
import com.mysql.cj.jdbc.StatementImpl;
import com.mysql.cj.jdbc.SuspendableXAConnection;
import com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping;
import com.mysql.cj.jdbc.ha.LoadBalancedConnection;
import com.mysql.cj.jdbc.ha.LoadBalancedMySQLConnection;
import com.mysql.cj.jdbc.ha.MultiHostMySQLConnection;
import com.mysql.cj.jdbc.ha.ReplicationConnection;
import com.mysql.cj.jdbc.ha.ReplicationMySQLConnection;
import com.mysql.cj.jdbc.result.ResultSetImpl;
import com.mysql.cj.jdbc.result.ResultSetInternalMethods;
import com.mysql.cj.jdbc.result.ResultSetMetaData;
import com.mysql.cj.jdbc.result.UpdatableResultSet;
import com.mysql.cj.protocol.ColumnDefinition;
import com.mysql.cj.protocol.Message;
import javassist.ClassPool;
import javassist.CtClass;
import javassist.CtMethod;
import javassist.NotFoundException;
public class TranslateExceptions {
private static CtClass runTimeException = null;
private static ClassPool pool = ClassPool.getDefault();
private static Map<String, List<CtMethod>> processed = new TreeMap<>();
private static String EXCEPTION_INTERCEPTOR_GETTER = "getExceptionInterceptor()";
private static String EXCEPTION_INTERCEPTOR_MEMBER = "this.exceptionInterceptor";
private static boolean verbose = false;
public static void main(String[] args) throws Exception {
System.out.println("Applying TranslateExceptions.");
verbose = "true".equalsIgnoreCase(args[1]);
pool.insertClassPath(args[0]);
processed.clear();
runTimeException = pool.get(CJException.class.getName());
// params classes
//CtClass ctServerPreparedQueryBindValue = pool.get(ServerPreparedQueryBindValue.class.getName());
CtClass ctQueryBindings = pool.get(QueryBindings.class.getName());
CtClass ctByteArray = pool.get(byte[].class.getName());
CtClass ctColumnDefinition = pool.get(ColumnDefinition.class.getName());
CtClass ctLongArray = pool.get(long[].class.getName());
//CtClass ctInputStream = pool.get(InputStream.class.getName());
CtClass ctJdbcConnection = pool.get(JdbcConnection.class.getName());
CtClass ctMysqlSavepoint = pool.get(MysqlSavepoint.class.getName());
//CtClass ctPacketPayload = pool.get(PacketPayload.class.getName());
CtClass ctProperties = pool.get(Properties.class.getName());
CtClass ctResultSet = pool.get(ResultSet.class.getName());
CtClass ctResultSetInternalMethods = pool.get(ResultSetInternalMethods.class.getName());
CtClass ctStatement = pool.get(java.sql.Statement.class.getName());
CtClass ctStatementImpl = pool.get(StatementImpl.class.getName());
CtClass ctString = pool.get(String.class.getName());
CtClass ctMessageBody = pool.get(Message.class.getName());
// class we want to instrument
CtClass clazz;
/*
* java.sql.Blob
*/
// com.mysql.cj.jdbc.Blob implements java.sql.Blob, OutputStreamWatcher
clazz = pool.get(Blob.class.getName());
instrumentJdbcMethods(clazz, java.sql.Blob.class, false, EXCEPTION_INTERCEPTOR_MEMBER);
clazz.writeFile(args[0]);
// com.mysql.cj.jdbc.BlobFromLocator implements java.sql.Blob
clazz = pool.get(BlobFromLocator.class.getName());
instrumentJdbcMethods(clazz, java.sql.Blob.class, false, EXCEPTION_INTERCEPTOR_MEMBER);
clazz.writeFile(args[0]);
/*
* java.sql.CallableStatement
*/
// com.mysql.cj.jdbc.CallableStatement extends PreparedStatement implements java.sql.CallableStatement
clazz = pool.get(CallableStatement.class.getName());
instrumentJdbcMethods(clazz, java.sql.CallableStatement.class, false, EXCEPTION_INTERCEPTOR_GETTER);
instrumentJdbcMethods(clazz, JdbcStatement.class, true, EXCEPTION_INTERCEPTOR_GETTER);
// non-JDBC
catchRuntimeException(clazz, clazz.getDeclaredMethod("checkIsOutputParam", new CtClass[] { CtClass.intType }), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("checkParameterIndexBounds", new CtClass[] { CtClass.intType }), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("checkReadOnlyProcedure", new CtClass[] {}), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("convertGetProcedureColumnsToInternalDescriptors", new CtClass[] { ctResultSet }),
EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("determineParameterTypes", new CtClass[] {}), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("fakeParameterTypes", new CtClass[] { CtClass.booleanType }), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("fixParameterName", new CtClass[] { ctString }), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("generateParameterMap", new CtClass[] {}), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("getNamedParamIndex", new CtClass[] { ctString, CtClass.booleanType }),
EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("getOutputParameters", new CtClass[] { CtClass.intType }), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("mapOutputParameterIndexToRsIndex", new CtClass[] { CtClass.intType }),
EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("retrieveOutParams", new CtClass[] {}), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("setInOutParamsOnServer", new CtClass[] {}), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("setOutParams", new CtClass[] {}), EXCEPTION_INTERCEPTOR_GETTER);
clazz.writeFile(args[0]);
/*
* com.mysql.cj.jdbc.StatementWrapper extends WrapperBase implements Statement
*/
// TODO: Does it's own typical exception wrapping, could be instrumented with different catch method
/*
* com.mysql.cj.jdbc.PreparedStatementWrapper extends StatementWrapper implements PreparedStatement
*/
// TODO: Does it's own typical exception wrapping, could be instrumented with different catch method
/*
* com.mysql.cj.jdbc.CallableStatementWrapper extends PreparedStatementWrapper implements CallableStatement
*/
// TODO: Does it's own typical exception wrapping, could be instrumented with different catch method
/*
* java.sql.Clob
*/
// com.mysql.cj.jdbc.Clob implements java.sql.Clob, OutputStreamWatcher, WriterWatcher
clazz = pool.get(Clob.class.getName());
instrumentJdbcMethods(clazz, java.sql.Clob.class, false, EXCEPTION_INTERCEPTOR_MEMBER);
clazz.writeFile(args[0]);
/*
*
* java.sql.Connection extends java.sql.Wrapper
* ----> com.mysql.cj.jdbc.JdbcConnection extends java.sql.Connection, MysqlConnection
* ----------> com.mysql.cj.jdbc.ConnectionImpl
* ----------> com.mysql.cj.jdbc.LoadBalancedConnection extends JdbcConnection
* -------------> com.mysql.cj.jdbc.LoadBalancedMySQLConnection extends MultiHostMySQLConnection implements LoadBalancedConnection
* ----------> com.mysql.cj.jdbc.MultiHostMySQLConnection
* -------> com.mysql.cj.jdbc.ReplicationConnection implements JdbcConnection, PingTarget
* -------> com.mysql.cj.jdbc.ConnectionWrapper
*/
// ConnectionImpl extends AbstractJdbcConnection implements JdbcConnection
clazz = pool.get(ConnectionImpl.class.getName());
instrumentJdbcMethods(clazz, JdbcConnection.class, false, EXCEPTION_INTERCEPTOR_GETTER);
// non-JDBC
catchRuntimeException(clazz,
clazz.getDeclaredMethod("clientPrepareStatement", new CtClass[] { ctString, CtClass.intType, CtClass.intType, CtClass.booleanType }),
EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("createNewIO", new CtClass[] { CtClass.booleanType }), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("getMetaData", new CtClass[] { CtClass.booleanType, CtClass.booleanType }),
EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("handleAutoCommitDefaults", new CtClass[] {}), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("setSavepoint", new CtClass[] { ctMysqlSavepoint }), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("versionMeetsMinimum", new CtClass[] { CtClass.intType, CtClass.intType, CtClass.intType }),
EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("rollbackNoChecks", new CtClass[] {}), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("setupServerForTruncationChecks", new CtClass[] {}), EXCEPTION_INTERCEPTOR_GETTER);
clazz.writeFile(args[0]);
// com.mysql.cj.jdbc.LoadBalancedMySQLConnection extends MultiHostMySQLConnection implements LoadBalancedConnection
clazz = pool.get(LoadBalancedMySQLConnection.class.getName());
instrumentJdbcMethods(clazz, LoadBalancedConnection.class, false, EXCEPTION_INTERCEPTOR_GETTER);
clazz.writeFile(args[0]);
// MultiHostMySQLConnection implements JdbcConnection
clazz = pool.get(MultiHostMySQLConnection.class.getName());
instrumentJdbcMethods(clazz, JdbcConnection.class, false, EXCEPTION_INTERCEPTOR_GETTER);
clazz.writeFile(args[0]);
// com.mysql.cj.jdbc.ReplicationConnection implements JdbcConnection, PingTarget
clazz = pool.get(ReplicationMySQLConnection.class.getName());
instrumentJdbcMethods(clazz, ReplicationConnection.class, false, EXCEPTION_INTERCEPTOR_GETTER);
clazz.writeFile(args[0]);
// ConnectionWrapper extends WrapperBase implements JdbcConnection
clazz = pool.get(ConnectionWrapper.class.getName());
instrumentJdbcMethods(clazz, JdbcConnection.class, false, EXCEPTION_INTERCEPTOR_MEMBER);
// non-JDBC
catchRuntimeException(clazz, clazz.getDeclaredMethod("clientPrepare", new CtClass[] { ctString }), EXCEPTION_INTERCEPTOR_MEMBER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("clientPrepare", new CtClass[] { ctString, CtClass.intType, CtClass.intType }),
EXCEPTION_INTERCEPTOR_MEMBER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("setClientInfo", new CtClass[] { ctString, ctString }), EXCEPTION_INTERCEPTOR_MEMBER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("setClientInfo", new CtClass[] { ctProperties }), EXCEPTION_INTERCEPTOR_MEMBER);
clazz.writeFile(args[0]);
/*
* java.sql.DatabaseMetaData extends java.sql.Wrapper
*/
// com.mysql.cj.jdbc.DatabaseMetaData implements java.sql.DatabaseMetaData
clazz = pool.get(DatabaseMetaData.class.getName());
instrumentJdbcMethods(clazz, java.sql.DatabaseMetaData.class, false, EXCEPTION_INTERCEPTOR_GETTER);
clazz.writeFile(args[0]);
// com.mysql.cj.jdbc.DatabaseMetaDataUsingInfoSchema extends DatabaseMetaData
clazz = pool.get(DatabaseMetaDataUsingInfoSchema.class.getName());
instrumentJdbcMethods(clazz, java.sql.DatabaseMetaData.class, false, EXCEPTION_INTERCEPTOR_GETTER);
clazz.writeFile(args[0]);
/*
* java.sql.Driver
*/
// com.mysql.cj.jdbc.Driver extends NonRegisteringDriver implements java.sql.Driver
clazz = pool.get(NonRegisteringDriver.class.getName());
instrumentJdbcMethods(clazz, java.sql.Driver.class);
clazz.writeFile(args[0]);
/*
* java.sql.NClob
*/
// com.mysql.cj.jdbc.NClob extends Clob implements java.sql.NClob
clazz = pool.get(NClob.class.getName());
instrumentJdbcMethods(clazz, java.sql.NClob.class);
clazz.writeFile(args[0]);
/*
* java.sql.ParameterMetaData extends java.sql.Wrapper
*/
// com.mysql.cj.jdbc.CallableStatement.CallableStatementParamInfo implements ParameterMetaData
clazz = pool.get(CallableStatementParamInfo.class.getName());
instrumentJdbcMethods(clazz, java.sql.ParameterMetaData.class);
clazz.writeFile(args[0]);
// com.mysql.cj.jdbc.MysqlParameterMetadata implements ParameterMetaData
clazz = pool.get(MysqlParameterMetadata.class.getName());
instrumentJdbcMethods(clazz, java.sql.ParameterMetaData.class, false, EXCEPTION_INTERCEPTOR_MEMBER);
clazz.writeFile(args[0]);
/*
* java.sql.PreparedStatement extends java.sql.Statement (java.sql.Statement extends java.sql.Wrapper)
*/
// com.mysql.cj.jdbc.PreparedStatement extends com.mysql.cj.jdbc.StatementImpl implements java.sql.PreparedStatement
clazz = pool.get(ClientPreparedStatement.class.getName());
instrumentJdbcMethods(clazz, java.sql.PreparedStatement.class, false, EXCEPTION_INTERCEPTOR_GETTER);
instrumentJdbcMethods(clazz, JdbcStatement.class, true, EXCEPTION_INTERCEPTOR_GETTER);
// non-JDBC
catchRuntimeException(clazz, clazz.getDeclaredMethod("asSql", new CtClass[] { CtClass.booleanType }), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("checkBounds", new CtClass[] { CtClass.intType, CtClass.intType }), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("checkReadOnlySafeStatement", new CtClass[] {}), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("executeBatchedInserts", new CtClass[] { CtClass.intType }), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("executeBatchSerially", new CtClass[] { CtClass.intType }), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz,
clazz.getDeclaredMethod("executeInternal",
new CtClass[] { CtClass.intType, ctMessageBody, CtClass.booleanType, CtClass.booleanType, ctColumnDefinition, CtClass.booleanType }),
EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("executePreparedBatchAsMultiStatement", new CtClass[] { CtClass.intType }),
EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("executeUpdateInternal", new CtClass[] { CtClass.booleanType, CtClass.booleanType }),
EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("executeUpdateInternal", new CtClass[] { ctQueryBindings, CtClass.booleanType }),
EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("generateMultiStatementForBatch", new CtClass[] { CtClass.intType }),
EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("getBytesRepresentation", new CtClass[] { CtClass.intType }), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("getParameterBindings", new CtClass[] {}), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("initializeFromParseInfo", new CtClass[] {}), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("isNull", new CtClass[] { CtClass.intType }), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("isSelectQuery", new CtClass[] {}), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("prepareBatchedInsertSQL", new CtClass[] { ctJdbcConnection, CtClass.intType }),
EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz,
clazz.getDeclaredMethod("setBytes", new CtClass[] { CtClass.intType, ctByteArray, CtClass.booleanType, CtClass.booleanType }),
EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("setRetrieveGeneratedKeys", new CtClass[] { CtClass.booleanType }), EXCEPTION_INTERCEPTOR_GETTER);
clazz.writeFile(args[0]);
/*
* com.mysql.cj.jdbc.ServerPreparedStatement extends PreparedStatement
*/
clazz = pool.get(ServerPreparedStatement.class.getName());
instrumentJdbcMethods(clazz, java.sql.PreparedStatement.class, false, EXCEPTION_INTERCEPTOR_GETTER);
instrumentJdbcMethods(clazz, JdbcStatement.class, true, EXCEPTION_INTERCEPTOR_GETTER);
// non-JDBC
catchRuntimeException(clazz, clazz.getDeclaredMethod("getBinding", new CtClass[] { CtClass.intType, CtClass.booleanType }),
EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz,
clazz.getDeclaredMethod("executeInternal",
new CtClass[] { CtClass.intType, ctMessageBody, CtClass.booleanType, CtClass.booleanType, ctColumnDefinition, CtClass.booleanType }),
EXCEPTION_INTERCEPTOR_GETTER);
//catchRuntimeException(clazz, clazz.getDeclaredMethod("canRewriteAsMultiValueInsertAtSqlLevel", new CtClass[] {}), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("realClose", new CtClass[] { CtClass.booleanType, CtClass.booleanType }),
EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("serverExecute", new CtClass[] { CtClass.intType, CtClass.booleanType, ctColumnDefinition }),
EXCEPTION_INTERCEPTOR_GETTER);
//catchRuntimeException(clazz, clazz.getDeclaredMethod("serverLongData", new CtClass[] { CtClass.intType, ctServerPreparedQueryBindValue }),
// EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("serverPrepare", new CtClass[] { ctString }), EXCEPTION_INTERCEPTOR_GETTER);
clazz.writeFile(args[0]);
/*
* java.sql.ResultSet extends java.sql.Wrapper
*/
// com.mysql.cj.jdbc.ResultSetImpl implements com.mysql.cj.jdbc.ResultSetInternalMethods (extends java.sql.ResultSet)
clazz = pool.get(ResultSetImpl.class.getName());
instrumentJdbcMethods(clazz, ResultSetInternalMethods.class, false, EXCEPTION_INTERCEPTOR_GETTER);
clazz.writeFile(args[0]);
// com.mysql.cj.jdbc.UpdatableResultSet extends ResultSetImpl
clazz = pool.get(UpdatableResultSet.class.getName());
instrumentJdbcMethods(clazz, ResultSetInternalMethods.class, false, EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("generateStatements", new CtClass[] {}), EXCEPTION_INTERCEPTOR_GETTER);
clazz.writeFile(args[0]);
/*
* java.sql.ResultSetMetaData extends java.sql.Wrapper
*/
// com.mysql.cj.jdbc.ResultSetMetaData implements java.sql.ResultSetMetaData
clazz = pool.get(ResultSetMetaData.class.getName());
instrumentJdbcMethods(clazz, java.sql.ResultSetMetaData.class, false, EXCEPTION_INTERCEPTOR_MEMBER);
clazz.writeFile(args[0]);
/*
* java.sql.Savepoint
*/
// com.mysql.cj.jdbc.MysqlSavepoint implements java.sql.Savepoint
clazz = pool.get(MysqlSavepoint.class.getName());
instrumentJdbcMethods(clazz, Savepoint.class, false, EXCEPTION_INTERCEPTOR_MEMBER);
clazz.writeFile(args[0]);
/*
* java.sql.Statement extends java.sql.Wrapper
*/
// com.mysql.cj.jdbc.StatementImpl implements com.mysql.cj.jdbc.Statement (extends java.sql.Statement)
clazz = pool.get(StatementImpl.class.getName());
instrumentJdbcMethods(clazz, JdbcStatement.class, false, EXCEPTION_INTERCEPTOR_GETTER);
// non-JDBC
catchRuntimeException(clazz, clazz.getDeclaredMethod("createResultSetUsingServerFetch", new CtClass[] { ctString }), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("doPingInstead", new CtClass[] {}), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("executeInternal", new CtClass[] { ctString, CtClass.booleanType }), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz,
clazz.getDeclaredMethod("executeBatchUsingMultiQueries", new CtClass[] { CtClass.booleanType, CtClass.intType, CtClass.intType }),
EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("executeUpdateInternal", new CtClass[] { ctString, CtClass.booleanType, CtClass.booleanType }),
EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("executeSimpleNonQuery", new CtClass[] { ctJdbcConnection, ctString }),
EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("generatePingResultSet", new CtClass[] {}), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("getBatchedGeneratedKeys", new CtClass[] { CtClass.intType }), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("getBatchedGeneratedKeys", new CtClass[] { ctStatement }), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("getGeneratedKeysInternal", new CtClass[] { CtClass.longType }), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("getLastInsertID", new CtClass[] {}), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("getLongUpdateCount", new CtClass[] {}), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("getOpenResultSetCount", new CtClass[] {}), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("getResultSetInternal", new CtClass[] {}), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("processMultiCountsAndKeys", new CtClass[] { ctStatementImpl, CtClass.intType, ctLongArray }),
EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("removeOpenResultSet", new CtClass[] { ctResultSetInternalMethods }),
EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("resetCancelledState", new CtClass[] {}), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("setHoldResultsOpenOverClose", new CtClass[] { CtClass.booleanType }),
EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("setResultSetConcurrency", new CtClass[] { CtClass.intType }), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("useServerFetch", new CtClass[] {}), EXCEPTION_INTERCEPTOR_GETTER);
catchRuntimeException(clazz, clazz.getDeclaredMethod("checkCancelTimeout", new CtClass[] {}), EXCEPTION_INTERCEPTOR_GETTER);
clazz.writeFile(args[0]);
/*
* java.sql.SQLXML
*/
// com.mysql.cj.jdbc.MysqlSQLXML implements SQLXML
clazz = pool.get(MysqlSQLXML.class.getName());
instrumentJdbcMethods(clazz, java.sql.SQLXML.class, false, EXCEPTION_INTERCEPTOR_MEMBER);
clazz.writeFile(args[0]);
/*
* javax.sql.ConnectionPoolDataSource
*/
// MysqlConnectionPoolDataSource extends MysqlDataSource implements ConnectionPoolDataSource
clazz = pool.get(MysqlConnectionPoolDataSource.class.getName());
instrumentJdbcMethods(clazz, javax.sql.ConnectionPoolDataSource.class);
clazz.writeFile(args[0]);
/*
* javax.sql.DataSource
*/
// MysqlDataSource extends JdbcPropertySetImpl implements DataSource, Referenceable, Serializable, JdbcPropertySet
clazz = pool.get(MysqlDataSource.class.getName());
instrumentJdbcMethods(clazz, javax.sql.DataSource.class);
catchRuntimeException(clazz, clazz.getDeclaredMethod("getStringRuntimeProperty", new CtClass[] { ctString }), null);
catchRuntimeException(clazz, clazz.getDeclaredMethod("setStringRuntimeProperty", new CtClass[] { ctString, ctString }), null);
catchRuntimeException(clazz, clazz.getDeclaredMethod("getBooleanRuntimeProperty", new CtClass[] { ctString }), null);
catchRuntimeException(clazz, clazz.getDeclaredMethod("setBooleanRuntimeProperty", new CtClass[] { ctString, CtClass.booleanType }), null);
catchRuntimeException(clazz, clazz.getDeclaredMethod("getIntegerRuntimeProperty", new CtClass[] { ctString }), null);
catchRuntimeException(clazz, clazz.getDeclaredMethod("setIntegerRuntimeProperty", new CtClass[] { ctString, CtClass.intType }), null);
catchRuntimeException(clazz, clazz.getDeclaredMethod("getLongRuntimeProperty", new CtClass[] { ctString }), null);
catchRuntimeException(clazz, clazz.getDeclaredMethod("setLongRuntimeProperty", new CtClass[] { ctString, CtClass.longType }), null);
catchRuntimeException(clazz, clazz.getDeclaredMethod("getMemorySizeRuntimeProperty", new CtClass[] { ctString }), null);
catchRuntimeException(clazz, clazz.getDeclaredMethod("setMemorySizeRuntimeProperty", new CtClass[] { ctString, CtClass.intType }), null);
catchRuntimeException(clazz, clazz.getDeclaredMethod("getEnumRuntimeProperty", new CtClass[] { ctString }), null);
catchRuntimeException(clazz, clazz.getDeclaredMethod("setEnumRuntimeProperty", new CtClass[] { ctString, ctString }), null);
clazz.writeFile(args[0]);
/*
* javax.sql.PooledConnection
*/
// com.mysql.cj.jdbc.MysqlPooledConnection
clazz = pool.get(MysqlPooledConnection.class.getName());
instrumentJdbcMethods(clazz, javax.sql.PooledConnection.class, false, EXCEPTION_INTERCEPTOR_MEMBER);
clazz.writeFile(args[0]);
/*
* javax.sql.XAConnection
* javax.transaction.xa.XAResource
*/
// com.mysql.cj.jdbc.MysqlXAConnection extends MysqlPooledConnection implements XAConnection, XAResource
clazz = pool.get(MysqlXAConnection.class.getName());
instrumentJdbcMethods(clazz, javax.sql.XAConnection.class);
clazz.writeFile(args[0]);
// com.mysql.cj.jdbc.SuspendableXAConnection extends MysqlPooledConnection implements XAConnection, XAResource
clazz = pool.get(SuspendableXAConnection.class.getName());
instrumentJdbcMethods(clazz, javax.sql.XAConnection.class);
clazz.writeFile(args[0]);
/*
* javax.sql.XADataSource
*/
// com.mysql.cj.jdbc.MysqlXADataSource extends MysqlDataSource implements javax.sql.XADataSource
clazz = pool.get(MysqlXADataSource.class.getName());
instrumentJdbcMethods(clazz, javax.sql.DataSource.class);
instrumentJdbcMethods(clazz, javax.sql.XADataSource.class);
clazz.writeFile(args[0]);
/*
* javax.transaction.xa.Xid
*/
// com.mysql.cj.jdbc.MysqlXid implements Xid
clazz = pool.get(MysqlXid.class.getName());
instrumentJdbcMethods(clazz, javax.transaction.xa.Xid.class);
clazz.writeFile(args[0]);
/*
* TODO:
* java.sql.DataTruncation
*/
// com.mysql.cj.jdbc.exceptions.MysqlDataTruncation extends DataTruncation
/*
* TODO:
* java.sql.SQLException
*/
// com.mysql.cj.jdbc.exceptions.NotUpdatable extends SQLException
// com.mysql.cj.jdbc.exceptions.OperationNotSupportedException extends SQLException
// com.mysql.cj.jdbc.exceptions.PacketTooBigException extends SQLException
/*
* TODO:
* java.sql.SQLNonTransientException
*/
// com.mysql.cj.jdbc.exceptions.MySQLQueryInterruptedException extends SQLNonTransientException
// com.mysql.cj.jdbc.exceptions.MySQLStatementCancelledException extends SQLNonTransientException
/*
* TODO:
* java.sql.SQLRecoverableException
*/
// com.mysql.cj.jdbc.exceptions.CommunicationsException extends SQLRecoverableException implements StreamingNotifiable
// ---> com.mysql.cj.jdbc.exceptions.ConnectionFeatureNotAvailableException extends CommunicationsException
/*
* TODO:
* java.sql.SQLTransientException
* ---> java.sql.SQLTimeoutException
*/
// com.mysql.cj.jdbc.exceptions.MySQLTimeoutException extends SQLTimeoutException
/*
* TODO:
* java.sql.SQLTransientException
* ---> java.sql.SQLTransactionRollbackException
*/
// com.mysql.cj.jdbc.exceptions.MySQLTransactionRollbackException extends SQLTransactionRollbackException implements DeadlockTimeoutRollbackMarker
/*
* TODO:
* com.mysql.cj.jdbc.MysqlXAException extends javax.transaction.xa.XAException
*/
/*
* These classes have no implementations in c/J:
*
* java.sql.Array
* java.sql.BatchUpdateException
* java.sql.ClientInfoStatus
* java.sql.Date
* java.sql.DriverManager
* java.sql.DriverPropertyInfo
* java.sql.PseudoColumnUsage
* java.sql.Ref
* java.sql.RowId
* java.sql.RowIdLifetime
* java.sql.SQLClientInfoException
* java.sql.SQLData
* java.sql.SQLDataException
* java.sql.SQLFeatureNotSupportedException
* java.sql.SQLInput
* java.sql.SQLIntegrityConstraintViolationException
* java.sql.SQLInvalidAuthorizationSpecException
* java.sql.SQLNonTransientConnectionException
* java.sql.SQLOutput
* java.sql.SQLPermission
* java.sql.SQLSyntaxErrorException
* java.sql.SQLTransientConnectionException
* java.sql.SQLWarning
* java.sql.Struct
* java.sql.Time
* java.sql.Timestamp
* java.sql.Types
*
* javax.sql.CommonDataSource
* javax.sql.ConnectionEvent
* javax.sql.ConnectionEventListener
* javax.sql.RowSet
* javax.sql.RowSetEvent
* javax.sql.RowSetInternal
* javax.sql.RowSetListener
* javax.sql.RowSetMetaData
* javax.sql.RowSetReader
* javax.sql.RowSetWriter
* javax.sql.StatementEvent
* javax.sql.StatementEventListener
*
* javax.sql.rowset.BaseRowSet
* javax.sql.rowset.CachedRowSet
* javax.sql.rowset.FilteredRowSet
* javax.sql.rowset.JdbcRowSet
* javax.sql.rowset.Joinable
* javax.sql.rowset.JoinRowSet
* javax.sql.rowset.Predicate
* javax.sql.rowset.RowSetFactory
* javax.sql.rowset.RowSetMetaDataImpl
* javax.sql.rowset.RowSetProvider
* javax.sql.rowset.RowSetWarning
* javax.sql.rowset.WebRowSet
*
* javax.sql.rowset.serial.SerialArray
* javax.sql.rowset.serial.SerialBlob
* javax.sql.rowset.serial.SerialClob
* javax.sql.rowset.serial.SerialDatalink
* javax.sql.rowset.serial.SerialException
* javax.sql.rowset.serial.SerialJavaObject
* javax.sql.rowset.serial.SerialRef
* javax.sql.rowset.serial.SerialStruct
* javax.sql.rowset.serial.SQLInputImpl
* javax.sql.rowset.serial.SQLOutputImpl
*
* javax.sql.rowset.spi.SyncFactory
* javax.sql.rowset.spi.SyncFactoryException
* javax.sql.rowset.spi.SyncProvider
* javax.sql.rowset.spi.SyncProviderException
* javax.sql.rowset.spi.SyncResolver
* javax.sql.rowset.spi.TransactionalWriter
* javax.sql.rowset.spi.XmlReader
* javax.sql.rowset.spi.XmlWriter
*/
}
private static void instrumentJdbcMethods(CtClass cjClazz, Class<?> jdbcClass) throws Exception {
instrumentJdbcMethods(cjClazz, jdbcClass, false, null);
}
/**
* Instruments methods of cjClazz defined in jdbcClass.
*
* @param cjClazz
* CtClass to be instrumented.
* @param jdbcClass
* Class from JDBC specification where methods descriptors to be get.
* @param declaredMethodsOnly
* true - instrument methods declared in this class, false - also instrument inherited methods
* @param exceptionInterceptorStr
* exception interceptor reference as a string
* @throws Exception
* if an error occurs
*/
private static void instrumentJdbcMethods(CtClass cjClazz, Class<?> jdbcClass, boolean declaredMethodsOnly, String exceptionInterceptorStr)
throws Exception {
sysOutPrintln("---");
sysOutPrintln(cjClazz.getName());
Method[] methods;
if (declaredMethodsOnly) {
// instrument methods declared in this class which throws SQLException
methods = jdbcClass.getDeclaredMethods();
} else {
// instrument all methods, declared in this class and it's superclasses, which throws SQLException
methods = jdbcClass.getMethods();
}
for (Method method : methods) {
CtMethod ctm = null;
String prefix = "SKIPPED: ";
for (Class<?> exc : method.getExceptionTypes()) {
if (exc.equals(SQLException.class)) {
prefix = "INSTRUMENTING... ";
String jdbcClassName = method.getName();
List<CtClass> params = new LinkedList<>();
for (Class<?> param : method.getParameterTypes()) {
params.add(pool.get(param.getName()));
}
try {
ctm = cjClazz.getDeclaredMethod(jdbcClassName, params.toArray(new CtClass[0]));
} catch (NotFoundException ex) {
// Just ignoring because the only reason is that the method is implemented in superclass
prefix = "NOT FOUND: ";
}
break;
}
}
sysOutPrint(prefix);
sysOutPrint(method.toGenericString());
if (ctm != null) {
if (catchRuntimeException(cjClazz, ctm, exceptionInterceptorStr, false)) {
sysOutPrint(" ... DONE.");
} else {
sysOutPrint(" ... ALREADY PROCESSED!!!");
}
}
sysOutPrintln("");
}
}
private static void catchRuntimeException(CtClass clazz, CtMethod m, String exceptionInterceptorStr) throws Exception {
catchRuntimeException(clazz, m, exceptionInterceptorStr, true);
}
private static boolean catchRuntimeException(CtClass clazz, CtMethod m, String exceptionInterceptorStr, boolean log) throws Exception {
if (isProcessed(clazz.getClassFile().getName(), m)) {
if (log) {
sysOutPrintln("ALREADY PROCESSED!!! " + m);
}
return false;
}
if (log) {
sysOutPrintln(m + ", " + exceptionInterceptorStr);
}
if (exceptionInterceptorStr == null) {
m.addCatch("{throw " + SQLExceptionsMapping.class.getName() + ".translateException(ex);}", runTimeException, "ex");
} else {
m.addCatch("{throw " + SQLExceptionsMapping.class.getName() + ".translateException(ex, " + exceptionInterceptorStr + ");}", runTimeException, "ex");
}
processed.get(clazz.getClassFile().getName()).add(m);
return true;
}
private static boolean isProcessed(String fileName, CtMethod m) throws Exception {
List<CtMethod> methods = processed.get(fileName);
if (methods != null) {
if (methods.contains(m)) {
return true;
}
} else {
processed.put(fileName, new LinkedList<CtMethod>());
}
return false;
}
private static void sysOutPrint(String s) {
if (verbose) {
System.out.print(s);
}
}
private static void sysOutPrintln(String s) {
if (verbose) {
System.out.println(s);
}
}
}

View File

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>misc</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>

View File

@@ -1,66 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2019, 2020, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License, version 2.0, as published by the
Free Software Foundation.
This program is also distributed with certain software (including but not
limited to OpenSSL) that is licensed under separate terms, as designated in a
particular file or component or in included license documentation. The
authors of MySQL hereby grant you an additional permission to link the
program and your derivative works with the separately licensed software that
they have included with MySQL.
Without limiting anything contained in the foregoing, this file, which is
part of MySQL Connector/J, is also subject to the Universal FOSS Exception,
version 1.0, a copy of which can be found at
http://oss.oracle.com/licenses/universal-foss-exception.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
for more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-->
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Name="MySQL Connector J" Language="1033" Version="$(var.ProductVersion)" Manufacturer="Oracle Corporation" UpgradeCode="a887f346-5f02-4cf1-bb85-bf34b4c5f248">
<Package InstallerVersion="200" Compressed="yes" />
<Upgrade Id="574f7b74-d753-4965-995d-2de6a79afd01">
<UpgradeVersion OnlyDetect="no"
Minimum="6.0.0"
IncludeMinimum="yes"
Maximum="8.0.12"
IncludeMaximum="yes"
Property="OLDERVERSIONBEINGUPGRADED_OLD"/>
</Upgrade>
<Upgrade Id="a887f346-5f02-4cf1-bb85-bf34b4c5f248">
<UpgradeVersion OnlyDetect="no"
Minimum="8.0.13"
IncludeMinimum="yes"
Maximum="$(var.ProductVersion)"
Property="OLDERVERSIONBEINGUPGRADED"
IncludeMaximum="yes" />
</Upgrade>
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes" />
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="MySQL" Name="MySQL">
<Directory Id="INSTALLLOCATION" Name="MySQL Connector J 8.0">
<!-- Components Autogenerated using the WiX tool named Heat. See the Project properties for cmd line. -->
</Directory>
</Directory>
</Directory>
</Directory>
<Feature Id="ProductFeature" Title="wix_solution" Level="1">
<ComponentGroupRef Id="ConnJZipContents"/>
</Feature>
<InstallExecuteSequence>
<RemoveExistingProducts After="InstallInitialize" />
</InstallExecuteSequence>
</Product>
</Wix>

View File

@@ -1,5 +0,0 @@
@PRODUCT_NAME@@PRODUCT_SUFFIX@ (@MYSQL_CJ_VERSION@@MYSQL_CJ_VERSION_SNAPSHOT@@DEB_VERSION_SUFFIX@@ID_RELEASE@) @CODENAME@; urgency=low
* For release notes, please refer to https://dev.mysql.com/doc/relnotes/connector-j/8.0/en/
-- @MAINTAINER_EMAIL@ @PACKAGE_TIMESTAMP@

View File

@@ -1,14 +0,0 @@
Source: @PRODUCT_NAME@@PRODUCT_SUFFIX@
Section: database
Priority: optional
Maintainer: Oracle MySQL Product Engineering Team <mysql-build@oss.oracle.com>
Standards-Version: 3.9.2
Build-Depends: debhelper (>= 8.9.4)
Homepage: http://dev.mysql.com/downloads/connector/j/
Package: @PRODUCT_NAME@@PRODUCT_SUFFIX@
Section: database
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: MySQL Connector/J
Standardized MySQL database driver for Java

View File

@@ -1,9 +0,0 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: @PRODUCT@
Upstream-Contact: MySQL Release Engineering <mysql-build@oss.oracle.com>
Source: http://dev.mysql.com/
Files: *
Copyright: 2002, 2021, Oracle and/or its affiliates.
License:
For licensing information see the LICENSE file in this distribution.

View File

@@ -1,8 +0,0 @@
dist/toArchive/@PACKAGE_NAME@/@PRODUCT_NAME@@PRODUCT_SUFFIX@-@VERSION_FULL@.jar usr/share/java
#legal
dist/toArchive/@PACKAGE_NAME@/@LIC_FILE@ usr/share/doc/@PRODUCT_NAME@@PRODUCT_SUFFIX@
dist/toArchive/@PACKAGE_NAME@/README usr/share/doc/@PRODUCT_NAME@@PRODUCT_SUFFIX@
dist/toArchive/@PACKAGE_NAME@/CHANGES usr/share/doc/@PRODUCT_NAME@@PRODUCT_SUFFIX@
dist/toArchive/@PACKAGE_NAME@/INFO_SRC usr/share/doc/@PRODUCT_NAME@@PRODUCT_SUFFIX@
dist/toArchive/@PACKAGE_NAME@/INFO_BIN usr/share/doc/@PRODUCT_NAME@@PRODUCT_SUFFIX@

View File

@@ -1,77 +0,0 @@
#!/usr/bin/make -f
# Copyright (c) 2016, 2020, Oracle and/or its affiliates.
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License, version 2.0, as published by the
# Free Software Foundation.
#
# This program is also distributed with certain software (including but not
# limited to OpenSSL) that is licensed under separate terms, as designated in a
# particular file or component or in included license documentation. The
# authors of MySQL hereby grant you an additional permission to link the
# program and your derivative works with the separately licensed software that
# they have included with MySQL.
#
# Without limiting anything contained in the foregoing, this file, which is
# part of MySQL Connector/J, is also subject to the Universal FOSS Exception,
# version 1.0, a copy of which can be found at
# http://oss.oracle.com/licenses/universal-foss-exception.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
# for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
upstream_version := $(shell dpkg-parsechangelog | sed -n -e'/^Version: / { s/Version: //; s/-[^-]\+$$//; p }')
base_version = $(shell echo $(upstream_version) | sed -e's/r[0-9]\+$$//')
ANT_COMMON_OPTIONS=\
-Dcom.mysql.cj.build.dir.driver=build/driver \
-Dcom.mysql.cj.extra.libs=@WITH_JARDEPS@ \
-Dcom.mysql.cj.build.driver.version.status=@MYSQL_CJ_VERSION_STATUS@ \
-Dcom.mysql.cj.build.driver.version.extra=@MYSQL_CJ_VERSION_EXTRA@ \
-Dcom.mysql.cj.build.driver.version.snapshot=@MYSQL_CJ_VERSION_SNAPSHOT@ \
-Dcom.mysql.cj.build.driver.extraName=@PRODUCT_SUFFIX@ \
-Dcom.mysql.cj.dist.licenseUrl=@MYSQL_CJ_LICENSEURL@ \
-Djava.awt.headless=true
ifeq ($(ANT_HOME),)
ANT_CMD=ant
else
ANT_CMD=$(ANT_HOME)/bin/ant
endif
ANT_OPTS=-Xmx512M
ifneq ($(JAVA_HOME),)
ANT_JAVA_OPT=-Dcom.mysql.cj.build.jdk=$(JAVA_HOME)
endif
ifneq ($(COMMERCIAL),)
ANT_COM_OPT=-Dcom.mysql.cj.build.commercial=true
endif
%:
#dh $@ --with autoreconf
dh $@
override_dh_auto_configure:
override_dh_auto_build:
echo $(PATH)
echo $(JAVA_HOME)
$(ANT_CMD) \
$(ANT_COMMON_OPTIONS) \
$(ANT_JAVA_OPT) \
$(ANT_COM_OPT) \
full-package-no-sources
override_dh_auto_clean:
$(ANT_CMD) $(ANT_COMMON_OPTIONS) clean
override_dh_installchangelogs:
dh_installchangelogs -XCHANGES

View File

@@ -1,2 +0,0 @@
version=3
http://mysql.osuosl.org/Downloads/@PRODUCT_NAME@-(.+)\.tar\.gz

View File

@@ -1,67 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Copyright (c) 2006, 2020, Oracle and/or its affiliates.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License, version 2.0, as published by the
Free Software Foundation.
This program is also distributed with certain software (including but not
limited to OpenSSL) that is licensed under separate terms, as designated in a
particular file or component or in included license documentation. The
authors of MySQL hereby grant you an additional permission to link the
program and your derivative works with the separately licensed software that
they have included with MySQL.
Without limiting anything contained in the foregoing, this file, which is
part of MySQL Connector/J, is also subject to the Universal FOSS Exception,
version 1.0, a copy of which can be found at
http://oss.oracle.com/licenses/universal-foss-exception.
This program is distributed in the hope that it will be useful, but WITHOUT
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
for more details.
You should have received a copy of the GNU General Public License along with
this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-->
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>@MYSQL_CJ_VERSION@</version>
<packaging>jar</packaging>
<name>MySQL Connector/J</name>
<description>JDBC Type 4 driver for MySQL</description>
<licenses>
<license>
<name>The GNU General Public License, v2 with FOSS exception</name>
<distribution>repo</distribution>
<comments>For detailed license information see the LICENSE file in this distribution.</comments>
</license>
</licenses>
<url>http://dev.mysql.com/doc/connector-j/en/</url>
<scm>
<connection>scm:git:git@github.com:mysql/mysql-connector-j.git</connection>
<url>https://github.com/mysql/mysql-connector-j</url>
</scm>
<organization>
<name>Oracle Corporation</name>
<url>http://www.oracle.com</url>
</organization>
<dependencies>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>3.11.4</version>
</dependency>
</dependencies>
</project>

View File

@@ -1,197 +0,0 @@
# Copyright (c) 2017, 2020, Oracle and/or its affiliates.
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License, version 2.0, as published by the
# Free Software Foundation.
#
# This program is also distributed with certain software (including but not
# limited to OpenSSL) that is licensed under separate terms, as designated in a
# particular file or component or in included license documentation. The
# authors of MySQL hereby grant you an additional permission to link the
# program and your derivative works with the separately licensed software that
# they have included with MySQL.
#
# Without limiting anything contained in the foregoing, this file, which is
# part of MySQL Connector/J, is also subject to the Universal FOSS Exception,
# version 1.0, a copy of which can be found at
# http://oss.oracle.com/licenses/universal-foss-exception.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
# for more details.
#
# You should have received a copy of the GNU General Public License along with
# this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
# You can pass these options to "rpmbuild"
#
# --define="commercial <nonempty>"
# --define="with_ant <path>"
# --define="with_java <path>"
# --define="with_jardeps <path>"
# --define="with_docs <path>"
#
# The 'with_docs' option should have a path that points out
#
# <docs-base>/en/html/connector-j.html
# <docs-base>/en/html/mvl.css (not really used)
# <docs-base>/en/pdf/connector-j.pdf
# <docs-base>/en/txt/connector-j.txt
# Some linux distributions doesn't set the "dist" macro. There is a
# list how to identify dists here
# https://en.opensuse.org/openSUSE:Build_Service_cross_distribution_howto
# SuSE will not set "dist", others do
%if 0%{?suse_version} == 1315
%global dist .sles12
%global sles12 1
%endif
%if 0%{?suse_version} == 1500
%global dist .sl15
%global sles15 1
%endif
%if 0%{?commercial:1}
%global lic_tag Commercial
%else
%global lic_tag GPLv2
%endif
Summary: Standardized MySQL database driver for Java
Name: @MYSQL_CJ_EXTENDED_PROD_NAME@
Version: @MYSQL_CJ_VERSION_NUMERIC@
Release: @MYSQL_CJ_RPM_RELEASE_FULL@%{?dist}
Epoch: 1
License: %{lic_tag}
Group: Development/Libraries
URL: http://dev.mysql.com/downloads/connector/j/
Source0: https://cdn.mysql.com/Downloads/Connector-J/@MYSQL_CJ_FULL_PROD_NAME@.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%if 0%{?commercial:1}
Obsoletes: mysql-connector-java < %{version}-%{release}
Provides: mysql-connector-java = %{version}-%{release}
%endif
%if 0%{!?with_ant:1}
BuildRequires: ant
%endif
%if 0%{!?with_java:1}
BuildRequires: java-devel >= 1:1.8.0
%endif
%if 0%{?sles12:1} || 0%{?sles15:1}
Requires: java-headless >= 1.8.0
%else
Requires: java-headless >= 1:1.8.0
%endif
%description
MySQL provides connectivity for client applications developed in the
Java programming language with @MYSQL_CJ_DISPLAY_PROD_NAME@, a driver that
implements the [Java Database Connectivity (JDBC) API]
(http://www.oracle.com/technetwork/java/javase/jdbc/).
@MYSQL_CJ_DISPLAY_PROD_NAME@ @MYSQL_CJ_VERSION_SERIES@ is a JDBC Type 4 driver that is compatible with
the [JDBC 4.2](http://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/)
specification. The Type 4 designation means that the driver is a pure
Java implementation of the MySQL protocol and does not rely on the
MySQL client libraries.
For detailed information please visit the official
[@MYSQL_CJ_DISPLAY_PROD_NAME@ documentation]
(http://dev.mysql.com/doc/connector-j/en/).
%prep
%setup -q -n @MYSQL_CJ_FULL_PROD_NAME@
%build
COMMON_OPTIONS="\
-Dcom.mysql.cj.build.dir.driver=build/driver
-Dcom.mysql.cj.extra.libs=%{with_jardeps} \
-Dcom.mysql.cj.build.driver.version.status=@MYSQL_CJ_VERSION_STATUS@ \
-Dcom.mysql.cj.build.driver.version.extra=@MYSQL_CJ_VERSION_EXTRA@ \
-Dcom.mysql.cj.build.driver.version.snapshot=@MYSQL_CJ_VERSION_SNAPSHOT@ \
-Dcom.mysql.cj.build.driver.extraName=@MYSQL_CJ_EXTRA_NAME@ \
-Dcom.mysql.cj.dist.licenseUrl=@MYSQL_CJ_LICENSEURL@ \
-Djava.awt.headless=true"
%if 0%{?with_ant:1}
export ANT_HOME=%{with_ant}
export ANT_CMD="${ANT_HOME}/bin/ant"
%else
export ANT_CMD="ant"
%endif
export ANT_OPTS=-Xmx512M
%if 0%{?with_java:1}
export JAVA_HOME=%{with_java}
export PATH=${JAVA_HOME}/bin:$PATH
COMMON_OPTIONS="${COMMON_OPTIONS} -Dcom.mysql.cj.build.jdk=${JAVA_HOME}"
%endif
%if 0%{?commercial:1}
COMMON_OPTIONS="${COMMON_OPTIONS} -Dcom.mysql.cj.build.commercial=true"
%endif
# Get the file revision-info.properties again because it was excluded
# from SOURCES
cp %{_tmppath}/@MYSQL_CJ_FULL_PROD_NAME@/revision-info.properties .
${ANT_CMD} \
${COMMON_OPTIONS} \
full-package-no-sources
# We use the 'full-package-no-sources' as there are changes done only
# when creating a package, 'dist' is not enough. To make it a bit easier
# in the install step, we rename the directory with the content
mv dist/toArchive/@PACKAGE_NAME@ package-content
# The 'package' target doesn't copy the HTML or PDF doc like 'dist',
# we copy it here
%if 0%{?with_docs:1}
mkdir -p package-content/docs
cp %{with_docs}/en/html/connector-j.html package-content/docs/
cp %{with_docs}/en/html/mvl.css package-content/docs/
cp %{with_docs}/en/pdf/connector-j.pdf package-content/docs/
cp %{with_docs}/en/txt/connector-j.txt package-content/docs/
%endif
%install
install -d -m 0755 %{buildroot}%{_javadir}
install -p -m 0644 package-content/@MYSQL_CJ_FULL_PROD_NAME@.jar %{buildroot}%{_javadir}/%{name}.jar
%clean
rm -rf %{buildroot}
%files
%doc package-content/CHANGES
# EL6 doesn't like 'license' macro here, so we use 'doc'
%doc package-content/LICENSE
%doc package-content/README
%doc package-content/INFO_BIN
%doc package-content/INFO_SRC
%if 0%{?with_docs:1}
# README.txt is a rename of "connector-j.txt"
%doc package-content/docs/connector-j.txt
%doc package-content/docs/connector-j.pdf
%doc package-content/docs/connector-j.html
%doc package-content/docs/mvl.css
%endif
%{_javadir}/%{name}.jar
%changelog
* Mon Nov 27 2017 MySQL Release Engineering <mysql-build@oss.oracle.com> - 8.0.9-1
- Set more in "build.xml"
* Tue Mar 14 2017 MySQL Release Engineering <mysql-build@oss.oracle.com> - 6.0.7-1
- initial package

View File

@@ -1,84 +0,0 @@
/*
* Copyright (c) 2015, 2020, Oracle and/or its affiliates.
*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License, version 2.0, as published by the
* Free Software Foundation.
*
* This program is also distributed with certain software (including but not
* limited to OpenSSL) that is licensed under separate terms, as designated in a
* particular file or component or in included license documentation. The
* authors of MySQL hereby grant you an additional permission to link the
* program and your derivative works with the separately licensed software that
* they have included with MySQL.
*
* Without limiting anything contained in the foregoing, this file, which is
* part of MySQL Connector/J, is also subject to the Universal FOSS Exception,
* version 1.0, a copy of which can be found at
* http://oss.oracle.com/licenses/universal-foss-exception.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
* for more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
package demo.x.devapi;
import com.mysql.cj.xdevapi.Collection;
import com.mysql.cj.xdevapi.DbDoc;
import com.mysql.cj.xdevapi.DbDocImpl;
import com.mysql.cj.xdevapi.DocResult;
import com.mysql.cj.xdevapi.JsonNumber;
import com.mysql.cj.xdevapi.JsonString;
import com.mysql.cj.xdevapi.Schema;
import com.mysql.cj.xdevapi.Session;
import com.mysql.cj.xdevapi.SessionFactory;
/*
* Sample program showing how to use Connector/J's Dev API support.
*/
public class DevApiSample {
public static void main(String[] args) {
Session session = new SessionFactory().getSession("mysqlx://localhost:33060/test?user=user&password=password1234");
System.err.println("Connected!");
Schema schema = session.getDefaultSchema();
System.err.println("Default schema is: " + schema);
documentWalkthrough(schema);
}
public static void documentWalkthrough(Schema schema) {
// document walthrough
Collection coll = schema.createCollection("myBooks", /* reuseExisting? */ true);
DbDoc newDoc = new DbDocImpl().add("isbn", new JsonString().setValue("12345"));
newDoc.add("title", new JsonString().setValue("Effi Briest"));
newDoc.add("author", new JsonString().setValue("Theodor Fontane"));
newDoc.add("currentlyReadingPage", new JsonNumber().setValue(String.valueOf(42)));
coll.add(newDoc).execute();
// note: "$" prefix for document paths is optional. "$.title.somethingElse[0]" is the same as "title.somethingElse[0]" in document expressions
DocResult docs = coll.find("$.title = 'Effi Briest' and $.currentlyReadingPage > 10").execute();
DbDoc book = docs.next();
System.err.println("Currently reading " + ((JsonString) book.get("title")).getString() + " on page "
+ ((JsonNumber) book.get("currentlyReadingPage")).getInteger());
// increment the page number and fetch it again
coll.modify("$.isbn = 12345").set("$.currentlyReadingPage", ((JsonNumber) book.get("currentlyReadingPage")).getInteger() + 1).execute();
docs = coll.find("$.title = 'Effi Briest' and $.currentlyReadingPage > 10").execute();
book = docs.next();
System.err.println("Currently reading " + ((JsonString) book.get("title")).getString() + " on page "
+ ((JsonNumber) book.get("currentlyReadingPage")).getInteger());
// remove the doc
coll.remove("true").execute();
System.err.println("Number of books in collection: " + coll.count());
schema.dropCollection(coll.getName());
}
}

Some files were not shown because too many files have changed in this diff Show More