Skip to content

Commit

Permalink
Remove SET NAMES usage which is no-op in SingleStore
Browse files Browse the repository at this point in the history
  • Loading branch information
pmishchenko-ua committed Aug 30, 2024
1 parent 4fa6cad commit 0513ee9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions singlestoredb/mysql/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -997,9 +997,9 @@ def set_character_set(self, charset, collation=None):
encoding = charset_by_name(charset).encoding

if collation:
query = f'SET NAMES {charset} COLLATE {collation}'
query = f'SET COLLATION_CONNECTION {collation}'
else:
query = f'SET NAMES {charset}'
query = f'SET CHARACTER_SET_SERVER {charset}'
self._execute_command(COMMAND.COM_QUERY, query)
self._read_packet()
self.charset = charset
Expand Down

0 comments on commit 0513ee9

Please sign in to comment.