You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ma...@apache.org on 2018/07/30 23:05:28 UTC
nifi git commit: NIFI-5342 CaptureChangeMySQL didn't escape database
name
Repository: nifi
Updated Branches:
refs/heads/master 44face10b -> e97ae921f
NIFI-5342 CaptureChangeMySQL didn't escape database name
Signed-off-by: Matthew Burgess <ma...@apache.org>
This closes #2923
Project: http://git-wip-us.apache.org/repos/asf/nifi/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi/commit/e97ae921
Tree: http://git-wip-us.apache.org/repos/asf/nifi/tree/e97ae921
Diff: http://git-wip-us.apache.org/repos/asf/nifi/diff/e97ae921
Branch: refs/heads/master
Commit: e97ae921f759e51ee1709ef0884fc029bd40d26b
Parents: 44face1
Author: uday <ud...@gmail.com>
Authored: Sun Jul 22 00:50:05 2018 +0530
Committer: Matthew Burgess <ma...@apache.org>
Committed: Mon Jul 30 19:04:19 2018 -0400
----------------------------------------------------------------------
.../org/apache/nifi/cdc/mysql/processors/CaptureChangeMySQL.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/nifi/blob/e97ae921/nifi-nar-bundles/nifi-cdc/nifi-cdc-mysql-bundle/nifi-cdc-mysql-processors/src/main/java/org/apache/nifi/cdc/mysql/processors/CaptureChangeMySQL.java
----------------------------------------------------------------------
diff --git a/nifi-nar-bundles/nifi-cdc/nifi-cdc-mysql-bundle/nifi-cdc-mysql-processors/src/main/java/org/apache/nifi/cdc/mysql/processors/CaptureChangeMySQL.java b/nifi-nar-bundles/nifi-cdc/nifi-cdc-mysql-bundle/nifi-cdc-mysql-processors/src/main/java/org/apache/nifi/cdc/mysql/processors/CaptureChangeMySQL.java
index 8472d68..f58ed7e 100644
--- a/nifi-nar-bundles/nifi-cdc/nifi-cdc-mysql-bundle/nifi-cdc-mysql-processors/src/main/java/org/apache/nifi/cdc/mysql/processors/CaptureChangeMySQL.java
+++ b/nifi-nar-bundles/nifi-cdc/nifi-cdc-mysql-bundle/nifi-cdc-mysql-processors/src/main/java/org/apache/nifi/cdc/mysql/processors/CaptureChangeMySQL.java
@@ -1000,8 +1000,8 @@ public class CaptureChangeMySQL extends AbstractSessionFactoryProcessor {
TableInfo tableInfo = null;
if (jdbcConnection != null) {
try (Statement s = jdbcConnection.createStatement()) {
- s.execute("USE " + key.getDatabaseName());
- ResultSet rs = s.executeQuery("SELECT * FROM " + key.getTableName() + " LIMIT 0");
+ s.execute("USE `" + key.getDatabaseName() + "`");
+ ResultSet rs = s.executeQuery("SELECT * FROM `" + key.getTableName() + "` LIMIT 0");
ResultSetMetaData rsmd = rs.getMetaData();
int numCols = rsmd.getColumnCount();
List<ColumnDefinition> columnDefinitions = new ArrayList<>();