* 调大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> <parent>
<groupId>com.gitee</groupId> <groupId>com.gitee</groupId>
<artifactId>dbswitch</artifactId> <artifactId>dbswitch</artifactId>
<version>1.5.1</version> <version>1.5.2</version>
</parent> </parent>
<artifactId>dbswitch-common</artifactId> <artifactId>dbswitch-common</artifactId>

View File

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

View File

@@ -18,6 +18,7 @@ import java.util.HashSet;
import java.sql.Connection; import java.sql.Connection;
import java.sql.DatabaseMetaData; import java.sql.DatabaseMetaData;
import java.sql.DriverManager; import java.sql.DriverManager;
import java.sql.Statement;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
import java.sql.ResultSetMetaData; import java.sql.ResultSetMetaData;
@@ -217,8 +218,8 @@ public abstract class AbstractDatabase implements IDatabaseInterface {
@Override @Override
public void testQuerySQL(String sql) { public void testQuerySQL(String sql) {
String wrapperSql = this.getTestQuerySQL(sql); String wrapperSql = this.getTestQuerySQL(sql);
try(PreparedStatement pstmt = this.connection.prepareStatement(wrapperSql);) { try (Statement statement = this.connection.createStatement();) {
pstmt.executeQuery(); statement.execute(wrapperSql);
} catch (SQLException e) { } catch (SQLException e) {
throw new RuntimeException(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) { if (length < 1 || length >= AbstractDatabase.CLOB_LENGTH) {
retval += "TEXT"; retval += "TEXT";
} else { } else {
retval += "VARCHAR(" + length + ")"; if (null != pks && pks.contains(fieldname)) {
retval += "VARCHAR(" + length + ")";
} else {
retval += "TEXT";
}
} }
break; break;
case ColumnMetaData.TYPE_BINARY: case ColumnMetaData.TYPE_BINARY:

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -21,7 +21,7 @@ APP_LIB_PATH=$APP_HOME/lib
APP_CONF_PATH=$APP_HOME/conf APP_CONF_PATH=$APP_HOME/conf
# JVMFLAGS JVM参数可以在这里设置 # 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 if [ "$JAVA_HOME" != "" ]; then
JAVA="$JAVA_HOME/bin/java" JAVA="$JAVA_HOME/bin/java"

View File

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

View File

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