• unknown's avatar
    Bug #28430 Failure in replication of innodb partitioned tables on row/mixed format. · f0d1ac25
    unknown authored
    In the ha_partition::position() we didn't calculate the number
    of the partition of the record. We used m_last_part value instead,
    relying on that it is set in other place like previous call of a method
    like ::write_row(). In replication we don't call any of these befor
    position(). Delete_rows_log_event::do_exec_row calls find_and_fetch_row.
    In case of InnoDB-based PARTITION table, we have HA_PRIMARY_KEY_REQUIRED_FOR_POSITION
    enabled, so use position() / rnd_pos() calls to fetch the record.
    
    Fixed by adding partition_id calculation to the ha_partition::position()
    
    
    sql/ha_partition.h:
       Bug #28430 Failure in replication of innodb partitioned tables on row/mixed format.
      column_bitmaps_signal interface added
    sql/ha_partition.cc:
      Bug #28430 Failure in replication of innodb partitioned tables on row/mixed format.
      Calculate the number of the partition in ha_partition::position().
      ha_partition::column_bitmaps_signal() implemented
    mysql-test/r/partition_pruning.result:
      Bug #28430 Failure in replication of innodb partitioned tables on row/mixed format.
      test result fixed
    f0d1ac25
ha_partition.h 40.3 KB