Bug #119593 Generated Column Calculation on the replica ERROR
Submitted: 24 Dec 2025 8:36
Reporter: nanzhou lin Email Updates:
Status: Open Impact on me:
None 
Category:MySQL Server: Row Based Replication ( RBR ) Severity:S3 (Non-critical)
Version:8.0.* OS:Any
Assigned to: CPU Architecture:Any

[24 Dec 2025 8:36] nanzhou lin
Description:
The UPDATE statement executed successfully on the primary but failed on the replica. The modified data on the primary did not involve invalid values.

How to repeat:
create table t1(
id int,
ib int,
`year_col` year DEFAULT NULL,
`tinyint_col` tinyint DEFAULT NULL,
UNIQUE KEY `year_col` (`year_col` DESC),
KEY `ib_id` (`ib` DESC)
);
insert into t1(id,ib,tinyint_col) values(1,1,0);
insert into t1(id,ib,tinyint_col) values(2,0,1);
insert into t1(id,ib,tinyint_col) values(3,0,-128);
insert into t1(id,ib,tinyint_col) values(3,0,1);
insert into t1(id,ib,tinyint_col) values(3,1,0);
alter table t1 add column c_generate_power mediumint generated always as (power(tinyint_col,-2)) virtual;
update t1 set tinyint_col=1 where id =3 and ib=0;

mysql> show slave status\G
*************************** 1. row ***************************
               Slave_IO_State: Waiting for source to send event
                  Master_Host: 127.0.0.1
                  Master_User: root
                  Master_Port: 13000
                Connect_Retry: 1
              Master_Log_File: master-bin.000001
          Read_Master_Log_Pos: 2483
               Relay_Log_File: slave-relay-bin.000002
                Relay_Log_Pos: 2393
        Relay_Master_Log_File: master-bin.000001
             Slave_IO_Running: Yes
            Slave_SQL_Running: No
              Replicate_Do_DB: 
          Replicate_Ignore_DB: 
           Replicate_Do_Table: 
       Replicate_Ignore_Table: 
      Replicate_Wild_Do_Table: 
  Replicate_Wild_Ignore_Table: 
                   Last_Errno: 1690
                   Last_Error: Coordinator stopped because there were error(s) in the worker(s). The most recent failure being: Worker 1 failed executing transaction '2c09b5cf-e0a0-11f0-96fb-0242ac11000f:8' at source log master-bin.000001, end_log_pos 2452. See error log and/or performance_schema.replication_applier_status_by_worker table for more details about this failure or others, if any.
                 Skip_Counter: 0
          Exec_Master_Log_Pos: 2175
              Relay_Log_Space: 2911
              Until_Condition: None
               Until_Log_File: 
                Until_Log_Pos: 0
           Master_SSL_Allowed: No
           Master_SSL_CA_File: 
           Master_SSL_CA_Path: 
              Master_SSL_Cert: 
            Master_SSL_Cipher: 
               Master_SSL_Key: 
        Seconds_Behind_Master: NULL
Master_SSL_Verify_Server_Cert: No
                Last_IO_Errno: 0
                Last_IO_Error: 
               Last_SQL_Errno: 1690
               Last_SQL_Error: Coordinator stopped because there were error(s) in the worker(s). The most recent failure being: Worker 1 failed executing transaction '2c09b5cf-e0a0-11f0-96fb-0242ac11000f:8' at source log master-bin.000001, end_log_pos 2452. See error log and/or performance_schema.replication_applier_status_by_worker table for more details about this failure or others, if any.
  Replicate_Ignore_Server_Ids: 
             Master_Server_Id: 1
                  Master_UUID: 2c09b5cf-e0a0-11f0-96fb-0242ac11000f
             Master_Info_File: mysql.slave_master_info
                    SQL_Delay: 0
          SQL_Remaining_Delay: NULL
      Slave_SQL_Running_State: 
           Master_Retry_Count: 10
                  Master_Bind: 
      Last_IO_Error_Timestamp: 
     Last_SQL_Error_Timestamp: 251224 11:12:32
               Master_SSL_Crl: 
           Master_SSL_Crlpath: 
           Retrieved_Gtid_Set: 2c09b5cf-e0a0-11f0-96fb-0242ac11000f:1-8
            Executed_Gtid_Set: 2c09b5cf-e0a0-11f0-96fb-0242ac11000f:1-7
                Auto_Position: 1
         Replicate_Rewrite_DB: 
                 Channel_Name: 
           Master_TLS_Version: 
       Master_public_key_path: 
        Get_master_public_key: 0
            Network_Namespace: 
1 row in set, 1 warning (0.00 sec)