This is an automated email from the ASF dual-hosted git repository. zhangyonglun pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/shardingsphere.git
The following commit(s) were added to refs/heads/master by this push: new 9b7287a Update mysql data source checker (#7742) 9b7287a is described below commit 9b7287a086c45f019b130404e48197b3eacfeba6 Author: avalon5666 <64016692+avalon5...@users.noreply.github.com> AuthorDate: Mon Oct 12 14:38:42 2020 +0800 Update mysql data source checker (#7742) * Update mysql data source checker * Fix unit test --- .../apache/shardingsphere/scaling/mysql/MySQLDataSourceChecker.java | 1 + .../shardingsphere/scaling/mysql/MySQLDataSourceCheckerTest.java | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/shardingsphere-scaling/shardingsphere-scaling-mysql/src/main/java/org/apache/shardingsphere/scaling/mysql/MySQLDataSourceChecker.java b/shardingsphere-scaling/shardingsphere-scaling-mysql/src/main/java/org/apache/shardingsphere/scaling/mysql/MySQLDataSourceChecker.java index 62c8326e..b03e6dd 100644 --- a/shardingsphere-scaling/shardingsphere-scaling-mysql/src/main/java/org/apache/shardingsphere/scaling/mysql/MySQLDataSourceChecker.java +++ b/shardingsphere-scaling/shardingsphere-scaling-mysql/src/main/java/org/apache/shardingsphere/scaling/mysql/MySQLDataSourceChecker.java @@ -47,6 +47,7 @@ public final class MySQLDataSourceChecker extends AbstractDataSourceChecker { static { REQUIRED_VARIABLES.put("LOG_BIN", "ON"); REQUIRED_VARIABLES.put("BINLOG_FORMAT", "ROW"); + REQUIRED_VARIABLES.put("BINLOG_ROW_IMAGE", "FULL"); } @Override diff --git a/shardingsphere-scaling/shardingsphere-scaling-mysql/src/test/java/org/apache/shardingsphere/scaling/mysql/MySQLDataSourceCheckerTest.java b/shardingsphere-scaling/shardingsphere-scaling-mysql/src/test/java/org/apache/shardingsphere/scaling/mysql/MySQLDataSourceCheckerTest.java index 856d440..3943633 100644 --- a/shardingsphere-scaling/shardingsphere-scaling-mysql/src/test/java/org/apache/shardingsphere/scaling/mysql/MySQLDataSourceCheckerTest.java +++ b/shardingsphere-scaling/shardingsphere-scaling-mysql/src/test/java/org/apache/shardingsphere/scaling/mysql/MySQLDataSourceCheckerTest.java @@ -96,9 +96,9 @@ public final class MySQLDataSourceCheckerTest { @Test public void assertCheckVariableSuccess() throws SQLException { when(resultSet.next()).thenReturn(true, true); - when(resultSet.getString(2)).thenReturn("ON", "ROW"); + when(resultSet.getString(2)).thenReturn("ON", "ROW", "FULL"); dataSourceChecker.checkVariable(dataSources); - verify(preparedStatement, Mockito.times(2)).executeQuery(); + verify(preparedStatement, Mockito.times(3)).executeQuery(); } @Test(expected = PrepareFailedException.class)