mirror of https://github.com/apache/nifi.git
NIFI-5342 CaptureChangeMySQL didn't escape database name
Signed-off-by: Matthew Burgess <mattyb149@apache.org> This closes #2923
This commit is contained in:
parent
44face10bf
commit
e97ae921f7
|
@ -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<>();
|
||||
|
|
Loading…
Reference in New Issue