Skip to content

Split insert query during export when they exceed a configurable length #31

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Java CI with Maven

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@ Supplying `false` to these functions will disable their respective actions.

CHANGELOG
=========
V 1.2.5
- Handling of BOOLEAN
V 1.2.4
- Handling of BIGINT, SMALLINT, FLOAT, REAL, DOUBLE, NUMERIC, DECIMAL
V 1.2.1
- Raises a new runtime exception `MysqlBackup4JException` if the required properties are not configured

Expand Down
3 changes: 3 additions & 0 deletions install-into-local-repo.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
call mvn install:install-file -Dfile="target/mysql-backup4j-1.2.2.jar" -DgroupId="com.smattme" -DartifactId="mysql-backup4j" -Dversion="1.2.2" -Dpackaging=jar -DlocalRepositoryPath="../bartleby/.m2"
certutil -hashfile "../bartleby/.m2/com/smattme/mysql-backup4j/1.2.2/mysql-backup4j-1.2.2.jar" MD5 > "../bartleby/.m2/com/smattme/mysql-backup4j/1.2.2/mysql-backup4j-1.2.2.jar.MD5"
certutil -hashfile "../bartleby/.m2/com/smattme/mysql-backup4j/1.2.2/mysql-backup4j-1.2.2.pom" MD5 > "../bartleby/.m2/com/smattme/mysql-backup4j/1.2.2/mysql-backup4j-1.2.2.pom.MD5"
81 changes: 51 additions & 30 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>com.smattme</groupId>
<groupId>fr.neolegal</groupId>
<artifactId>mysql-backup4j</artifactId>
<version>1.2.1</version>
<version>1.2.7</version>
<packaging>jar</packaging>

<name>${project.groupId}:${project.artifactId}</name>
<description>
This is a simple library for backing up mysql databases and sending to emails, cloud storage and so on.
It also provide a method for programmatically, importing SQL queries generated during the export process,
</description>
<url>https://github.com/SeunMatt/mysql-backup4j</url>
<url>https://github.com/nicolasriousset/mysql-backup4j</url>

<licenses>
<license>
Expand All @@ -30,58 +29,82 @@
<organization>SmattMe</organization>
<organizationUrl>https://smattme.com</organizationUrl>
</developer>
<developer>
<name>Nicolas Riousset</name>
<email>nicolas@neolegal.fr</email>
<organization>NeoLegal</organization>
<organizationUrl>https://neolegal.fr</organizationUrl>
</developer>
</developers>

<scm>
<connection>scm:git:git://github.com/SeunMatt/mysql-backup4j.git</connection>
<developerConnection>scm:git:ssh://github.com:SeunMatt/mysql-backup4j.git</developerConnection>
<url>https://github.com/SeunMatt/mysql-backup4j/tree/master</url>
<connection>scm:git:git://github.com/nicolasriousset/mysql-backup4j.git</connection>
<developerConnection>scm:git:ssh://github.com:nicolasriousset/mysql-backup4j.git</developerConnection>
<url>https://github.com/nicolasriousset/mysql-backup4j/tree/master</url>
</scm>

<properties>

<maven.version>3.11.0</maven.version>
<java.version>17</java.version>
</properties>

<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.21</version>
<version>8.0.33</version>
</dependency>
<dependency>
<groupId>org.zeroturnaround</groupId>
<artifactId>zt-zip</artifactId>
<version>1.12</version>
<version>1.16</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
<version>1.5.0-b01</version>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
<version>2.0.1</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.25</version>
<version>2.0.9</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.25</version>
<version>2.0.9</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.7.0</version>
<version>5.10.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<version>1.17.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>mysql</artifactId>
<version>1.17.6</version>
<scope>test</scope>
</dependency>
</dependencies>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
<url>https://s01.oss.sonatype.org/content/repositories/releases/</url>
</repository>
</distributionManagement>

Expand All @@ -90,26 +113,24 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<version>${maven.version}</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
<version>3.1.2</version>
<configuration>
<includes>
<include>com.smattme.MysqlBackup4JIntegrationTest</include>
</includes>
<excludedGroups>Integration</excludedGroups>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.2.0</version>
<version>3.5.0</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand All @@ -122,7 +143,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<version>3.3.0</version>
<executions>
<execution>
<id>attach-sources</id>
Expand All @@ -135,7 +156,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.6</version>
<version>3.1.0</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand All @@ -149,11 +170,11 @@
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.8</version>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/com/smattme/EmailService.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.mail.*;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeBodyPart;
import javax.mail.internet.MimeMessage;
import javax.mail.internet.MimeMultipart;
import jakarta.mail.*;
import jakarta.mail.internet.InternetAddress;
import jakarta.mail.internet.MimeBodyPart;
import jakarta.mail.internet.MimeMessage;
import jakarta.mail.internet.MimeMultipart;
import java.io.File;
import java.util.Properties;

Expand Down
Loading