Skip to content

Commit

Permalink
Merge pull request #102 from Cycloctane/dev
Browse files Browse the repository at this point in the history
  • Loading branch information
long2ice authored Nov 21, 2024
2 parents 7c66b1b + 3b863dc commit 09bea07
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

- Fix ssl context pass bool.
- Fix missing `*.whl` for Python 3.12 (#94)
- Fix SSL handshake error with MySQL server v8.0.34+. (#80)

### 0.2.9

Expand Down
4 changes: 2 additions & 2 deletions asyncmy/connection.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -750,9 +750,10 @@ class Connection:
if self._user is None:
raise ValueError("Did not specify a username")

charset_id = charset_by_name(self._charset).id
if self._ssl_context:
# capablities, max packet, charset
data = IIB.pack(self._client_flag, 16777216, 33)
data = IIB.pack(self._client_flag, MAX_PACKET_LEN, charset_id)
data += b'\x00' * (32 - len(data))

self.write_packet(data)
Expand All @@ -776,7 +777,6 @@ class Connection:
sock=raw_sock, ssl=self._ssl_context,
server_hostname=self._host,
)
charset_id = charset_by_name(self._charset).id
if isinstance(self._user, str):
self._user = self._user.encode(self._encoding)

Expand Down

0 comments on commit 09bea07

Please sign in to comment.