Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
nharkins committed Dec 11, 2024
1 parent 4b77930 commit 1f05949
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mycli/sqlcompleter.py
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,10 @@ def extend_columns(self, column_data, kind):
for relname, column in column_data:
if relname not in metadata[self.dbname]:
_logger.error("relname '%s' was not found in db '%s'", relname, self.dbname)
# this could happen back when the completer populated via two calls:
# SHOW TABLES then SELECT table_name, column_name from information_schema.columns
# it's a slight race, but much more likely on Vitess picking random shards for each.
# see discussion in https://github.com/dbcli/mycli/pull/1182 (tl;dr - let's keep it)
continue
metadata[self.dbname][relname].append(column)
self.all_completions.add(column)
Expand Down

0 comments on commit 1f05949

Please sign in to comment.