diff --git a/CHANGES.txt b/CHANGES.txt index d1f2677de5..ef728c768d 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 3.10 + * Avoid potential AttributeError in cqlsh due to no table metadata (CASSANDRA-12815) * Fix RandomReplicationAwareTokenAllocatorTest.testExistingCluster (CASSANDRA-12812) * Upgrade commons-codec to 1.9 (CASSANDRA-12790) * Make the fanout size for LeveledCompactionStrategy to be configurable (CASSANDRA-11550) diff --git a/bin/cqlsh.py b/bin/cqlsh.py index e741752571..072ef0844a 100644 --- a/bin/cqlsh.py +++ b/bin/cqlsh.py @@ -1334,7 +1334,8 @@ class Shell(cmd.Cmd): cql_types = [] if result.column_types: - ks_meta = self.conn.metadata.keyspaces[table_meta.keyspace_name] + ks_name = table_meta.keyspace_name if table_meta else self.current_keyspace + ks_meta = self.conn.metadata.keyspaces.get(ks_name, None) cql_types = [CqlType(cql_typename(t), ks_meta) for t in result.column_types] formatted_values = [map(self.myformat_value, row.values(), cql_types) for row in result.current_rows]