Merge pull request #31990 from havardk/mysqldecimal

MaterializedMySQL: Fix corruption of DECIMAL data
This commit is contained in:
tavplubix 2021-12-01 19:18:48 +03:00 committed by GitHub
commit 9e034ee3a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -501,6 +501,9 @@ namespace MySQLReplication
UInt32 mask = 0;
DecimalType res(0);
if (payload.eof())
throw Exception("Attempt to read after EOF.", ErrorCodes::ATTEMPT_TO_READ_AFTER_EOF);
if ((*payload.position() & 0x80) == 0)
mask = UInt32(-1);