Bug #82599 | slave_type_conversions messing with data which still fits within allowed range | ||
---|---|---|---|
Submitted: | 16 Aug 2016 14:14 | Modified: | 17 Aug 2016 7:14 |
Reporter: | Przemyslaw Malkowski | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: Replication | Severity: | S2 (Serious) |
Version: | 5.7.14,5.6, 5.6.32 | OS: | Any |
Assigned to: | CPU Architecture: | Any | |
Tags: | replication slave_type_conversions |
[16 Aug 2016 14:14]
Przemyslaw Malkowski
[17 Aug 2016 7:14]
MySQL Verification Team
Hello Przemyslaw, Thank you for the report. Verified as described with 5.7.14 build. Thanks, Umesh
[2 Jun 2022 20:27]
Fernando Camargos
This bug continues to be observed on MySQL 5.7.38 using the test case previously provided by Przemyslaw Malkowski. Here's a slightly different one, but fundalmentally showcasing the same issue, which renders it impossible to upgrade the schema in a replica first to later promote it as the primary: primary> select @@version,@@version_comment; +------------+------------------------------+ | @@version | @@version_comment | +------------+------------------------------+ | 5.7.38-log | MySQL Community Server (GPL) | +------------+------------------------------+ 1 row in set (0.00 sec) primary > CREATE TABLE test_lossy (id smallint(5) unsigned NOT NULL, PRIMARY KEY (id)) ENGINE=InnoDB DEFAULT CHARSET=utf8; Query OK, 0 rows affected (0.08 sec) replica > alter table test_lossy modify id int(10) unsigned not null; Query OK, 0 rows affected (0.11 sec) Records: 0 Duplicates: 0 Warnings: 0 replica > select @@slave_type_conversions; +--------------------------+ | @@slave_type_conversions | +--------------------------+ | ALL_NON_LOSSY | +--------------------------+ 1 row in set (0.00 sec) primary > insert into test_lossy values (36087); Query OK, 1 row affected (0.03 sec) primary > select * from test_lossy; +-------+ | id | +-------+ | 36087 | +-------+ 1 row in set (0.00 sec) replica > select * from test_lossy; +----+ | id | +----+ | 0 | +----+ 1 row in set (0.00 sec)
[11 Feb 18:04]
Leonardo Fernandes
This is still reproducible on 8.0.41: Source is using unsigned int for the column: source > select * from test ; +------------+ | id | +------------+ | 2395315603 | +------------+ 1 row in set (0.00 sec) Replica is using bigint and replica_type_conversions=ALL_NON_LOSSY: replica > select * from test ; +-------------+ | id | +-------------+ | -1899651693 | +-------------+ 1 row in set (0.00 sec)