Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion metadata_scylla.go
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,8 @@ func getKeyspaceMetadata(session *Session, keyspaceName string) (*KeyspaceMetada
return keyspace, nil
}

// query for table metadata in the system_schema.tables and system_schema.scylla_tables
// query for table metadata in the system_schema.tables, and system_schema.scylla_tables
// if connected to ScyllaDB
func getTableMetadata(session *Session, keyspaceName string) ([]TableMetadata, error) {
if !session.useSystemSchema {
return nil, nil
Expand Down Expand Up @@ -845,6 +846,10 @@ func getTableMetadata(session *Session, keyspaceName string) ([]TableMetadata, e
return nil, fmt.Errorf("error querying table schema: %v", err)
}

if session.getConn() == nil || !session.getConn().isScyllaConn() {
return tables, nil
}

stmt = `SELECT * FROM system_schema.scylla_tables WHERE keyspace_name = ? AND table_name = ?`
for i, t := range tables {
iter := session.control.querySystem(stmt, keyspaceName, t.Name)
Expand Down