* 调大java堆内存参数
* Fix: MySQL8转Postgres的字符串类型调试
This commit is contained in:
inrgihc
2021-02-07 16:54:52 +08:00
parent 6db001d2ce
commit f09a06dea2
17 changed files with 27 additions and 18 deletions

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee</groupId>
<artifactId>dbswitch</artifactId>
<version>1.5.1</version>
<version>1.5.2</version>
</parent>
<artifactId>dbswitch-common</artifactId>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee</groupId>
<artifactId>dbswitch</artifactId>
<version>1.5.1</version>
<version>1.5.2</version>
</parent>
<artifactId>dbswitch-core</artifactId>

View File

@@ -18,6 +18,7 @@ import java.util.HashSet;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
import java.sql.DriverManager;
import java.sql.Statement;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
@@ -217,8 +218,8 @@ public abstract class AbstractDatabase implements IDatabaseInterface {
@Override
public void testQuerySQL(String sql) {
String wrapperSql = this.getTestQuerySQL(sql);
try(PreparedStatement pstmt = this.connection.prepareStatement(wrapperSql);) {
pstmt.executeQuery();
try (Statement statement = this.connection.createStatement();) {
statement.execute(wrapperSql);
} catch (SQLException e) {
throw new RuntimeException(e);
}

View File

@@ -112,7 +112,11 @@ public class DatabaseGreenplumImpl extends AbstractDatabase implements IDatabase
if (length < 1 || length >= AbstractDatabase.CLOB_LENGTH) {
retval += "TEXT";
} else {
retval += "VARCHAR(" + length + ")";
if (null != pks && pks.contains(fieldname)) {
retval += "VARCHAR(" + length + ")";
} else {
retval += "TEXT";
}
}
break;
case ColumnMetaData.TYPE_BINARY:

View File

@@ -112,7 +112,11 @@ public class DatabasePostgresImpl extends AbstractDatabase implements IDatabaseI
if (length < 1 || length >= AbstractDatabase.CLOB_LENGTH) {
retval += "TEXT";
} else {
retval += "VARCHAR(" + length + ")";
if (null != pks && pks.contains(fieldname)) {
retval += "VARCHAR(" + length + ")";
} else {
retval += "TEXT";
}
}
break;
case ColumnMetaData.TYPE_BINARY:

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee</groupId>
<artifactId>dbswitch</artifactId>
<version>1.5.1</version>
<version>1.5.2</version>
</parent>
<artifactId>dbswitch-data</artifactId>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee</groupId>
<artifactId>dbswitch</artifactId>
<version>1.5.1</version>
<version>1.5.2</version>
</parent>
<artifactId>dbswitch-dbchange</artifactId>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>com.gitee</groupId>
<artifactId>dbswitch</artifactId>
<version>1.5.1</version>
<version>1.5.2</version>
</parent>
<artifactId>dbswitch-dbcommon</artifactId>

View File

@@ -3,7 +3,7 @@
<parent>
<groupId>com.gitee</groupId>
<artifactId>dbswitch</artifactId>
<version>1.5.1</version>
<version>1.5.2</version>
</parent>
<artifactId>dbswitch-dbsynch</artifactId>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee</groupId>
<artifactId>dbswitch</artifactId>
<version>1.5.1</version>
<version>1.5.2</version>
</parent>
<artifactId>dbswitch-dbwriter</artifactId>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee</groupId>
<artifactId>dbswitch</artifactId>
<version>1.5.1</version>
<version>1.5.2</version>
</parent>
<artifactId>dbswitch-pgwriter</artifactId>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee</groupId>
<artifactId>dbswitch</artifactId>
<version>1.5.1</version>
<version>1.5.2</version>
</parent>
<artifactId>dbswitch-sql</artifactId>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee</groupId>
<artifactId>dbswitch</artifactId>
<version>1.5.1</version>
<version>1.5.2</version>
</parent>
<artifactId>dbswitch-webapi</artifactId>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>com.gitee</groupId>
<artifactId>dbswitch</artifactId>
<version>1.5.1</version>
<version>1.5.2</version>
</parent>
<artifactId>package-tool</artifactId>

View File

@@ -21,7 +21,7 @@ APP_LIB_PATH=$APP_HOME/lib
APP_CONF_PATH=$APP_HOME/conf
# JVMFLAGS JVM参数可以在这里设置
JVMFLAGS="-Xms1024m -Xmx1024m -Xmn512m -XX:+DisableExplicitGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Dfile.encoding=UTF-8 -Doracle.jdbc.J2EE13Compliant=true"
JVMFLAGS="-Xms2g -Xmx2g -Xmn1g -XX:+DisableExplicitGC -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -Dfile.encoding=UTF-8 -Doracle.jdbc.J2EE13Compliant=true"
if [ "$JAVA_HOME" != "" ]; then
JAVA="$JAVA_HOME/bin/java"

View File

@@ -21,7 +21,7 @@
<groupId>com.gitee</groupId>
<artifactId>dbswitch</artifactId>
<version>1.5.1</version>
<version>1.5.2</version>
<packaging>pom</packaging>
<name>dbswitch</name>
<description>database switch project</description>

View File

@@ -1,6 +1,6 @@
@echo off
set APP_VERSION=1.5.1
set APP_VERSION=1.5.2
echo "Clean Project ..."
call mvn clean -f pom.xml