Browse Source

fix(project): no need to process tinyint(1) specially #631

wanshao 5 years ago
parent
commit
30a1b067a8

+ 0 - 6
parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/dbsync/LogEventConvert.java

@@ -718,8 +718,6 @@ public class LogEventConvert extends AbstractCanalLifeCycle implements BinlogPar
                     isBinary = true;
                 } else if (StringUtils.containsIgnoreCase(fieldMeta.getColumnType(), "BINARY")) {
                     isBinary = true;
-                } else if (StringUtils.containsIgnoreCase(fieldMeta.getColumnType(), "TINYINT(1)")) {
-                    isSingleBit = true;
                 }
             }
 
@@ -774,10 +772,6 @@ public class LogEventConvert extends AbstractCanalLifeCycle implements BinlogPar
                             // 对象为number类型,直接valueof即可
                             columnBuilder.setValue(String.valueOf(value));
                         }
-
-                        if (isSingleBit && javaType == Types.TINYINT) {
-                            javaType = Types.BIT;
-                        }
                         break;
                     case Types.REAL: // float
                     case Types.DOUBLE: // double