Skip to content

Commit

Permalink
Update client revision to 54461
Browse files Browse the repository at this point in the history
  • Loading branch information
xzkostyan committed Dec 13, 2023
1 parent 18cdf29 commit b98fa93
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
7 changes: 7 additions & 0 deletions clickhouse_driver/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,13 @@ def receive_hello(self):
defines.DBMS_MIN_REVISION_WITH_VERSION_PATCH:
server_version_patch = read_varint(self.fin)

if used_revision >= defines. \
DBMS_MIN_PROTOCOL_VERSION_WITH_PASSWORD_COMPLEXITY_RULES:
rules_size = read_varint(self.fin)
for _i in range(rules_size):
read_binary_str(self.fin) # original_pattern
read_binary_str(self.fin) # exception_message

self.server_info = ServerInfo(
server_name, server_version_major, server_version_minor,
server_version_patch, server_revision,
Expand Down
3 changes: 2 additions & 1 deletion clickhouse_driver/defines.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
DBMS_MIN_PROTOCOL_VERSION_WITH_QUOTA_KEY = 54458
DBMS_MIN_PROTOCOL_VERSION_WITH_PARAMETERS = 54459
DBMS_MIN_PROTOCOL_VERSION_WITH_SERVER_QUERY_TIME_IN_PROGRESS = 54460
DBMS_MIN_PROTOCOL_VERSION_WITH_PASSWORD_COMPLEXITY_RULES = 54461

# Timeouts
DBMS_DEFAULT_CONNECT_TIMEOUT_SEC = 10
Expand All @@ -46,7 +47,7 @@
CLIENT_VERSION_MAJOR = 20
CLIENT_VERSION_MINOR = 10
CLIENT_VERSION_PATCH = 2
CLIENT_REVISION = DBMS_MIN_PROTOCOL_VERSION_WITH_SERVER_QUERY_TIME_IN_PROGRESS
CLIENT_REVISION = DBMS_MIN_PROTOCOL_VERSION_WITH_PASSWORD_COMPLEXITY_RULES

BUFFER_SIZE = 1048576

Expand Down

0 comments on commit b98fa93

Please sign in to comment.