Skip to content

Commit 0513ee9

Browse files
Remove SET NAMES usage which is no-op in SingleStore
1 parent 4fa6cad commit 0513ee9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

singlestoredb/mysql/connection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -997,9 +997,9 @@ def set_character_set(self, charset, collation=None):
997997
encoding = charset_by_name(charset).encoding
998998

999999
if collation:
1000-
query = f'SET NAMES {charset} COLLATE {collation}'
1000+
query = f'SET COLLATION_CONNECTION {collation}'
10011001
else:
1002-
query = f'SET NAMES {charset}'
1002+
query = f'SET CHARACTER_SET_SERVER {charset}'
10031003
self._execute_command(COMMAND.COM_QUERY, query)
10041004
self._read_packet()
10051005
self.charset = charset

0 commit comments

Comments
 (0)