File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
flink-connector-mysql-cdc/src/main/java/com/ververica/cdc/connectors/mysql/source/utils Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -244,7 +244,7 @@ private static void addPrimaryKeyColumnsToCondition(
244
244
RowType pkRowType , StringBuilder sql , String predicate ) {
245
245
for (Iterator <String > fieldNamesIt = pkRowType .getFieldNames ().iterator ();
246
246
fieldNamesIt .hasNext (); ) {
247
- sql .append (fieldNamesIt .next ()).append (predicate );
247
+ sql .append (quote ( fieldNamesIt .next () )).append (predicate );
248
248
if (fieldNamesIt .hasNext ()) {
249
249
sql .append (" AND " );
250
250
}
@@ -255,7 +255,7 @@ private static String getPrimaryKeyColumnsProjection(RowType pkRowType) {
255
255
StringBuilder sql = new StringBuilder ();
256
256
for (Iterator <String > fieldNamesIt = pkRowType .getFieldNames ().iterator ();
257
257
fieldNamesIt .hasNext (); ) {
258
- sql .append (fieldNamesIt .next ());
258
+ sql .append (quote ( fieldNamesIt .next () ));
259
259
if (fieldNamesIt .hasNext ()) {
260
260
sql .append (" , " );
261
261
}
@@ -267,7 +267,7 @@ private static String getMaxPrimaryKeyColumnsProjection(RowType pkRowType) {
267
267
StringBuilder sql = new StringBuilder ();
268
268
for (Iterator <String > fieldNamesIt = pkRowType .getFieldNames ().iterator ();
269
269
fieldNamesIt .hasNext (); ) {
270
- sql .append ("MAX(" + fieldNamesIt .next () + ")" );
270
+ sql .append ("MAX(" + quote ( fieldNamesIt .next () ) + ")" );
271
271
if (fieldNamesIt .hasNext ()) {
272
272
sql .append (" , " );
273
273
}
You can’t perform that action at this time.
0 commit comments