mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Merge pull request #10627 from ClickHouse/more-check-server-version
Check if client is newer than server
This commit is contained in:
commit
8c45fd6a06
@ -620,13 +620,21 @@ private:
|
||||
<< " revision " << server_revision
|
||||
<< "." << std::endl << std::endl;
|
||||
|
||||
if (std::make_tuple(VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH)
|
||||
< std::make_tuple(server_version_major, server_version_minor, server_version_patch))
|
||||
auto client_version_tuple = std::make_tuple(VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH);
|
||||
auto server_version_tuple = std::make_tuple(server_version_major, server_version_minor, server_version_patch);
|
||||
|
||||
if (client_version_tuple < server_version_tuple)
|
||||
{
|
||||
std::cout << "ClickHouse client version is older than ClickHouse server. "
|
||||
<< "It may lack support for new features."
|
||||
<< std::endl << std::endl;
|
||||
}
|
||||
else if (client_version_tuple > server_version_tuple)
|
||||
{
|
||||
std::cout << "ClickHouse server version is older than ClickHouse client. "
|
||||
<< "It may indicate that the server is out of date and can be upgraded."
|
||||
<< std::endl << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user