backward compatible

This commit is contained in:
Amos Bird 2021-08-01 09:06:16 +08:00
parent c38403998e
commit b76a854f5a
No known key found for this signature in database
GPG Key ID: 80D430DCBECFEDB4
2 changed files with 7 additions and 0 deletions

View File

@ -580,6 +580,12 @@ void Connection::sendPreparedData(ReadBuffer & input, size_t size, const String
void Connection::sendScalarsData(Scalars & data)
{
/// Avoid sending scalars to old servers. Note that this isn't a full fix. We didn't introduce a
/// dedicated revision after introducing scalars, so this will still break some versions with
/// revision 54428.
if (server_revision < DBMS_MIN_REVISION_WITH_SCALARS)
return;
if (data.empty())
return;

View File

@ -71,6 +71,7 @@
/// Minimum revision supporting SettingsBinaryFormat::STRINGS.
#define DBMS_MIN_REVISION_WITH_SETTINGS_SERIALIZED_AS_STRINGS 54429
#define DBMS_MIN_REVISION_WITH_SCALARS 54429
/// Minimum revision supporting OpenTelemetry
#define DBMS_MIN_REVISION_WITH_OPENTELEMETRY 54442