2222#define DBMS_NAME " ClickHouse"
2323#define DBMS_VERSION_MAJOR 1
2424#define DBMS_VERSION_MINOR 1
25- #define REVISION 54126
25+ #define REVISION 54405
2626
2727#define DBMS_MIN_REVISION_WITH_TEMPORARY_TABLES 50264
2828#define DBMS_MIN_REVISION_WITH_TOTAL_ROWS_IN_PROGRESS 51554
2929#define DBMS_MIN_REVISION_WITH_BLOCK_INFO 51903
3030#define DBMS_MIN_REVISION_WITH_CLIENT_INFO 54032
3131#define DBMS_MIN_REVISION_WITH_SERVER_TIMEZONE 54058
3232#define DBMS_MIN_REVISION_WITH_QUOTA_KEY_IN_CLIENT_INFO 54060
33+ // #define DBMS_MIN_REVISION_WITH_TABLES_STATUS 54226
34+ // #define DBMS_MIN_REVISION_WITH_TIME_ZONE_PARAMETER_IN_DATETIME_DATA_TYPE 54337
35+ #define DBMS_MIN_REVISION_WITH_SERVER_DISPLAY_NAME 54372
36+ #define DBMS_MIN_REVISION_WITH_VERSION_PATCH 54401
37+ #define DBMS_MIN_REVISION_WITH_LOW_CARDINALITY_TYPE 54405
3338
3439namespace clickhouse {
3540
@@ -45,14 +50,17 @@ struct ClientInfo {
4550 std::string initial_address = " [::ffff:127.0.0.1]:0" ;
4651 uint64_t client_version_major = 0 ;
4752 uint64_t client_version_minor = 0 ;
53+ uint64_t client_version_patch = 0 ;
4854 uint32_t client_revision = 0 ;
4955};
5056
5157struct ServerInfo {
5258 std::string name;
5359 std::string timezone;
60+ std::string display_name;
5461 uint64_t version_major;
5562 uint64_t version_minor;
63+ uint64_t version_patch;
5664 uint64_t revision;
5765};
5866
@@ -563,6 +571,9 @@ void Client::Impl::SendQuery(const std::string& query) {
563571
564572 if (server_info_.revision >= DBMS_MIN_REVISION_WITH_QUOTA_KEY_IN_CLIENT_INFO)
565573 WireFormat::WriteString (&output_, info.quota_key );
574+ if (server_info_.revision >= DBMS_MIN_REVISION_WITH_VERSION_PATCH) {
575+ WireFormat::WriteUInt64 (&output_, info.client_version_patch );
576+ }
566577 }
567578
568579 // / Per query settings.
@@ -697,6 +708,18 @@ bool Client::Impl::ReceiveHello() {
697708 }
698709 }
699710
711+ if (server_info_.revision >= DBMS_MIN_REVISION_WITH_SERVER_DISPLAY_NAME) {
712+ if (!WireFormat::ReadString (&input_, &server_info_.display_name )) {
713+ return false ;
714+ }
715+ }
716+
717+ if (server_info_.revision >= DBMS_MIN_REVISION_WITH_VERSION_PATCH) {
718+ if (!WireFormat::ReadUInt64 (&input_, &server_info_.version_patch )) {
719+ return false ;
720+ }
721+ }
722+
700723 return true ;
701724 } else if (packet_type == ServerCodes::Exception) {
702725 ReceiveException (true );
0 commit comments