mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
fixed issue #4216 , support polardb-x show tables
This commit is contained in:
@@ -209,11 +209,10 @@ public class DatabaseTableMeta implements TableMetaTSDB {
|
|||||||
for (String schema : schemas) {
|
for (String schema : schemas) {
|
||||||
// filter views
|
// filter views
|
||||||
packet = connection.query("show full tables from `" + schema + "` where Table_type = 'BASE TABLE'");
|
packet = connection.query("show full tables from `" + schema + "` where Table_type = 'BASE TABLE'");
|
||||||
|
int tableNameColumnIndex = 0; // default index is 0
|
||||||
List<String> tables = new ArrayList<>();
|
List<String> tables = new ArrayList<>();
|
||||||
for (String table : packet.getFieldValues()) {
|
for (int line = 0; line < packet.getFieldValues().size() / columnSize; line++) {
|
||||||
if ("BASE TABLE".equalsIgnoreCase(table)) {
|
String table = packet.getFieldValues().get(line * columnSize + tableNameColumnIndex);
|
||||||
continue;
|
|
||||||
}
|
|
||||||
String fullName = schema + "." + table;
|
String fullName = schema + "." + table;
|
||||||
if (blackFilter == null || !blackFilter.filter(fullName)) {
|
if (blackFilter == null || !blackFilter.filter(fullName)) {
|
||||||
if (filter == null || filter.filter(fullName)) {
|
if (filter == null || filter.filter(fullName)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user