Uploaded image for project: 'Percona Toolkit'
  1. Percona Toolkit
  2. PT-2016

pt-table-checksum fails to build replace query when table lack a primary key (uq is present) and text fields are involved

Details

    • Bug
    • Status: Done
    • Critical
    • Resolution: Fixed
    • 3.3.1
    • 3.4.0
    • None
    • None
    • Yes
    • Yes
    • 5

    Description

       

       

      Steps to reproduce:

      primary node
      CREATE TABLE test2 (
        col1 int NOT NULL,
        col2 text NOT NULL,
        col3 varchar(5) NOT NULL,
        UNIQUE KEY (col1, col2(3))
      );
      insert into test2 values(1,'aaa','aaa'); 
      replica
      update test2 set col3="bbb";
      
      pt-table-sync run
      $ pt-table-sync --host=127.0.0.1 --port=21325 h=127.0.0.1,D=test,t=test2 --sync-to-master --print --user=a -pa --chunk-size=1 --hex-blob 
      ...
      REPLACE INTO `test`.`test2`() VALUES () /*percona-toolkit src_db:test src_tbl:test2 src_dsn:D=test,P=21324,h=127.0.0.1,p=...,t=test2,u=a dst_db:test dst_tbl:test2 dst_dsn:D=test,P=21325,h=127.0.0.1,p=...,t=test2,u=a lock:1 transaction:1 changing_src:1 replicate:0 bidirectional:0 pid:26264 user:X host:Y.percona.com*/;
      

      Attachments

        Issue Links

          Activity

            People

              carlos.salguero Carlos Salguero (Inactive)
              iwo.panowicz Iwo Panowicz
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Smart Checklist