File tree 2 files changed +3
-2
lines changed
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change 6
6
7
7
- Fix ssl context pass bool.
8
8
- Fix missing ` *.whl ` for Python 3.12 (#94 )
9
+ - Fix SSL handshake error with MySQL server v8.0.34+. (#80 )
9
10
10
11
### 0.2.9
11
12
Original file line number Diff line number Diff line change @@ -750,9 +750,10 @@ class Connection:
750
750
if self ._user is None :
751
751
raise ValueError (" Did not specify a username" )
752
752
753
+ charset_id = charset_by_name(self ._charset).id
753
754
if self ._ssl_context:
754
755
# capablities, max packet, charset
755
- data = IIB.pack(self ._client_flag, 16777216 , 33 )
756
+ data = IIB.pack(self ._client_flag, MAX_PACKET_LEN, charset_id )
756
757
data += b' \x00 ' * (32 - len (data))
757
758
758
759
self .write_packet(data)
@@ -776,7 +777,6 @@ class Connection:
776
777
sock = raw_sock, ssl = self ._ssl_context,
777
778
server_hostname = self ._host,
778
779
)
779
- charset_id = charset_by_name(self ._charset).id
780
780
if isinstance (self ._user, str ):
781
781
self ._user = self ._user.encode(self ._encoding)
782
782
You can’t perform that action at this time.
0 commit comments