Merge pull request #6893 from malkfilipp/client_older_than_server

Display warning if clickhouse-client version is older than clickhouse-server.
This commit is contained in:
alexey-milovidov 2019-09-11 16:02:35 +03:00 committed by GitHub
commit 6b1352f65c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -563,9 +563,17 @@ private:
if (is_interactive)
{
std::cout << "Connected to " << server_name
<< " server version " << server_version
<< " revision " << server_revision
<< "." << std::endl << std::endl;
<< " server version " << server_version
<< " 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))
{
std::cout << "ClickHouse client version is older than ClickHouse server. "
<< "It may lack support for new features."
<< std::endl << std::endl;
}
}
}