瀏覽代碼

fix bug BASE TABLE as table name (#4217)

gongchangyou 2 年之前
父節點
當前提交
3dc86330a8

+ 1 - 0
parse/src/main/java/com/alibaba/otter/canal/parse/inbound/mysql/tsdb/DatabaseTableMeta.java

@@ -209,6 +209,7 @@ public class DatabaseTableMeta implements TableMetaTSDB {
             for (String schema : schemas) {
                 // filter views
                 packet = connection.query("show full tables from `" + schema + "` where Table_type = 'BASE TABLE'");
+                columnSize = packet.getFieldDescriptors().size();
                 int tableNameColumnIndex = 0; // default index is 0
                 List<String> tables = new ArrayList<>();
                 for (int line = 0; line < packet.getFieldValues().size() / columnSize; line++) {