Skip to content

Commit

Permalink
Update client revision to 54462
Browse files Browse the repository at this point in the history
  • Loading branch information
xzkostyan committed Dec 13, 2023
1 parent b98fa93 commit 25b112b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion clickhouse_driver/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from .progress import Progress
from .protocol import Compression, ClientPacketTypes, ServerPacketTypes
from .queryprocessingstage import QueryProcessingStage
from .reader import read_binary_str
from .reader import read_binary_str, read_binary_uint64
from .readhelpers import read_exception
from .settings.writer import write_settings, SettingsFlags
from .streams.native import BlockInputStream, BlockOutputStream
Expand Down Expand Up @@ -504,6 +504,10 @@ def receive_hello(self):
read_binary_str(self.fin) # original_pattern
read_binary_str(self.fin) # exception_message

if used_revision >= defines. \
DBMS_MIN_REVISION_WITH_INTERSERVER_SECRET_V2:
read_binary_uint64(self.fin) # read_nonce

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 @@ -32,6 +32,7 @@
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
DBMS_MIN_REVISION_WITH_INTERSERVER_SECRET_V2 = 54462

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

BUFFER_SIZE = 1048576

Expand Down

0 comments on commit 25b112b

Please sign in to comment.