# /usr/bin/perl 5.016003 # Linux master 3.10.0-693.2.2.el7.x86_64 #1 SMP Tue Sep 12 22:26:13 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux # Arguments: _[h=localhost,u=pttc,p=password]_ _[--no-check-binlog-format]_ # OptionParser:1952 12902 Option rule: This tool accepts additional command-line arguments. Refer to the SYNOPSIS and usage information for details. # OptionParser:1961 12902 =item --ask-pass # OptionParser:1988 12902 Short help: Prompt for a password when connecting to MySQL # OptionParser:1961 12902 =item --[no]check-binlog-format # OptionParser:1988 12902 Short help: Check that the binlog_format is the same on all servers # OptionParser:1961 12902 =item --binary-index # OptionParser:1980 12902 Option has no attributes # OptionParser:1988 12902 Short help: This option modifies the behavior of --create-replicate-table such that the replicate table's upper and lower boundary columns are created with the BLOB data type # OptionParser:1961 12902 =item --check-interval # OptionParser:1988 12902 Short help: Sleep time between checks for --max-lag # OptionParser:1961 12902 =item --[no]check-plan # OptionParser:1988 12902 Short help: Check query execution plans for safety # OptionParser:1961 12902 =item --[no]check-replication-filters # OptionParser:1988 12902 Short help: Do not checksum if any replication filters are set on any replicas # OptionParser:1961 12902 =item --check-slave-lag # OptionParser:1988 12902 Short help: Pause checksumming until this replica's lag is less than --max-lag # OptionParser:1961 12902 =item --[no]check-slave-tables # OptionParser:1988 12902 Short help: Checks that tables on slaves exist and have all the checksum --columns # OptionParser:1961 12902 =item --chunk-index # OptionParser:1988 12902 Short help: Prefer this index for chunking tables # OptionParser:1961 12902 =item --chunk-index-columns # OptionParser:1988 12902 Short help: Use only this many left-most columns of a --chunk-index # OptionParser:1961 12902 =item --chunk-size # OptionParser:1988 12902 Short help: Number of rows to select for each checksum query # OptionParser:1961 12902 =item --chunk-size-limit # OptionParser:1988 12902 Short help: Do not checksum chunks this much larger than the desired chunk size # OptionParser:1961 12902 =item --chunk-time # OptionParser:1988 12902 Short help: Adjust the chunk size dynamically so each checksum query takes this long to execute # OptionParser:1961 12902 =item --columns # OptionParser:1988 12902 Short help: Checksum only this comma-separated list of columns # OptionParser:1961 12902 =item --config # OptionParser:1988 12902 Short help: Read this comma-separated list of config files; if specified, this must be the first option on the command line # OptionParser:1961 12902 =item --[no]create-replicate-table # OptionParser:1988 12902 Short help: Create the --replicate database and table if they do not exist # OptionParser:1961 12902 =item --databases # OptionParser:1988 12902 Short help: Only checksum this comma-separated list of databases # OptionParser:1961 12902 =item --databases-regex # OptionParser:1988 12902 Short help: Only checksum databases whose names match this Perl regex # OptionParser:1961 12902 =item --defaults-file # OptionParser:1988 12902 Short help: Only read mysql options from the given file # OptionParser:1961 12902 =item --[no]empty-replicate-table # OptionParser:1988 12902 Short help: Delete previous checksums for each table before checksumming the table # OptionParser:1961 12902 =item --engines # OptionParser:1988 12902 Short help: Only checksum tables which use these storage engines # OptionParser:1961 12902 =item --explain # OptionParser:1988 12902 Short help: Show, but do not execute, checksum queries (disables --[no]empty-replicate-table) # OptionParser:1961 12902 =item --float-precision # OptionParser:1988 12902 Short help: Precision for FLOAT and DOUBLE number-to-string conversion # OptionParser:1961 12902 =item --function # OptionParser:1988 12902 Short help: Hash function for checksums (FNV1A_64, MURMUR_HASH, SHA1, MD5, CRC32, etc) # OptionParser:1961 12902 =item --help # OptionParser:1988 12902 Short help: Show help and exit # OptionParser:1961 12902 =item --host # OptionParser:1988 12902 Short help: Host to connect to # OptionParser:1961 12902 =item --ignore-columns # OptionParser:1988 12902 Short help: Ignore this comma-separated list of columns when calculating the checksum # OptionParser:1961 12902 =item --ignore-databases # OptionParser:1988 12902 Short help: Ignore this comma-separated list of databases # OptionParser:1961 12902 =item --ignore-databases-regex # OptionParser:1988 12902 Short help: Ignore databases whose names match this Perl regex # OptionParser:1961 12902 =item --ignore-engines # OptionParser:1988 12902 Short help: Ignore this comma-separated list of storage engines # OptionParser:1961 12902 =item --ignore-tables # OptionParser:1988 12902 Short help: Ignore this comma-separated list of tables # OptionParser:1961 12902 =item --ignore-tables-regex # OptionParser:1988 12902 Short help: Ignore tables whose names match the Perl regex # OptionParser:1961 12902 =item --max-lag # OptionParser:1988 12902 Short help: Pause checksumming until all replicas' lag is less than this value # OptionParser:1961 12902 =item --max-load # OptionParser:1988 12902 Short help: Examine SHOW GLOBAL STATUS after every chunk, and pause if any status variables are higher than the threshold # OptionParser:1961 12902 =item --password # OptionParser:1988 12902 Short help: Password to use when connecting # OptionParser:1961 12902 =item --pause-file # OptionParser:1988 12902 Short help: Execution will be paused while the file specified by this param exists # OptionParser:1961 12902 =item --pid # OptionParser:1988 12902 Short help: Create the given PID file # OptionParser:1961 12902 =item --plugin # OptionParser:1988 12902 Short help: Perl module file that defines a pt_table_checksum_plugin class # OptionParser:1961 12902 =item --port # OptionParser:1988 12902 Short help: Port number to use for connection # OptionParser:1961 12902 =item --progress # OptionParser:1988 12902 Short help: Print progress reports to STDERR # OptionParser:1961 12902 =item --quiet # OptionParser:1988 12902 Short help: Print only the most important information (disables --progress) # OptionParser:1961 12902 =item --recurse # OptionParser:1988 12902 Short help: Number of levels to recurse in the hierarchy when discovering replicas # OptionParser:1961 12902 =item --recursion-method # OptionParser:1988 12902 Short help: Preferred recursion method for discovering replicas. pt-table-checksum performs several REPLICA CHECKS before and while running # OptionParser:1961 12902 =item --replicate # OptionParser:1988 12902 Short help: Write checksum results to this table # OptionParser:1961 12902 =item --[no]replicate-check # OptionParser:1988 12902 Short help: Check replicas for data differences after finishing each table # OptionParser:1961 12902 =item --replicate-check-only # OptionParser:1980 12902 Option has no attributes # OptionParser:1988 12902 Short help: Check replicas for consistency without executing checksum queries # OptionParser:1961 12902 =item --replicate-check-retries # OptionParser:1988 12902 Short help: Retry checksum comparison this many times when a difference is encountered # OptionParser:1961 12902 =item --replicate-database # OptionParser:1988 12902 Short help: USE only this database # OptionParser:1961 12902 =item --resume # OptionParser:1980 12902 Option has no attributes # OptionParser:1988 12902 Short help: Resume checksumming from the last completed chunk (disables --[no]empty-replicate-table) # OptionParser:1961 12902 =item --retries # OptionParser:1988 12902 Short help: Retry a chunk this many times when there is a nonfatal error # OptionParser:1961 12902 =item --run-time # OptionParser:1988 12902 Short help: How long to run # OptionParser:1961 12902 =item --separator # OptionParser:1988 12902 Short help: The separator character used for CONCAT_WS() # OptionParser:1961 12902 =item --skip-check-slave-lag # OptionParser:1988 12902 Short help: DSN to skip when checking slave lag # OptionParser:1961 12902 =item --slave-user # OptionParser:1988 12902 Short help: Sets the user to be used to connect to the slaves # OptionParser:1961 12902 =item --slave-password # OptionParser:1988 12902 Short help: Sets the password to be used to connect to the slaves # OptionParser:1961 12902 =item --set-vars # OptionParser:1988 12902 Short help: Set the MySQL variables in this comma-separated list of variable=value pairs # OptionParser:1961 12902 =item --socket # OptionParser:1988 12902 Short help: Socket file to use for connection # OptionParser:1961 12902 =item --slave-skip-tolerance # OptionParser:1988 12902 Short help: When a master table is marked to be checksumed in only one chunk but a slave table exceeds the maximum accepted size for this, the table is skipped # OptionParser:1961 12902 =item --tables # OptionParser:1988 12902 Short help: Checksum only this comma-separated list of tables # OptionParser:1961 12902 =item --tables-regex # OptionParser:1988 12902 Short help: Checksum only tables whose names match this Perl regex # OptionParser:1961 12902 =item --trim # OptionParser:1980 12902 Option has no attributes # OptionParser:1988 12902 Short help: Add TRIM() to VARCHAR columns (helps when comparing 4.1 to >= 5.0) # OptionParser:1961 12902 =item --truncate-replicate-table # OptionParser:1980 12902 Option has no attributes # OptionParser:1988 12902 Short help: Truncate the replicate table before starting the checksum # OptionParser:1961 12902 =item --user # OptionParser:1988 12902 Short help: User for login if not current user # OptionParser:1961 12902 =item --version # OptionParser:1988 12902 Short help: Show version and exit # OptionParser:1961 12902 =item --[no]version-check # OptionParser:1988 12902 Short help: Check for the latest version of Percona Toolkit, MySQL, and other programs # OptionParser:1961 12902 =item --where # OptionParser:1988 12902 Short help: Do only rows matching this WHERE clause # OptionParser:2028 12902 Parsing opt spec: group => Connection spec => ask-pass desc => Prompt for a password when connecting to MySQL attributes => HASH(0x1bb7e88) # OptionParser:2067 12902 ask-pass type: undef # OptionParser:2028 12902 Parsing opt spec: group => default spec => check-binlog-format! desc => Check that the binlog_format is the same on all servers (default yes) attributes => HASH(0x25c4238) # OptionParser:2067 12902 check-binlog-format type: undef # OptionParser:2074 12902 check-binlog-format default: yes # OptionParser:2028 12902 Parsing opt spec: group => default spec => binary-index desc => This option modifies the behavior of --create-replicate-table such that the replicate table's upper and lower boundary columns are created with the BLOB data type attributes => HASH(0x25c4100) # OptionParser:2067 12902 binary-index type: undef # OptionParser:2028 12902 Parsing opt spec: group => Throttle spec => check-interval=m desc => Sleep time between checks for --max-lag (default 1) attributes => HASH(0x25c4058) # OptionParser:2067 12902 check-interval type: m # OptionParser:2074 12902 check-interval default: 1 # OptionParser:2028 12902 Parsing opt spec: group => default spec => check-plan! desc => Check query execution plans for safety (default yes) attributes => HASH(0x25c3f68) # OptionParser:2067 12902 check-plan type: undef # OptionParser:2074 12902 check-plan default: yes # OptionParser:2028 12902 Parsing opt spec: group => Safety spec => check-replication-filters! desc => Do not checksum if any replication filters are set on any replicas (default yes) attributes => HASH(0x25c3e90) # OptionParser:2067 12902 check-replication-filters type: undef # OptionParser:2074 12902 check-replication-filters default: yes # OptionParser:2028 12902 Parsing opt spec: group => Throttle spec => check-slave-lag=s desc => Pause checksumming until this replica's lag is less than --max-lag attributes => HASH(0x25c3da0) # OptionParser:2067 12902 check-slave-lag type: s # OptionParser:2028 12902 Parsing opt spec: group => Safety spec => check-slave-tables! desc => Checks that tables on slaves exist and have all the checksum --columns (default yes) attributes => HASH(0x25c13e0) # OptionParser:2067 12902 check-slave-tables type: undef # OptionParser:2074 12902 check-slave-tables default: yes # OptionParser:2028 12902 Parsing opt spec: group => default spec => chunk-index=s desc => Prefer this index for chunking tables attributes => HASH(0x25c12f0) # OptionParser:2067 12902 chunk-index type: s # OptionParser:2028 12902 Parsing opt spec: group => default spec => chunk-index-columns=i desc => Use only this many left-most columns of a --chunk-index attributes => HASH(0x25c1230) # OptionParser:2067 12902 chunk-index-columns type: i # OptionParser:2028 12902 Parsing opt spec: group => default spec => chunk-size=z desc => Number of rows to select for each checksum query (default 1000) attributes => HASH(0x25c1170) # OptionParser:2067 12902 chunk-size type: z # OptionParser:2074 12902 chunk-size default: 1000 # OptionParser:2028 12902 Parsing opt spec: group => Safety spec => chunk-size-limit=f desc => Do not checksum chunks this much larger than the desired chunk size (default 2.0) attributes => HASH(0x25c1098) # OptionParser:2067 12902 chunk-size-limit type: f # OptionParser:2074 12902 chunk-size-limit default: 2.0 # OptionParser:2028 12902 Parsing opt spec: group => default spec => chunk-time=f desc => Adjust the chunk size dynamically so each checksum query takes this long to execute (default 0.5) attributes => HASH(0x25c0fa8) # OptionParser:2067 12902 chunk-time type: f # OptionParser:2074 12902 chunk-time default: 0.5 # OptionParser:2028 12902 Parsing opt spec: group => Filter spec => columns|c=a desc => Checksum only this comma-separated list of columns attributes => HASH(0x25c0ed0) # OptionParser:2067 12902 columns type: a # OptionParser:2028 12902 Parsing opt spec: group => Config spec => config=A desc => Read this comma-separated list of config files; if specified, this must be the first option on the command line attributes => HASH(0x25c0de0) # OptionParser:2067 12902 config type: A # OptionParser:2028 12902 Parsing opt spec: group => default spec => create-replicate-table! desc => Create the --replicate database and table if they do not exist (default yes) attributes => HASH(0x25c0d08) # OptionParser:2067 12902 create-replicate-table type: undef # OptionParser:2074 12902 create-replicate-table default: yes # OptionParser:2028 12902 Parsing opt spec: group => Filter spec => databases|d=h desc => Only checksum this comma-separated list of databases attributes => HASH(0x25c0c30) # OptionParser:2067 12902 databases type: h # OptionParser:2028 12902 Parsing opt spec: group => Filter spec => databases-regex=s desc => Only checksum databases whose names match this Perl regex attributes => HASH(0x25c0b40) # OptionParser:2067 12902 databases-regex type: s # OptionParser:2028 12902 Parsing opt spec: group => Connection spec => defaults-file|F=s desc => Only read mysql options from the given file attributes => HASH(0x25c0a68) # OptionParser:2067 12902 defaults-file type: s # OptionParser:2028 12902 Parsing opt spec: group => default spec => empty-replicate-table! desc => Delete previous checksums for each table before checksumming the table (default yes) attributes => HASH(0x25aca18) # OptionParser:2067 12902 empty-replicate-table type: undef # OptionParser:2074 12902 empty-replicate-table default: yes # OptionParser:2028 12902 Parsing opt spec: group => Filter spec => engines|e=h desc => Only checksum tables which use these storage engines attributes => HASH(0x25acd78) # OptionParser:2067 12902 engines type: h # OptionParser:2028 12902 Parsing opt spec: group => Output spec => explain+ desc => Show, but do not execute, checksum queries (disables --[no]empty-replicate-table) (default 0) attributes => HASH(0x25accb8) # OptionParser:2067 12902 explain type: undef # OptionParser:2074 12902 explain default: 0 # OptionParser:2083 12902 Deferring check of disables rule for HASH(0x25acaf0) disables --[no]empty-replicate-table) (default 0) # OptionParser:2028 12902 Parsing opt spec: group => default spec => float-precision=i desc => Precision for FLOAT and DOUBLE number-to-string conversion attributes => HASH(0x25ac9b8) # OptionParser:2067 12902 float-precision type: i # OptionParser:2028 12902 Parsing opt spec: group => default spec => function=s desc => Hash function for checksums (FNV1A_64, MURMUR_HASH, SHA1, MD5, CRC32, etc) attributes => HASH(0x25acc88) # OptionParser:2067 12902 function type: s # OptionParser:2028 12902 Parsing opt spec: group => Help spec => help desc => Show help and exit attributes => HASH(0x25acb08) # OptionParser:2067 12902 help type: undef # OptionParser:2028 12902 Parsing opt spec: group => Connection spec => host|h=s desc => Host to connect to (default localhost) attributes => HASH(0x2468568) # OptionParser:2067 12902 host type: s # OptionParser:2074 12902 host default: localhost # OptionParser:2028 12902 Parsing opt spec: group => Filter spec => ignore-columns=H desc => Ignore this comma-separated list of columns when calculating the checksum attributes => HASH(0x2468250) # OptionParser:2067 12902 ignore-columns type: H # OptionParser:2028 12902 Parsing opt spec: group => Filter spec => ignore-databases=H desc => Ignore this comma-separated list of databases attributes => HASH(0x24295e0) # OptionParser:2067 12902 ignore-databases type: H # OptionParser:2028 12902 Parsing opt spec: group => Filter spec => ignore-databases-regex=s desc => Ignore databases whose names match this Perl regex attributes => HASH(0x245fa88) # OptionParser:2067 12902 ignore-databases-regex type: s # OptionParser:2028 12902 Parsing opt spec: group => Filter spec => ignore-engines=H desc => Ignore this comma-separated list of storage engines (default FEDERATED,MRG_MyISAM) attributes => HASH(0x25ac790) # OptionParser:2067 12902 ignore-engines type: H # OptionParser:2074 12902 ignore-engines default: FEDERATED,MRG_MyISAM # OptionParser:2028 12902 Parsing opt spec: group => Filter spec => ignore-tables=H desc => Ignore this comma-separated list of tables attributes => HASH(0x25ac880) # OptionParser:2067 12902 ignore-tables type: H # OptionParser:2028 12902 Parsing opt spec: group => Filter spec => ignore-tables-regex=s desc => Ignore tables whose names match the Perl regex attributes => HASH(0x249fa78) # OptionParser:2067 12902 ignore-tables-regex type: s # OptionParser:2028 12902 Parsing opt spec: group => Throttle spec => max-lag=m desc => Pause checksumming until all replicas' lag is less than this value (default 1s) attributes => HASH(0x249fb80) # OptionParser:2067 12902 max-lag type: m # OptionParser:2074 12902 max-lag default: 1s # OptionParser:2028 12902 Parsing opt spec: group => Throttle spec => max-load=A desc => Examine SHOW GLOBAL STATUS after every chunk, and pause if any status variables are higher than the threshold (default Threads_running=25) attributes => HASH(0x249fc70) # OptionParser:2067 12902 max-load type: A # OptionParser:2074 12902 max-load default: Threads_running=25 # OptionParser:2028 12902 Parsing opt spec: group => Connection spec => password|p=s desc => Password to use when connecting attributes => HASH(0x249fd60) # OptionParser:2067 12902 password type: s # OptionParser:2028 12902 Parsing opt spec: group => default spec => pause-file=s desc => Execution will be paused while the file specified by this param exists attributes => HASH(0x249fe50) # OptionParser:2067 12902 pause-file type: s # OptionParser:2028 12902 Parsing opt spec: group => default spec => pid=s desc => Create the given PID file attributes => HASH(0x249ff10) # OptionParser:2067 12902 pid type: s # OptionParser:2028 12902 Parsing opt spec: group => default spec => plugin=s desc => Perl module file that defines a pt_table_checksum_plugin class attributes => HASH(0x249ffd0) # OptionParser:2067 12902 plugin type: s # OptionParser:2028 12902 Parsing opt spec: group => Connection spec => port|P=i desc => Port number to use for connection attributes => HASH(0x24a00d8) # OptionParser:2067 12902 port type: i # OptionParser:2028 12902 Parsing opt spec: group => default spec => progress=a desc => Print progress reports to STDERR (default time,30) attributes => HASH(0x24a01c8) # OptionParser:2067 12902 progress type: a # OptionParser:2074 12902 progress default: time,30 # OptionParser:2028 12902 Parsing opt spec: group => default spec => quiet|q+ desc => Print only the most important information (disables --progress) (default 0) attributes => HASH(0x24a02a0) # OptionParser:2067 12902 quiet type: undef # OptionParser:2074 12902 quiet default: 0 # OptionParser:2083 12902 Deferring check of disables rule for HASH(0x24a0240) disables --progress) (default 0) # OptionParser:2028 12902 Parsing opt spec: group => default spec => recurse=i desc => Number of levels to recurse in the hierarchy when discovering replicas attributes => HASH(0x25bc898) # OptionParser:2067 12902 recurse type: i # OptionParser:2028 12902 Parsing opt spec: group => default spec => recursion-method=a desc => Preferred recursion method for discovering replicas. pt-table-checksum performs several REPLICA CHECKS before and while running (default processlist,hosts) attributes => HASH(0x25bc958) # OptionParser:2067 12902 recursion-method type: a # OptionParser:2074 12902 recursion-method default: processlist,hosts # OptionParser:2028 12902 Parsing opt spec: group => default spec => replicate=s desc => Write checksum results to this table (default percona.checksums) attributes => HASH(0x25bc8e0) # OptionParser:2067 12902 replicate type: s # OptionParser:2074 12902 replicate default: percona.checksums # OptionParser:2028 12902 Parsing opt spec: group => default spec => replicate-check! desc => Check replicas for data differences after finishing each table (default yes) attributes => HASH(0x25bcb08) # OptionParser:2067 12902 replicate-check type: undef # OptionParser:2074 12902 replicate-check default: yes # OptionParser:2028 12902 Parsing opt spec: group => default spec => replicate-check-only desc => Check replicas for consistency without executing checksum queries attributes => HASH(0x25bcbe0) # OptionParser:2067 12902 replicate-check-only type: undef # OptionParser:2028 12902 Parsing opt spec: group => default spec => replicate-check-retries=i desc => Retry checksum comparison this many times when a difference is encountered (default 1) attributes => HASH(0x25bcc88) # OptionParser:2067 12902 replicate-check-retries type: i # OptionParser:2074 12902 replicate-check-retries default: 1 # OptionParser:2028 12902 Parsing opt spec: group => default spec => replicate-database=s desc => USE only this database attributes => HASH(0x25bcd60) # OptionParser:2067 12902 replicate-database type: s # OptionParser:2028 12902 Parsing opt spec: group => default spec => resume desc => Resume checksumming from the last completed chunk (disables --[no]empty-replicate-table) attributes => HASH(0x25bce20) # OptionParser:2067 12902 resume type: undef # OptionParser:2083 12902 Deferring check of disables rule for HASH(0x25c09f0) disables --[no]empty-replicate-table) # OptionParser:2028 12902 Parsing opt spec: group => default spec => retries=i desc => Retry a chunk this many times when there is a nonfatal error (default 2) attributes => HASH(0x262e168) # OptionParser:2067 12902 retries type: i # OptionParser:2074 12902 retries default: 2 # OptionParser:2028 12902 Parsing opt spec: group => default spec => run-time=m desc => How long to run attributes => HASH(0x262e240) # OptionParser:2067 12902 run-time type: m # OptionParser:2028 12902 Parsing opt spec: group => default spec => separator=s desc => The separator character used for CONCAT_WS() (default #) attributes => HASH(0x262e300) # OptionParser:2067 12902 separator type: s # OptionParser:2074 12902 separator default: # # OptionParser:2028 12902 Parsing opt spec: group => default spec => skip-check-slave-lag=d desc => DSN to skip when checking slave lag attributes => HASH(0x262e3d8) # OptionParser:2067 12902 skip-check-slave-lag type: d # OptionParser:2028 12902 Parsing opt spec: group => default spec => slave-user=s desc => Sets the user to be used to connect to the slaves attributes => HASH(0x262e4b0) # OptionParser:2067 12902 slave-user type: s # OptionParser:2028 12902 Parsing opt spec: group => default spec => slave-password=s desc => Sets the password to be used to connect to the slaves attributes => HASH(0x262e570) # OptionParser:2067 12902 slave-password type: s # OptionParser:2028 12902 Parsing opt spec: group => Connection spec => set-vars=A desc => Set the MySQL variables in this comma-separated list of variable=value pairs attributes => HASH(0x262e630) # OptionParser:2067 12902 set-vars type: A # OptionParser:2028 12902 Parsing opt spec: group => Connection spec => socket|S=s desc => Socket file to use for connection attributes => HASH(0x262e708) # OptionParser:2067 12902 socket type: s # OptionParser:2028 12902 Parsing opt spec: group => default spec => slave-skip-tolerance=f desc => When a master table is marked to be checksumed in only one chunk but a slave table exceeds the maximum accepted size for this, the table is skipped (default 1.0) attributes => HASH(0x262e7f8) # OptionParser:2067 12902 slave-skip-tolerance type: f # OptionParser:2074 12902 slave-skip-tolerance default: 1.0 # OptionParser:2028 12902 Parsing opt spec: group => Filter spec => tables|t=h desc => Checksum only this comma-separated list of tables attributes => HASH(0x262e8d0) # OptionParser:2067 12902 tables type: h # OptionParser:2028 12902 Parsing opt spec: group => Filter spec => tables-regex=s desc => Checksum only tables whose names match this Perl regex attributes => HASH(0x262e9c0) # OptionParser:2067 12902 tables-regex type: s # OptionParser:2028 12902 Parsing opt spec: group => default spec => trim desc => Add TRIM() to VARCHAR columns (helps when comparing 4.1 to >= 5.0) attributes => HASH(0x262ea98) # OptionParser:2067 12902 trim type: undef # OptionParser:2028 12902 Parsing opt spec: group => default spec => truncate-replicate-table desc => Truncate the replicate table before starting the checksum attributes => HASH(0x262eb40) # OptionParser:2067 12902 truncate-replicate-table type: undef # OptionParser:2028 12902 Parsing opt spec: group => Connection spec => user|u=s desc => User for login if not current user attributes => HASH(0x262ebe8) # OptionParser:2067 12902 user type: s # OptionParser:2028 12902 Parsing opt spec: group => Help spec => version desc => Show version and exit attributes => HASH(0x262ecd8) # OptionParser:2067 12902 version type: undef # OptionParser:2028 12902 Parsing opt spec: group => default spec => version-check! desc => Check for the latest version of Percona Toolkit, MySQL, and other programs (default yes) attributes => HASH(0x262ed98) # OptionParser:2067 12902 version-check type: undef # OptionParser:2074 12902 version-check default: yes # OptionParser:2028 12902 Parsing opt spec: group => default spec => where=s desc => Do only rows matching this WHERE clause attributes => HASH(0x26407e8) # OptionParser:2067 12902 where type: s # OptionParser:2089 12902 Parsing rule: This tool accepts additional command-line arguments. Refer to the SYNOPSIS and usage information for details. # OptionParser:2145 12902 Participants for This tool accepts additional command-line arguments. Refer to the SYNOPSIS and usage information for details. : # OptionParser:2121 12902 Strict mode disabled by rule # OptionParser:2145 12902 Participants for disables --[no]empty-replicate-table) : empty-replicate-table # OptionParser:2131 12902 Option resume disables empty-replicate-table # OptionParser:2145 12902 Participants for disables --progress) (default 0) : progress # OptionParser:2131 12902 Option quiet disables progress # OptionParser:2145 12902 Participants for disables --[no]empty-replicate-table) (default 0) : empty-replicate-table # OptionParser:2131 12902 Option explain disables empty-replicate-table # OptionParser:1871 12902 Parsing DSN OPTIONS # OptionParser:1961 12902 =item * A # OptionParser:1988 12902 Short help: Default character set # OptionParser:1961 12902 =item * D # OptionParser:1988 12902 Short help: DSN table database # OptionParser:1961 12902 =item * F # OptionParser:1988 12902 Short help: Defaults file for connection values # OptionParser:1961 12902 =item * h # OptionParser:1988 12902 Short help: Connect to host # OptionParser:1961 12902 =item * p # OptionParser:1988 12902 Short help: Password to use when connecting # OptionParser:1961 12902 =item * P # OptionParser:1988 12902 Short help: Port number to use for connection # OptionParser:1961 12902 =item * S # OptionParser:1988 12902 Short help: Socket file to use for connection # OptionParser:1961 12902 =item * t # OptionParser:1988 12902 Short help: DSN table table # OptionParser:1961 12902 =item * u # OptionParser:1988 12902 Short help: User for login if not current user # DSNParser:1389 12902 DSN option: copy=1, dsn=charset, desc=Default character set, key=A # DSNParser:1389 12902 DSN option: copy=, dsn=undef, desc=DSN table database, key=D # DSNParser:1389 12902 DSN option: copy=1, dsn=mysql_read_default_file, desc=Defaults file for connection values, key=F # DSNParser:1389 12902 DSN option: copy=1, dsn=host, desc=Connect to host, key=h # DSNParser:1389 12902 DSN option: copy=1, dsn=password, desc=Password to use when connecting, key=p # DSNParser:1389 12902 DSN option: copy=1, dsn=port, desc=Port number to use for connection, key=P # DSNParser:1389 12902 DSN option: copy=, dsn=mysql_socket, desc=Socket file to use for connection, key=S # DSNParser:1389 12902 DSN option: copy=, dsn=undef, desc=DSN table table, key=t # DSNParser:1389 12902 DSN option: copy=1, dsn=user, desc=User for login if not current user, key=u # OptionParser:1915 12902 pt-table-checksum 3.0.4 # OptionParser:2255 12902 Cannot open /etc/percona-toolkit/percona-toolkit.conf: No such file or directory # # OptionParser:2255 12902 Cannot open /etc/percona-toolkit/pt-table-checksum.conf: No such file or directory # # OptionParser:2255 12902 Cannot open /root/.percona-toolkit.conf: No such file or directory # # OptionParser:2255 12902 Cannot open /root/.pt-table-checksum.conf: No such file or directory # # OptionParser:2217 12902 Got option check-binlog-format = 0 # OptionParser:2452 12902 Nothing to validate for option slave-skip-tolerance type f value 1.0 # OptionParser:2452 12902 Nothing to validate for option tables type h value undef # OptionParser:2452 12902 Nothing to validate for option password type s value undef # OptionParser:2452 12902 Nothing to validate for option chunk-index-columns type i value undef # OptionParser:2452 12902 Nothing to validate for option chunk-time type f value 0.5 # OptionParser:2395 12902 Parsing option max-lag as a time value # OptionParser:2409 12902 Setting option max-lag to 1 # OptionParser:2452 12902 Nothing to validate for option skip-check-slave-lag type d value undef # OptionParser:2452 12902 Nothing to validate for option function type s value undef # OptionParser:2452 12902 Nothing to validate for option slave-user type s value undef # OptionParser:2452 12902 Nothing to validate for option pause-file type s value undef # OptionParser:2452 12902 Nothing to validate for option where type s value undef # OptionParser:2452 12902 Nothing to validate for option defaults-file type s value undef # OptionParser:2442 12902 Parsing option chunk-size as a size value # OptionParser:2452 12902 Nothing to validate for option ignore-tables-regex type s value undef # OptionParser:2452 12902 Nothing to validate for option ignore-databases-regex type s value undef # OptionParser:2452 12902 Nothing to validate for option check-slave-lag type s value undef # OptionParser:2452 12902 Nothing to validate for option chunk-index type s value undef # OptionParser:2452 12902 Nothing to validate for option pid type s value undef # OptionParser:2452 12902 Nothing to validate for option float-precision type i value undef # OptionParser:2452 12902 Nothing to validate for option replicate type s value percona.checksums # OptionParser:2452 12902 Nothing to validate for option user type s value undef # OptionParser:2452 12902 Nothing to validate for option port type i value undef # OptionParser:2452 12902 Nothing to validate for option socket type s value undef # OptionParser:2395 12902 Parsing option check-interval as a time value # OptionParser:2400 12902 No suffix given; using s for check-interval (value: 1 ) # OptionParser:2409 12902 Setting option check-interval to 1 # OptionParser:2452 12902 Nothing to validate for option recurse type i value undef # OptionParser:2452 12902 Nothing to validate for option columns type a value undef # OptionParser:2452 12902 Nothing to validate for option replicate-database type s value undef # OptionParser:2452 12902 Nothing to validate for option engines type h value undef # OptionParser:2452 12902 Nothing to validate for option retries type i value 2 # OptionParser:2452 12902 Nothing to validate for option run-time type m value undef # OptionParser:2452 12902 Nothing to validate for option databases-regex type s value undef # OptionParser:2452 12902 Nothing to validate for option replicate-check-retries type i value 1 # OptionParser:2452 12902 Nothing to validate for option plugin type s value undef # OptionParser:2452 12902 Nothing to validate for option tables-regex type s value undef # OptionParser:2452 12902 Nothing to validate for option chunk-size-limit type f value 2.0 # OptionParser:2452 12902 Nothing to validate for option databases type h value undef # OptionParser:2452 12902 Nothing to validate for option host type s value localhost # OptionParser:2452 12902 Nothing to validate for option separator type s value # # OptionParser:2452 12902 Nothing to validate for option slave-password type s value undef # OptionParser:2854 12902 --set-vars: $VAR1 = { # innodb_lock_wait_timeout => { # default => 1, # val => '1' # }, # wait_timeout => { # default => 1, # val => '10000' # } # }; # # DSNParser:1405 12902 Setting set-vars property # OptionParser:2526 12902 Getting description and usage from SYNOPSIS in /usr/bin/pt-table-checksum # OptionParser:2787 12902 Parsing SYNOPSIS in /usr/bin/pt-table-checksum # OptionParser:2800 12902 Raw SYNOPSIS text: Usage: pt-table-checksum [OPTIONS] [DSN] # # pt-table-checksum performs an online replication consistency check by executing # checksum queries on the master, which produces different results on replicas # that are inconsistent with the master. The optional DSN specifies the master # host. The tool's L<"EXIT STATUS"> is non-zero if any differences are found, # or if any warnings or errors occur. # # # OptionParser:2530 12902 Description: pt-table-checksum performs an online replication consistency check by executing checksum queries on the master, which produces different results on replicas that are inconsistent with the master. The optional DSN specifies the master host. The tool's L<"EXIT STATUS"> is non-zero if any differences are found, or if any warnings or errors occur. # Usage: pt-table-checksum [OPTIONS] [DSN] # Daemon:7152 12902 Starting daemon # Daemon:7222 12902 Daemon running # DSNParser:1477 12902 DSN string made from options: h=localhost # DSNParser:1417 12902 Parsing h=localhost # DSNParser:1436 12902 Finding value for S # DSNParser:1446 12902 Copying value for S from defaults # DSNParser:1436 12902 Finding value for F # DSNParser:1446 12902 Copying value for F from defaults # DSNParser:1436 12902 Finding value for A # DSNParser:1446 12902 Copying value for A from defaults # DSNParser:1436 12902 Finding value for P # DSNParser:1446 12902 Copying value for P from defaults # DSNParser:1436 12902 Finding value for u # DSNParser:1446 12902 Copying value for u from defaults # DSNParser:1436 12902 Finding value for p # DSNParser:1446 12902 Copying value for p from defaults # DSNParser:1436 12902 Finding value for h # DSNParser:1436 12902 Finding value for D # DSNParser:1446 12902 Copying value for D from defaults # DSNParser:1436 12902 Finding value for t # DSNParser:1446 12902 Copying value for t from defaults # DSNParser:1417 12902 Parsing h=localhost,u=pttc,p=password # DSNParser:1436 12902 Finding value for S # DSNParser:1446 12902 Copying value for S from defaults # DSNParser:1436 12902 Finding value for F # DSNParser:1446 12902 Copying value for F from defaults # DSNParser:1436 12902 Finding value for A # DSNParser:1446 12902 Copying value for A from defaults # DSNParser:1436 12902 Finding value for P # DSNParser:1446 12902 Copying value for P from defaults # DSNParser:1436 12902 Finding value for u # DSNParser:1436 12902 Finding value for p # DSNParser:1436 12902 Finding value for h # DSNParser:1436 12902 Finding value for D # DSNParser:1446 12902 Copying value for D from defaults # DSNParser:1436 12902 Finding value for t # DSNParser:1446 12902 Copying value for t from defaults # DSNParser:1530 12902 DBI:mysql:;host=localhost;mysql_read_default_group=client # DSNParser:1579 12902 DBI:mysql:;host=localhost;mysql_read_default_group=client pttc password mysql_enable_utf8=>0, ShowErrorStatement=>1, AutoCommit=>1, RaiseError=>1, PrintError=>0 # DSNParser:1738 12902 DBI::db=HASH(0x2657470) SET SESSION innodb_lock_wait_timeout=1 # DSNParser:1738 12902 DBI::db=HASH(0x2657470) SET SESSION wait_timeout=10000 # DSNParser:1628 12902 DBI::db=HASH(0x2657470) SELECT @@SQL_MODE # DSNParser:1638 12902 DBI::db=HASH(0x2657470) SET @@SQL_QUOTE_SHOW_CREATE = 1/*!40101, @@SQL_MODE='NO_AUTO_VALUE_ON_ZERO,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'*/ # DSNParser:1647 12902 DBH info: DBI::db=HASH(0x2657470) $VAR1 = { # '@@hostname' => 'master', # 'CONNECTION_ID()' => '13509', # 'DATABASE()' => undef, # 'VERSION()' => '5.7.19-17-log' # }; # Connection info: Localhost via UNIX socket Character set info: $VAR1 = [ # { # Value => 'latin1', # Variable_name => 'character_set_client' # }, # { # Value => 'latin1', # Variable_name => 'character_set_connection' # }, # { # Value => 'latin1', # Variable_name => 'character_set_database' # }, # { # Value => 'binary', # Variable_name => 'character_set_filesystem' # }, # { # Value => 'latin1', # Variable_name => 'character_set_results' # }, # { # Value => 'latin1', # Variable_name => 'character_set_server' # }, # { # Value => 'utf8', # Variable_name => 'character_set_system' # }, # { # Value => '/usr/share/percona-server/charsets/', # Variable_name => 'character_sets_dir' # } # ]; # $DBD::mysql::VERSION: 4.023 $DBI::VERSION: 1.627 # Cxn:3633 12902 DBI::db=HASH(0x2657470) Setting dbh # Cxn:3638 12902 DBI::db=HASH(0x2657470) SELECT @@server_id /*!50038 , @@hostname*/ # Cxn:3640 12902 DBI::db=HASH(0x2657470) hostname: master 101 # pt_table_checksum:9321 12902 DBI::db=HASH(0x2657470) SELECT @@SQL_MODE # pt_table_checksum:9328 12902 DBI::db=HASH(0x2657470) SET SQL_MODE=',NO_AUTO_VALUE_ON_ZERO,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' # pt_table_checksum:9377 12902 DBI::db=HASH(0x2657470) SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ # Cxn:3621 12902 DBI::db=HASH(0x2657470) Connected dbh to master h=localhost # Percona::XtraDB::Cluster:3828 12902 master SHOW VARIABLES LIKE 'wsrep_on' # Percona::XtraDB::Cluster:3830 12902 $VAR1 = undef; # # MasterSlave:5155 12902 Recursion methods: processlist hosts # MasterSlave:5175 12902 Connected to h=localhost,p=...,u=pttc # MasterSlave:5184 12902 SELECT @@SERVER_ID # MasterSlave:5186 12902 Working on server ID 101 # MasterSlave:5219 12902 Looking for slaves on h=localhost,p=...,u=pttc using methods processlist hosts # MasterSlave:5226 12902 Finding slaves with _find_slaves_by_processlist # MasterSlave:5288 12902 DBI::db=HASH(0x2657470) SHOW GRANTS FOR CURRENT_USER() # MasterSlave:5318 12902 DBI::db=HASH(0x2657470) SHOW FULL PROCESSLIST # DSNParser:1417 12902 Parsing h=192.168.70.2 # DSNParser:1436 12902 Finding value for S # DSNParser:1446 12902 Copying value for S from defaults # DSNParser:1436 12902 Finding value for F # DSNParser:1446 12902 Copying value for F from defaults # DSNParser:1436 12902 Finding value for A # DSNParser:1446 12902 Copying value for A from defaults # DSNParser:1436 12902 Finding value for P # DSNParser:1446 12902 Copying value for P from defaults # DSNParser:1436 12902 Finding value for u # DSNParser:1442 12902 Copying value for u from previous DSN # DSNParser:1436 12902 Finding value for p # DSNParser:1442 12902 Copying value for p from previous DSN # DSNParser:1436 12902 Finding value for h # DSNParser:1436 12902 Finding value for D # DSNParser:1446 12902 Copying value for D from defaults # DSNParser:1436 12902 Finding value for t # DSNParser:1446 12902 Copying value for t from defaults # MasterSlave:5231 12902 Found 1 slaves # MasterSlave:5208 12902 Recursing from h=localhost,p=...,u=pttc to h=192.168.70.2,p=...,u=pttc # MasterSlave:5155 12902 Recursion methods: processlist hosts # DSNParser:1530 12902 DBI:mysql:;host=192.168.70.2;mysql_read_default_group=client # DSNParser:1579 12902 DBI:mysql:;host=192.168.70.2;mysql_read_default_group=client pttc password mysql_enable_utf8=>0, ShowErrorStatement=>1, AutoCommit=>1, RaiseError=>1, PrintError=>0 # DSNParser:1738 12902 DBI::db=HASH(0x2662fd8) SET SESSION innodb_lock_wait_timeout=1 # DSNParser:1738 12902 DBI::db=HASH(0x2662fd8) SET SESSION wait_timeout=10000 # DSNParser:1628 12902 DBI::db=HASH(0x2662fd8) SELECT @@SQL_MODE # DSNParser:1638 12902 DBI::db=HASH(0x2662fd8) SET @@SQL_QUOTE_SHOW_CREATE = 1/*!40101, @@SQL_MODE='NO_AUTO_VALUE_ON_ZERO,ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'*/ # DSNParser:1647 12902 DBH info: DBI::db=HASH(0x2662fd8) $VAR1 = { # '@@hostname' => 'slave', # 'CONNECTION_ID()' => '36', # 'DATABASE()' => undef, # 'VERSION()' => '5.7.19-17' # }; # Connection info: 192.168.70.2 via TCP/IP Character set info: $VAR1 = [ # { # Value => 'latin1', # Variable_name => 'character_set_client' # }, # { # Value => 'latin1', # Variable_name => 'character_set_connection' # }, # { # Value => 'latin1', # Variable_name => 'character_set_database' # }, # { # Value => 'binary', # Variable_name => 'character_set_filesystem' # }, # { # Value => 'latin1', # Variable_name => 'character_set_results' # }, # { # Value => 'latin1', # Variable_name => 'character_set_server' # }, # { # Value => 'utf8', # Variable_name => 'character_set_system' # }, # { # Value => '/usr/share/percona-server/charsets/', # Variable_name => 'character_sets_dir' # } # ]; # $DBD::mysql::VERSION: 4.023 $DBI::VERSION: 1.627 # MasterSlave:5175 12902 Connected to h=192.168.70.2,p=...,u=pttc # MasterSlave:5184 12902 SELECT @@SERVER_ID # MasterSlave:5186 12902 Working on server ID 102 # MasterSlave:5097 12902 Found slave: h=192.168.70.2,p=...,u=pttc # DSNParser:1477 12902 DSN string made from options: h=localhost # DSNParser:1417 12902 Parsing h=localhost # DSNParser:1436 12902 Finding value for S # DSNParser:1446 12902 Copying value for S from defaults # DSNParser:1436 12902 Finding value for F # DSNParser:1446 12902 Copying value for F from defaults # DSNParser:1436 12902 Finding value for A # DSNParser:1446 12902 Copying value for A from defaults # DSNParser:1436 12902 Finding value for P # DSNParser:1446 12902 Copying value for P from defaults # DSNParser:1436 12902 Finding value for u # DSNParser:1446 12902 Copying value for u from defaults # DSNParser:1436 12902 Finding value for p # DSNParser:1446 12902 Copying value for p from defaults # DSNParser:1436 12902 Finding value for h # DSNParser:1436 12902 Finding value for D # DSNParser:1446 12902 Copying value for D from defaults # DSNParser:1436 12902 Finding value for t # DSNParser:1446 12902 Copying value for t from defaults # Cxn:3633 12902 DBI::db=HASH(0x2662fd8) Setting dbh # Cxn:3638 12902 DBI::db=HASH(0x2662fd8) SELECT @@server_id /*!50038 , @@hostname*/ # Cxn:3640 12902 DBI::db=HASH(0x2662fd8) hostname: slave 102 # Cxn:3621 12902 DBI::db=HASH(0x2662fd8) Connected dbh to slave h=192.168.70.2 # Percona::XtraDB::Cluster:3828 12902 slave SHOW VARIABLES LIKE 'wsrep_on' # Percona::XtraDB::Cluster:3830 12902 $VAR1 = undef; # # MasterSlave:5219 12902 Looking for slaves on h=192.168.70.2,p=...,u=pttc using methods processlist hosts # MasterSlave:5226 12902 Finding slaves with _find_slaves_by_processlist # MasterSlave:5288 12902 DBI::db=HASH(0x2662fd8) SHOW GRANTS FOR CURRENT_USER() # MasterSlave:5318 12902 DBI::db=HASH(0x2662fd8) SHOW FULL PROCESSLIST # MasterSlave:5226 12902 Finding slaves with _find_slaves_by_hosts # MasterSlave:5260 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE HOSTS # MasterSlave:5231 12902 Found 0 slaves # Cxn:3729 12902 master SHOW VARIABLES LIKE 'wsrep_on' # Cxn:3707 12902 SELECT @@SERVER_ID # Cxn:3710 12902 Generated unique id for cluster: 101 # Cxn:3729 12902 slave SHOW VARIABLES LIKE 'wsrep_on' # Cxn:3707 12902 SELECT @@SERVER_ID # Cxn:3710 12902 Generated unique id for cluster: 102 # Cxn:3741 12902 Removing duplicates from master slave # Cxn:3729 12902 master SHOW VARIABLES LIKE 'wsrep_on' # Cxn:3707 12902 SELECT @@SERVER_ID # Cxn:3710 12902 Generated unique id for cluster: 101 # Cxn:3747 12902 Server ID for master : 101 # Cxn:3729 12902 slave SHOW VARIABLES LIKE 'wsrep_on' # Cxn:3707 12902 SELECT @@SERVER_ID # Cxn:3710 12902 Generated unique id for cluster: 102 # Cxn:3747 12902 Server ID for slave : 102 # pt_table_checksum:9565 12902 1 slaves found # pt_table_checksum:9708 12902 Will check slave lag on all slaves # pt_table_checksum:9724 12902 May check slave lag on slave # pt_table_checksum:9801 12902 Checking slave replication filters # MasterSlave:5402 12902 DBI::db=HASH(0x2662fd8) SHOW MASTER STATUS # MasterSlave:5406 12902 # MasterSlave:5410 12902 Server on dbh DBI::db=HASH(0x2662fd8) does not seem to be a master # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # MasterSlave:5704 12902 DBI::db=HASH(0x2662fd8) SHOW VARIABLES LIKE 'slave_skip_errors' # pt_table_checksum:11037 12902 Checking --replicate table `percona`.`checksums` # pt_table_checksum:11046 12902 SHOW DATABASES LIKE 'percona' # pt_table_checksum:11061 12902 CREATE DATABASE IF NOT EXISTS `percona` /* pt-table-checksum */ # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # TableParser:4567 12902 Checking `percona`.`checksums` # TableParser:4573 12902 SHOW TABLES FROM `percona` LIKE 'checksums' # TableParser:4588 12902 Table percona checksums exists # pt_table_checksum:11118 12902 --replicate table exists: yes # pt_table_checksum:11410 12902 Creating --replicate table `percona`.`checksums` # pt_table_checksum:11418 12902 DBI::db=HASH(0x2657470) CREATE TABLE IF NOT EXISTS `percona`.`checksums` ( # db CHAR(64) NOT NULL, # tbl CHAR(64) NOT NULL, # chunk INT NOT NULL, # chunk_time FLOAT NULL, # chunk_index VARCHAR(200) NULL, # lower_boundary TEXT NULL, # upper_boundary TEXT NULL, # this_crc CHAR(40) NOT NULL, # this_cnt INT NOT NULL, # master_crc CHAR(40) NULL, # master_cnt INT NULL, # ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, # PRIMARY KEY (db, tbl, chunk), # INDEX ts_db_tbl (ts, db, tbl) # ) ENGINE=InnoDB DEFAULT CHARSET=utf8 # pt_table_checksum:11196 12902 Checking if slave has repl table # TableParser:4567 12902 Checking `percona`.`checksums` # TableParser:4573 12902 SHOW TABLES FROM `percona` LIKE 'checksums' # TableParser:4588 12902 Table percona checksums exists # MySQLStatusWaiter:8576 12902 Parsing spec for max thresholds # MySQLStatusWaiter:8718 12902 Checking and setting values # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8734 12902 Wait if Threads_running >= 25 # MySQLStatusWaiter:8586 12902 Parsing spec for critical thresholds # VersionCheck:832 12902 FindBin::Bin: /usr/bin # VersionCheck:997 12902 SELECT CONCAT(@@hostname, @@port) # VersionCheck:1018 12902 MySQL instance: fdab197d801cca12944563fc073df00a master3306 $VAR1 = { # A => undef, # D => undef, # F => undef, # P => undef, # S => undef, # h => 'localhost', # p => 'password', # t => undef, # u => 'pttc' # }; # # VersionCheck:997 12902 SELECT CONCAT(@@hostname, @@port) # VersionCheck:1018 12902 MySQL instance: 39719b1b2baae425646bf998b7f882c7 slave3306 $VAR1 = { # A => undef, # D => undef, # F => undef, # P => undef, # S => undef, # h => '192.168.70.2', # p => 'password', # t => undef, # u => 'pttc' # }; # # VersionCheck:812 12902 Version check file percona-version-check in /tmp # VersionCheck:932 12902 Version check file /tmp/percona-version-check contents: 0,1505984438 # 39719b1b2baae425646bf998b7f882c7,1505988134 # fdab197d801cca12944563fc073df00a,1505984438 # VersionCheck:940 12902 Intsance fdab197d801cca12944563fc073df00a last checked 1505984438 now 1505998105 diff 13667 hours until next check 20.20 # VersionCheck:940 12902 Intsance 39719b1b2baae425646bf998b7f882c7 last checked 1505988134 now 1505998105 diff 9971 hours until next check 21.23 # VersionCheck:940 12902 Intsance 0 last checked 1505984438 now 1505998105 diff 13667 hours until next check 20.20 # VersionCheck:860 12902 0 instances to check # RowChecksum:6005 12902 SELECT CRC32('test-string') # RowChecksum:6013 12902 Chosen hash func: CRC32 # RowChecksum:6053 12902 SELECT CRC32('a') bigint 10 # RowChecksum:6059 12902 crc_type: int length: 10 # Percona::XtraDB::Cluster:3828 12902 master SHOW VARIABLES LIKE 'wsrep_on' # Percona::XtraDB::Cluster:3830 12902 $VAR1 = undef; # # SchemaIterator:7451 12902 Filter ignore-tables value: percona checksums # SchemaIterator:7455 12902 Filter ignore-engines value: mrg_myisam # SchemaIterator:7455 12902 Filter ignore-engines value: federated # SchemaIterator:7475 12902 Schema object filters: $VAR1 = { # 'ignore-engines' => { # federated => 1, # mrg_myisam => 1 # }, # 'ignore-tables' => { # percona => { # checksums => 1 # } # } # }; # # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # SchemaIterator:7590 12902 SHOW DATABASES # SchemaIterator:7675 12902 Database information_schema is a system database, ignoring # SchemaIterator:7675 12902 Database performance_schema is a system database, ignoring # SchemaIterator:7596 12902 Found 4 databases # SchemaIterator:7603 12902 Next database: mysql # SchemaIterator:7609 12902 SHOW /*!50002 FULL*/ TABLES FROM `mysql` # SchemaIterator:7627 12902 Found 23 tables in database mysql # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`columns_priv` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4444 12902 Table cols: `host`, `db`, `user`, `table_name`, `column_name`, `timestamp`, `column_priv` # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4612 12902 Parsed key: PRIMARY KEY (`host`,`db`,`user`,`table_name`,`column_name`) # TableParser:4632 12902 PRIMARY key cols: `host`, `db`, `user`, `table_name`, `column_name` # SchemaIterator:7509 12902 Next schema object: mysql columns_priv # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`user` using utf8mb4), convert(`table_name` using utf8mb4), convert(`column_name` using utf8mb4), UNIX_TIMESTAMP(`timestamp`), convert(`column_priv` using utf8mb4))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`user` using utf8mb4), convert(`table_name` using utf8mb4), convert(`column_name` using utf8mb4), UNIX_TIMESTAMP(`timestamp`), convert(`column_priv` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`columns_priv` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => 'no matching row in const table', # filtered => undef, # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => undef, # select_type => 'SIMPLE', # table => undef, # type => undef # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`user` using utf8mb4), convert(`table_name` using utf8mb4), convert(`column_name` using utf8mb4), UNIX_TIMESTAMP(`timestamp`), convert(`column_priv` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`columns_priv` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`user` using utf8mb4), convert(`table_name` using utf8mb4), convert(`column_name` using utf8mb4), UNIX_TIMESTAMP(`timestamp`), convert(`column_priv` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`columns_priv` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `mysql`.`columns_priv` # TableParser:4573 12902 SHOW TABLES FROM `mysql` LIKE 'columns\_priv' # TableParser:4588 12902 Table mysql columns_priv exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`columns_priv` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4444 12902 Table cols: `host`, `db`, `user`, `table_name`, `column_name`, `timestamp`, `column_priv` # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4612 12902 Parsed key: PRIMARY KEY (`host`,`db`,`user`,`table_name`,`column_name`) # TableParser:4632 12902 PRIMARY key cols: `host`, `db`, `user`, `table_name`, `column_name` # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`columns_priv` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => 'no matching row in const table', # filtered => undef, # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => undef, # select_type => 'SIMPLE', # table => undef, # type => undef # }; # # pt_table_checksum:10170 12902 Table on slave has 0 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `mysql` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`user` using utf8mb4), convert(`table_name` using utf8mb4), convert(`column_name` using utf8mb4), UNIX_TIMESTAMP(`timestamp`), convert(`column_priv` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`columns_priv` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`user` using utf8mb4), convert(`table_name` using utf8mb4), convert(`column_name` using utf8mb4), UNIX_TIMESTAMP(`timestamp`), convert(`column_priv` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`columns_priv` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => 'no matching row in const table', # filtered => undef, # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => undef, # select_type => 'SIMPLE', # table => undef, # type => undef # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`user` using utf8mb4), convert(`table_name` using utf8mb4), convert(`column_name` using utf8mb4), UNIX_TIMESTAMP(`timestamp`), convert(`column_priv` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`columns_priv` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.00588703155517578 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='columns_priv' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='mysql' AND tbl='columns_priv') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`db` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4444 12902 Table cols: `host`, `db`, `user`, `select_priv`, `insert_priv`, `update_priv`, `delete_priv`, `create_priv`, `drop_priv`, `grant_priv`, `references_priv`, `index_priv`, `alter_priv`, `create_tmp_table_priv`, `lock_tables_priv`, `create_view_priv`, `show_view_priv`, `create_routine_priv`, `alter_routine_priv`, `execute_priv`, `event_priv`, `trigger_priv` # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4612 12902 Parsed key: PRIMARY KEY (`host`,`db`,`user`), # TableParser:4632 12902 PRIMARY key cols: `host`, `db`, `user` # TableParser:4612 12902 Parsed key: KEY `user` (`user`) # TableParser:4632 12902 user key cols: `user` # SchemaIterator:7509 12902 Next schema object: mysql db # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`user` using utf8mb4), convert(`select_priv` using utf8mb4), convert(`insert_priv` using utf8mb4), convert(`update_priv` using utf8mb4), convert(`delete_priv` using utf8mb4), convert(`create_priv` using utf8mb4), convert(`drop_priv` using utf8mb4), convert(`grant_priv` using utf8mb4), convert(`references_priv` using utf8mb4), convert(`index_priv` using utf8mb4), convert(`alter_priv` using utf8mb4), convert(`create_tmp_table_priv` using utf8mb4), convert(`lock_tables_priv` using utf8mb4), convert(`create_view_priv` using utf8mb4), convert(`show_view_priv` using utf8mb4), convert(`create_routine_priv` using utf8mb4), convert(`alter_routine_priv` using utf8mb4), convert(`execute_priv` using utf8mb4), convert(`event_priv` using utf8mb4), convert(`trigger_priv` using utf8mb4))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`user` using utf8mb4), convert(`select_priv` using utf8mb4), convert(`insert_priv` using utf8mb4), convert(`update_priv` using utf8mb4), convert(`delete_priv` using utf8mb4), convert(`create_priv` using utf8mb4), convert(`drop_priv` using utf8mb4), convert(`grant_priv` using utf8mb4), convert(`references_priv` using utf8mb4), convert(`index_priv` using utf8mb4), convert(`alter_priv` using utf8mb4), convert(`create_tmp_table_priv` using utf8mb4), convert(`lock_tables_priv` using utf8mb4), convert(`create_view_priv` using utf8mb4), convert(`show_view_priv` using utf8mb4), convert(`create_routine_priv` using utf8mb4), convert(`alter_routine_priv` using utf8mb4), convert(`execute_priv` using utf8mb4), convert(`event_priv` using utf8mb4), convert(`trigger_priv` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`db` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '4', # select_type => 'SIMPLE', # table => 'db', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY, user # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`user` using utf8mb4), convert(`select_priv` using utf8mb4), convert(`insert_priv` using utf8mb4), convert(`update_priv` using utf8mb4), convert(`delete_priv` using utf8mb4), convert(`create_priv` using utf8mb4), convert(`drop_priv` using utf8mb4), convert(`grant_priv` using utf8mb4), convert(`references_priv` using utf8mb4), convert(`index_priv` using utf8mb4), convert(`alter_priv` using utf8mb4), convert(`create_tmp_table_priv` using utf8mb4), convert(`lock_tables_priv` using utf8mb4), convert(`create_view_priv` using utf8mb4), convert(`show_view_priv` using utf8mb4), convert(`create_routine_priv` using utf8mb4), convert(`alter_routine_priv` using utf8mb4), convert(`execute_priv` using utf8mb4), convert(`event_priv` using utf8mb4), convert(`trigger_priv` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`db` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`user` using utf8mb4), convert(`select_priv` using utf8mb4), convert(`insert_priv` using utf8mb4), convert(`update_priv` using utf8mb4), convert(`delete_priv` using utf8mb4), convert(`create_priv` using utf8mb4), convert(`drop_priv` using utf8mb4), convert(`grant_priv` using utf8mb4), convert(`references_priv` using utf8mb4), convert(`index_priv` using utf8mb4), convert(`alter_priv` using utf8mb4), convert(`create_tmp_table_priv` using utf8mb4), convert(`lock_tables_priv` using utf8mb4), convert(`create_view_priv` using utf8mb4), convert(`show_view_priv` using utf8mb4), convert(`create_routine_priv` using utf8mb4), convert(`alter_routine_priv` using utf8mb4), convert(`execute_priv` using utf8mb4), convert(`event_priv` using utf8mb4), convert(`trigger_priv` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`db` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `mysql`.`db` # TableParser:4573 12902 SHOW TABLES FROM `mysql` LIKE 'db' # TableParser:4588 12902 Table mysql db exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`db` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4444 12902 Table cols: `host`, `db`, `user`, `select_priv`, `insert_priv`, `update_priv`, `delete_priv`, `create_priv`, `drop_priv`, `grant_priv`, `references_priv`, `index_priv`, `alter_priv`, `create_tmp_table_priv`, `lock_tables_priv`, `create_view_priv`, `show_view_priv`, `create_routine_priv`, `alter_routine_priv`, `execute_priv`, `event_priv`, `trigger_priv` # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4612 12902 Parsed key: PRIMARY KEY (`host`,`db`,`user`), # TableParser:4632 12902 PRIMARY key cols: `host`, `db`, `user` # TableParser:4612 12902 Parsed key: KEY `user` (`user`) # TableParser:4632 12902 user key cols: `user` # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`db` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '4', # select_type => 'SIMPLE', # table => 'db', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 4 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `mysql` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`user` using utf8mb4), convert(`select_priv` using utf8mb4), convert(`insert_priv` using utf8mb4), convert(`update_priv` using utf8mb4), convert(`delete_priv` using utf8mb4), convert(`create_priv` using utf8mb4), convert(`drop_priv` using utf8mb4), convert(`grant_priv` using utf8mb4), convert(`references_priv` using utf8mb4), convert(`index_priv` using utf8mb4), convert(`alter_priv` using utf8mb4), convert(`create_tmp_table_priv` using utf8mb4), convert(`lock_tables_priv` using utf8mb4), convert(`create_view_priv` using utf8mb4), convert(`show_view_priv` using utf8mb4), convert(`create_routine_priv` using utf8mb4), convert(`alter_routine_priv` using utf8mb4), convert(`execute_priv` using utf8mb4), convert(`event_priv` using utf8mb4), convert(`trigger_priv` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`db` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`user` using utf8mb4), convert(`select_priv` using utf8mb4), convert(`insert_priv` using utf8mb4), convert(`update_priv` using utf8mb4), convert(`delete_priv` using utf8mb4), convert(`create_priv` using utf8mb4), convert(`drop_priv` using utf8mb4), convert(`grant_priv` using utf8mb4), convert(`references_priv` using utf8mb4), convert(`index_priv` using utf8mb4), convert(`alter_priv` using utf8mb4), convert(`create_tmp_table_priv` using utf8mb4), convert(`lock_tables_priv` using utf8mb4), convert(`create_view_priv` using utf8mb4), convert(`show_view_priv` using utf8mb4), convert(`create_routine_priv` using utf8mb4), convert(`alter_routine_priv` using utf8mb4), convert(`execute_priv` using utf8mb4), convert(`event_priv` using utf8mb4), convert(`trigger_priv` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`db` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '4', # select_type => 'SIMPLE', # table => 'db', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`user` using utf8mb4), convert(`select_priv` using utf8mb4), convert(`insert_priv` using utf8mb4), convert(`update_priv` using utf8mb4), convert(`delete_priv` using utf8mb4), convert(`create_priv` using utf8mb4), convert(`drop_priv` using utf8mb4), convert(`grant_priv` using utf8mb4), convert(`references_priv` using utf8mb4), convert(`index_priv` using utf8mb4), convert(`alter_priv` using utf8mb4), convert(`create_tmp_table_priv` using utf8mb4), convert(`lock_tables_priv` using utf8mb4), convert(`create_view_priv` using utf8mb4), convert(`show_view_priv` using utf8mb4), convert(`create_routine_priv` using utf8mb4), convert(`alter_routine_priv` using utf8mb4), convert(`execute_priv` using utf8mb4), convert(`event_priv` using utf8mb4), convert(`trigger_priv` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`db` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.00354290008544922 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # pt_table_checksum:10415 12902 Total avg rate: 1129 # WeightedAvgRate:8787 12902 Master op time: 4 n / 0.00354290008544922 s # WeightedAvgRate:8799 12902 Initial avg rate: 1129.01857335128 n/s # WeightedAvgRate:8803 12902 Adjust n to 564 # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='db' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='mysql' AND tbl='db') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`engine_cost` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `engine_name`, `device_type`, `cost_name`, `cost_value`, `last_update`, `comment` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`cost_name`,`engine_name`,`device_type`) # TableParser:4632 12902 PRIMARY key cols: `cost_name`, `engine_name`, `device_type` # TableParser:4654 12902 This key is the clustered key # SchemaIterator:7509 12902 Next schema object: mysql engine_cost # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', convert(`engine_name` using utf8mb4), `device_type`, convert(`cost_name` using utf8mb4), `cost_value`, UNIX_TIMESTAMP(`last_update`), convert(`comment` using utf8mb4), CONCAT(ISNULL(`cost_value`), ISNULL(`comment`)))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`engine_name` using utf8mb4), `device_type`, convert(`cost_name` using utf8mb4), `cost_value`, UNIX_TIMESTAMP(`last_update`), convert(`comment` using utf8mb4), CONCAT(ISNULL(`cost_value`), ISNULL(`comment`)))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`engine_cost` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '2', # select_type => 'SIMPLE', # table => 'engine_cost', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`engine_name` using utf8mb4), `device_type`, convert(`cost_name` using utf8mb4), `cost_value`, UNIX_TIMESTAMP(`last_update`), convert(`comment` using utf8mb4), CONCAT(ISNULL(`cost_value`), ISNULL(`comment`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`engine_cost` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`engine_name` using utf8mb4), `device_type`, convert(`cost_name` using utf8mb4), `cost_value`, UNIX_TIMESTAMP(`last_update`), convert(`comment` using utf8mb4), CONCAT(ISNULL(`cost_value`), ISNULL(`comment`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`engine_cost` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `mysql`.`engine_cost` # TableParser:4573 12902 SHOW TABLES FROM `mysql` LIKE 'engine\_cost' # TableParser:4588 12902 Table mysql engine_cost exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`engine_cost` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `engine_name`, `device_type`, `cost_name`, `cost_value`, `last_update`, `comment` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`cost_name`,`engine_name`,`device_type`) # TableParser:4632 12902 PRIMARY key cols: `cost_name`, `engine_name`, `device_type` # TableParser:4654 12902 This key is the clustered key # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`engine_cost` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '2', # select_type => 'SIMPLE', # table => 'engine_cost', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 2 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `mysql` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`engine_name` using utf8mb4), `device_type`, convert(`cost_name` using utf8mb4), `cost_value`, UNIX_TIMESTAMP(`last_update`), convert(`comment` using utf8mb4), CONCAT(ISNULL(`cost_value`), ISNULL(`comment`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`engine_cost` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`engine_name` using utf8mb4), `device_type`, convert(`cost_name` using utf8mb4), `cost_value`, UNIX_TIMESTAMP(`last_update`), convert(`comment` using utf8mb4), CONCAT(ISNULL(`cost_value`), ISNULL(`comment`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`engine_cost` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '2', # select_type => 'SIMPLE', # table => 'engine_cost', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`engine_name` using utf8mb4), `device_type`, convert(`cost_name` using utf8mb4), `cost_value`, UNIX_TIMESTAMP(`last_update`), convert(`comment` using utf8mb4), CONCAT(ISNULL(`cost_value`), ISNULL(`comment`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`engine_cost` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.00680708885192871 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # pt_table_checksum:10415 12902 Total avg rate: 579 # WeightedAvgRate:8787 12902 Master op time: 2 n / 0.00680708885192871 s # WeightedAvgRate:8799 12902 Initial avg rate: 293.81135511891 n/s # WeightedAvgRate:8803 12902 Adjust n to 146 # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='engine_cost' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='mysql' AND tbl='engine_cost') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`event` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4444 12902 Table cols: `db`, `name`, `body`, `definer`, `execute_at`, `interval_value`, `interval_field`, `created`, `modified`, `last_executed`, `starts`, `ends`, `status`, `on_completion`, `sql_mode`, `comment`, `originator`, `time_zone`, `character_set_client`, `collation_connection`, `db_collation`, `body_utf8` # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4612 12902 Parsed key: PRIMARY KEY (`db`,`name`) # TableParser:4632 12902 PRIMARY key cols: `db`, `name` # SchemaIterator:7509 12902 Next schema object: mysql event # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', convert(`db` using utf8mb4), convert(`name` using utf8mb4), CRC32(`body`), convert(`definer` using utf8mb4), `execute_at`, `interval_value`, convert(`interval_field` using utf8mb4), UNIX_TIMESTAMP(`created`), UNIX_TIMESTAMP(`modified`), `last_executed`, `starts`, `ends`, convert(`status` using utf8mb4), convert(`on_completion` using utf8mb4), convert(`sql_mode` using utf8mb4), convert(`comment` using utf8mb4), `originator`, convert(`time_zone` using utf8mb4), convert(`character_set_client` using utf8mb4), convert(`collation_connection` using utf8mb4), convert(`db_collation` using utf8mb4), CRC32(`body_utf8`), CONCAT(ISNULL(`execute_at`), ISNULL(`interval_value`), ISNULL(`interval_field`), ISNULL(`last_executed`), ISNULL(`starts`), ISNULL(`ends`), ISNULL(`character_set_client`), ISNULL(`collation_connection`), ISNULL(`db_collation`), ISNULL(`body_utf8`)))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`db` using utf8mb4), convert(`name` using utf8mb4), CRC32(`body`), convert(`definer` using utf8mb4), `execute_at`, `interval_value`, convert(`interval_field` using utf8mb4), UNIX_TIMESTAMP(`created`), UNIX_TIMESTAMP(`modified`), `last_executed`, `starts`, `ends`, convert(`status` using utf8mb4), convert(`on_completion` using utf8mb4), convert(`sql_mode` using utf8mb4), convert(`comment` using utf8mb4), `originator`, convert(`time_zone` using utf8mb4), convert(`character_set_client` using utf8mb4), convert(`collation_connection` using utf8mb4), convert(`db_collation` using utf8mb4), CRC32(`body_utf8`), CONCAT(ISNULL(`execute_at`), ISNULL(`interval_value`), ISNULL(`interval_field`), ISNULL(`last_executed`), ISNULL(`starts`), ISNULL(`ends`), ISNULL(`character_set_client`), ISNULL(`collation_connection`), ISNULL(`db_collation`), ISNULL(`body_utf8`)))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`event` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => 'no matching row in const table', # filtered => undef, # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => undef, # select_type => 'SIMPLE', # table => undef, # type => undef # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`db` using utf8mb4), convert(`name` using utf8mb4), CRC32(`body`), convert(`definer` using utf8mb4), `execute_at`, `interval_value`, convert(`interval_field` using utf8mb4), UNIX_TIMESTAMP(`created`), UNIX_TIMESTAMP(`modified`), `last_executed`, `starts`, `ends`, convert(`status` using utf8mb4), convert(`on_completion` using utf8mb4), convert(`sql_mode` using utf8mb4), convert(`comment` using utf8mb4), `originator`, convert(`time_zone` using utf8mb4), convert(`character_set_client` using utf8mb4), convert(`collation_connection` using utf8mb4), convert(`db_collation` using utf8mb4), CRC32(`body_utf8`), CONCAT(ISNULL(`execute_at`), ISNULL(`interval_value`), ISNULL(`interval_field`), ISNULL(`last_executed`), ISNULL(`starts`), ISNULL(`ends`), ISNULL(`character_set_client`), ISNULL(`collation_connection`), ISNULL(`db_collation`), ISNULL(`body_utf8`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`event` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`db` using utf8mb4), convert(`name` using utf8mb4), CRC32(`body`), convert(`definer` using utf8mb4), `execute_at`, `interval_value`, convert(`interval_field` using utf8mb4), UNIX_TIMESTAMP(`created`), UNIX_TIMESTAMP(`modified`), `last_executed`, `starts`, `ends`, convert(`status` using utf8mb4), convert(`on_completion` using utf8mb4), convert(`sql_mode` using utf8mb4), convert(`comment` using utf8mb4), `originator`, convert(`time_zone` using utf8mb4), convert(`character_set_client` using utf8mb4), convert(`collation_connection` using utf8mb4), convert(`db_collation` using utf8mb4), CRC32(`body_utf8`), CONCAT(ISNULL(`execute_at`), ISNULL(`interval_value`), ISNULL(`interval_field`), ISNULL(`last_executed`), ISNULL(`starts`), ISNULL(`ends`), ISNULL(`character_set_client`), ISNULL(`collation_connection`), ISNULL(`db_collation`), ISNULL(`body_utf8`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`event` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `mysql`.`event` # TableParser:4573 12902 SHOW TABLES FROM `mysql` LIKE 'event' # TableParser:4588 12902 Table mysql event exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`event` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4444 12902 Table cols: `db`, `name`, `body`, `definer`, `execute_at`, `interval_value`, `interval_field`, `created`, `modified`, `last_executed`, `starts`, `ends`, `status`, `on_completion`, `sql_mode`, `comment`, `originator`, `time_zone`, `character_set_client`, `collation_connection`, `db_collation`, `body_utf8` # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4612 12902 Parsed key: PRIMARY KEY (`db`,`name`) # TableParser:4632 12902 PRIMARY key cols: `db`, `name` # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`event` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => 'no matching row in const table', # filtered => undef, # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => undef, # select_type => 'SIMPLE', # table => undef, # type => undef # }; # # pt_table_checksum:10170 12902 Table on slave has 0 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `mysql` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`db` using utf8mb4), convert(`name` using utf8mb4), CRC32(`body`), convert(`definer` using utf8mb4), `execute_at`, `interval_value`, convert(`interval_field` using utf8mb4), UNIX_TIMESTAMP(`created`), UNIX_TIMESTAMP(`modified`), `last_executed`, `starts`, `ends`, convert(`status` using utf8mb4), convert(`on_completion` using utf8mb4), convert(`sql_mode` using utf8mb4), convert(`comment` using utf8mb4), `originator`, convert(`time_zone` using utf8mb4), convert(`character_set_client` using utf8mb4), convert(`collation_connection` using utf8mb4), convert(`db_collation` using utf8mb4), CRC32(`body_utf8`), CONCAT(ISNULL(`execute_at`), ISNULL(`interval_value`), ISNULL(`interval_field`), ISNULL(`last_executed`), ISNULL(`starts`), ISNULL(`ends`), ISNULL(`character_set_client`), ISNULL(`collation_connection`), ISNULL(`db_collation`), ISNULL(`body_utf8`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`event` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`db` using utf8mb4), convert(`name` using utf8mb4), CRC32(`body`), convert(`definer` using utf8mb4), `execute_at`, `interval_value`, convert(`interval_field` using utf8mb4), UNIX_TIMESTAMP(`created`), UNIX_TIMESTAMP(`modified`), `last_executed`, `starts`, `ends`, convert(`status` using utf8mb4), convert(`on_completion` using utf8mb4), convert(`sql_mode` using utf8mb4), convert(`comment` using utf8mb4), `originator`, convert(`time_zone` using utf8mb4), convert(`character_set_client` using utf8mb4), convert(`collation_connection` using utf8mb4), convert(`db_collation` using utf8mb4), CRC32(`body_utf8`), CONCAT(ISNULL(`execute_at`), ISNULL(`interval_value`), ISNULL(`interval_field`), ISNULL(`last_executed`), ISNULL(`starts`), ISNULL(`ends`), ISNULL(`character_set_client`), ISNULL(`collation_connection`), ISNULL(`db_collation`), ISNULL(`body_utf8`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`event` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => 'no matching row in const table', # filtered => undef, # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => undef, # select_type => 'SIMPLE', # table => undef, # type => undef # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`db` using utf8mb4), convert(`name` using utf8mb4), CRC32(`body`), convert(`definer` using utf8mb4), `execute_at`, `interval_value`, convert(`interval_field` using utf8mb4), UNIX_TIMESTAMP(`created`), UNIX_TIMESTAMP(`modified`), `last_executed`, `starts`, `ends`, convert(`status` using utf8mb4), convert(`on_completion` using utf8mb4), convert(`sql_mode` using utf8mb4), convert(`comment` using utf8mb4), `originator`, convert(`time_zone` using utf8mb4), convert(`character_set_client` using utf8mb4), convert(`collation_connection` using utf8mb4), convert(`db_collation` using utf8mb4), CRC32(`body_utf8`), CONCAT(ISNULL(`execute_at`), ISNULL(`interval_value`), ISNULL(`interval_field`), ISNULL(`last_executed`), ISNULL(`starts`), ISNULL(`ends`), ISNULL(`character_set_client`), ISNULL(`collation_connection`), ISNULL(`db_collation`), ISNULL(`body_utf8`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`event` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.0276961326599121 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='event' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='mysql' AND tbl='event') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`func` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4444 12902 Table cols: `name`, `ret`, `dl`, `type` # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4612 12902 Parsed key: PRIMARY KEY (`name`) # TableParser:4632 12902 PRIMARY key cols: `name` # SchemaIterator:7509 12902 Next schema object: mysql func # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', convert(`name` using utf8mb4), `ret`, convert(`dl` using utf8mb4), convert(`type` using utf8mb4))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`name` using utf8mb4), `ret`, convert(`dl` using utf8mb4), convert(`type` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`func` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => 'no matching row in const table', # filtered => undef, # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => undef, # select_type => 'SIMPLE', # table => undef, # type => undef # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`name` using utf8mb4), `ret`, convert(`dl` using utf8mb4), convert(`type` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`func` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`name` using utf8mb4), `ret`, convert(`dl` using utf8mb4), convert(`type` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`func` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `mysql`.`func` # TableParser:4573 12902 SHOW TABLES FROM `mysql` LIKE 'func' # TableParser:4588 12902 Table mysql func exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`func` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4444 12902 Table cols: `name`, `ret`, `dl`, `type` # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4612 12902 Parsed key: PRIMARY KEY (`name`) # TableParser:4632 12902 PRIMARY key cols: `name` # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`func` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => 'no matching row in const table', # filtered => undef, # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => undef, # select_type => 'SIMPLE', # table => undef, # type => undef # }; # # pt_table_checksum:10170 12902 Table on slave has 0 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `mysql` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`name` using utf8mb4), `ret`, convert(`dl` using utf8mb4), convert(`type` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`func` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`name` using utf8mb4), `ret`, convert(`dl` using utf8mb4), convert(`type` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`func` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => 'no matching row in const table', # filtered => undef, # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => undef, # select_type => 'SIMPLE', # table => undef, # type => undef # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`name` using utf8mb4), `ret`, convert(`dl` using utf8mb4), convert(`type` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`func` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.00313091278076172 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='func' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='mysql' AND tbl='func') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`help_category` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `help_category_id`, `name`, `parent_category_id`, `url` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`help_category_id`), # TableParser:4632 12902 PRIMARY key cols: `help_category_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: UNIQUE KEY `name` (`name`) # TableParser:4632 12902 name key cols: `name` # SchemaIterator:7509 12902 Next schema object: mysql help_category # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', `help_category_id`, convert(`name` using utf8mb4), `parent_category_id`, CRC32(`url`), CONCAT(ISNULL(`parent_category_id`)))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_category_id`, convert(`name` using utf8mb4), `parent_category_id`, CRC32(`url`), CONCAT(ISNULL(`parent_category_id`)))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`help_category` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '40', # select_type => 'SIMPLE', # table => 'help_category', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY, name # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_category_id`, convert(`name` using utf8mb4), `parent_category_id`, CRC32(`url`), CONCAT(ISNULL(`parent_category_id`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`help_category` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_category_id`, convert(`name` using utf8mb4), `parent_category_id`, CRC32(`url`), CONCAT(ISNULL(`parent_category_id`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`help_category` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `mysql`.`help_category` # TableParser:4573 12902 SHOW TABLES FROM `mysql` LIKE 'help\_category' # TableParser:4588 12902 Table mysql help_category exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`help_category` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `help_category_id`, `name`, `parent_category_id`, `url` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`help_category_id`), # TableParser:4632 12902 PRIMARY key cols: `help_category_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: UNIQUE KEY `name` (`name`) # TableParser:4632 12902 name key cols: `name` # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`help_category` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '40', # select_type => 'SIMPLE', # table => 'help_category', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 40 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `mysql` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_category_id`, convert(`name` using utf8mb4), `parent_category_id`, CRC32(`url`), CONCAT(ISNULL(`parent_category_id`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`help_category` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_category_id`, convert(`name` using utf8mb4), `parent_category_id`, CRC32(`url`), CONCAT(ISNULL(`parent_category_id`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`help_category` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '40', # select_type => 'SIMPLE', # table => 'help_category', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_category_id`, convert(`name` using utf8mb4), `parent_category_id`, CRC32(`url`), CONCAT(ISNULL(`parent_category_id`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`help_category` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.0182480812072754 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # pt_table_checksum:10415 12902 Total avg rate: 1608 # WeightedAvgRate:8787 12902 Master op time: 40 n / 0.0182480812072754 s # WeightedAvgRate:8799 12902 Initial avg rate: 2192.01128851028 n/s # WeightedAvgRate:8803 12902 Adjust n to 1096 # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='help_category' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='mysql' AND tbl='help_category') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`help_keyword` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `help_keyword_id`, `name` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`help_keyword_id`), # TableParser:4632 12902 PRIMARY key cols: `help_keyword_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: UNIQUE KEY `name` (`name`) # TableParser:4632 12902 name key cols: `name` # SchemaIterator:7509 12902 Next schema object: mysql help_keyword # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', `help_keyword_id`, convert(`name` using utf8mb4))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_keyword_id`, convert(`name` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`help_keyword` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => 'Using index', # filtered => '100.00', # id => '1', # key => 'name', # key_len => '192', # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '498', # select_type => 'SIMPLE', # table => 'help_keyword', # type => 'index' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY, name # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_keyword_id`, convert(`name` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`help_keyword` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_keyword_id`, convert(`name` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`help_keyword` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `mysql`.`help_keyword` # TableParser:4573 12902 SHOW TABLES FROM `mysql` LIKE 'help\_keyword' # TableParser:4588 12902 Table mysql help_keyword exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`help_keyword` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `help_keyword_id`, `name` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`help_keyword_id`), # TableParser:4632 12902 PRIMARY key cols: `help_keyword_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: UNIQUE KEY `name` (`name`) # TableParser:4632 12902 name key cols: `name` # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`help_keyword` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => 'Using index', # filtered => '100.00', # id => '1', # key => 'name', # key_len => '192', # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '557', # select_type => 'SIMPLE', # table => 'help_keyword', # type => 'index' # }; # # pt_table_checksum:10170 12902 Table on slave has 557 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `mysql` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_keyword_id`, convert(`name` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`help_keyword` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_keyword_id`, convert(`name` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`help_keyword` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => 'Using index', # filtered => '100.00', # id => '1', # key => 'name', # key_len => '192', # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '498', # select_type => 'SIMPLE', # table => 'help_keyword', # type => 'index' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_keyword_id`, convert(`name` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`help_keyword` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.00370597839355469 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # pt_table_checksum:10415 12902 Total avg rate: 16437 # WeightedAvgRate:8787 12902 Master op time: 485 n / 0.00370597839355469 s # WeightedAvgRate:8799 12902 Initial avg rate: 130869.624292331 n/s # WeightedAvgRate:8803 12902 Adjust n to 65434 # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='help_keyword' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='mysql' AND tbl='help_keyword') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`help_relation` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `help_topic_id`, `help_keyword_id` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`help_keyword_id`,`help_topic_id`) # TableParser:4632 12902 PRIMARY key cols: `help_keyword_id`, `help_topic_id` # TableParser:4654 12902 This key is the clustered key # SchemaIterator:7509 12902 Next schema object: mysql help_relation # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', `help_topic_id`, `help_keyword_id`)) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_topic_id`, `help_keyword_id`)) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`help_relation` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => 'Using index', # filtered => '100.00', # id => '1', # key => 'PRIMARY', # key_len => '8', # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '952', # select_type => 'SIMPLE', # table => 'help_relation', # type => 'index' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_topic_id`, `help_keyword_id`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`help_relation` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_topic_id`, `help_keyword_id`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`help_relation` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `mysql`.`help_relation` # TableParser:4573 12902 SHOW TABLES FROM `mysql` LIKE 'help\_relation' # TableParser:4588 12902 Table mysql help_relation exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`help_relation` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `help_topic_id`, `help_keyword_id` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`help_keyword_id`,`help_topic_id`) # TableParser:4632 12902 PRIMARY key cols: `help_keyword_id`, `help_topic_id` # TableParser:4654 12902 This key is the clustered key # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`help_relation` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => 'Using index', # filtered => '100.00', # id => '1', # key => 'PRIMARY', # key_len => '8', # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '740', # select_type => 'SIMPLE', # table => 'help_relation', # type => 'index' # }; # # pt_table_checksum:10170 12902 Table on slave has 740 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `mysql` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_topic_id`, `help_keyword_id`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`help_relation` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_topic_id`, `help_keyword_id`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`help_relation` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => 'Using index', # filtered => '100.00', # id => '1', # key => 'PRIMARY', # key_len => '8', # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '952', # select_type => 'SIMPLE', # table => 'help_relation', # type => 'index' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_topic_id`, `help_keyword_id`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`help_relation` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.00442314147949219 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # pt_table_checksum:10415 12902 Total avg rate: 44136 # WeightedAvgRate:8787 12902 Master op time: 1090 n / 0.00442314147949219 s # WeightedAvgRate:8799 12902 Initial avg rate: 246431.185855972 n/s # WeightedAvgRate:8803 12902 Adjust n to 123215 # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='help_relation' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='mysql' AND tbl='help_relation') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`help_topic` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `help_topic_id`, `name`, `help_category_id`, `description`, `example`, `url` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`help_topic_id`), # TableParser:4632 12902 PRIMARY key cols: `help_topic_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: UNIQUE KEY `name` (`name`) # TableParser:4632 12902 name key cols: `name` # SchemaIterator:7509 12902 Next schema object: mysql help_topic # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', `help_topic_id`, convert(`name` using utf8mb4), `help_category_id`, CRC32(`description`), CRC32(`example`), CRC32(`url`))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_topic_id`, convert(`name` using utf8mb4), `help_category_id`, CRC32(`description`), CRC32(`example`), CRC32(`url`))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`help_topic` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '503', # select_type => 'SIMPLE', # table => 'help_topic', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY, name # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_topic_id`, convert(`name` using utf8mb4), `help_category_id`, CRC32(`description`), CRC32(`example`), CRC32(`url`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`help_topic` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_topic_id`, convert(`name` using utf8mb4), `help_category_id`, CRC32(`description`), CRC32(`example`), CRC32(`url`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`help_topic` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `mysql`.`help_topic` # TableParser:4573 12902 SHOW TABLES FROM `mysql` LIKE 'help\_topic' # TableParser:4588 12902 Table mysql help_topic exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`help_topic` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `help_topic_id`, `name`, `help_category_id`, `description`, `example`, `url` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`help_topic_id`), # TableParser:4632 12902 PRIMARY key cols: `help_topic_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: UNIQUE KEY `name` (`name`) # TableParser:4632 12902 name key cols: `name` # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`help_topic` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '438', # select_type => 'SIMPLE', # table => 'help_topic', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 438 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `mysql` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_topic_id`, convert(`name` using utf8mb4), `help_category_id`, CRC32(`description`), CRC32(`example`), CRC32(`url`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`help_topic` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_topic_id`, convert(`name` using utf8mb4), `help_category_id`, CRC32(`description`), CRC32(`example`), CRC32(`url`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`help_topic` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '503', # select_type => 'SIMPLE', # table => 'help_topic', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_topic_id`, convert(`name` using utf8mb4), `help_category_id`, CRC32(`description`), CRC32(`example`), CRC32(`url`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`help_topic` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.00666594505310059 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # pt_table_checksum:10415 12902 Total avg rate: 49639 # WeightedAvgRate:8787 12902 Master op time: 533 n / 0.00666594505310059 s # WeightedAvgRate:8799 12902 Initial avg rate: 79958.6548875139 n/s # WeightedAvgRate:8803 12902 Adjust n to 39979 # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='help_topic' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='mysql' AND tbl='help_topic') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`ndb_binlog_index` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4444 12902 Table cols: `position`, `file`, `epoch`, `inserts`, `updates`, `deletes`, `schemaops`, `orig_server_id`, `orig_epoch`, `gci`, `next_position`, `next_file` # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4612 12902 Parsed key: PRIMARY KEY (`epoch`,`orig_server_id`,`orig_epoch`) # TableParser:4632 12902 PRIMARY key cols: `epoch`, `orig_server_id`, `orig_epoch` # SchemaIterator:7509 12902 Next schema object: mysql ndb_binlog_index # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', `position`, convert(`file` using utf8mb4), `epoch`, `inserts`, `updates`, `deletes`, `schemaops`, `orig_server_id`, `orig_epoch`, `gci`, `next_position`, convert(`next_file` using utf8mb4))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `position`, convert(`file` using utf8mb4), `epoch`, `inserts`, `updates`, `deletes`, `schemaops`, `orig_server_id`, `orig_epoch`, `gci`, `next_position`, convert(`next_file` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`ndb_binlog_index` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => 'no matching row in const table', # filtered => undef, # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => undef, # select_type => 'SIMPLE', # table => undef, # type => undef # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `position`, convert(`file` using utf8mb4), `epoch`, `inserts`, `updates`, `deletes`, `schemaops`, `orig_server_id`, `orig_epoch`, `gci`, `next_position`, convert(`next_file` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`ndb_binlog_index` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `position`, convert(`file` using utf8mb4), `epoch`, `inserts`, `updates`, `deletes`, `schemaops`, `orig_server_id`, `orig_epoch`, `gci`, `next_position`, convert(`next_file` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`ndb_binlog_index` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `mysql`.`ndb_binlog_index` # TableParser:4573 12902 SHOW TABLES FROM `mysql` LIKE 'ndb\_binlog\_index' # TableParser:4588 12902 Table mysql ndb_binlog_index exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`ndb_binlog_index` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4444 12902 Table cols: `position`, `file`, `epoch`, `inserts`, `updates`, `deletes`, `schemaops`, `orig_server_id`, `orig_epoch`, `gci`, `next_position`, `next_file` # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4612 12902 Parsed key: PRIMARY KEY (`epoch`,`orig_server_id`,`orig_epoch`) # TableParser:4632 12902 PRIMARY key cols: `epoch`, `orig_server_id`, `orig_epoch` # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`ndb_binlog_index` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => 'no matching row in const table', # filtered => undef, # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => undef, # select_type => 'SIMPLE', # table => undef, # type => undef # }; # # pt_table_checksum:10170 12902 Table on slave has 0 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `mysql` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `position`, convert(`file` using utf8mb4), `epoch`, `inserts`, `updates`, `deletes`, `schemaops`, `orig_server_id`, `orig_epoch`, `gci`, `next_position`, convert(`next_file` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`ndb_binlog_index` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `position`, convert(`file` using utf8mb4), `epoch`, `inserts`, `updates`, `deletes`, `schemaops`, `orig_server_id`, `orig_epoch`, `gci`, `next_position`, convert(`next_file` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`ndb_binlog_index` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => 'no matching row in const table', # filtered => undef, # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => undef, # select_type => 'SIMPLE', # table => undef, # type => undef # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `position`, convert(`file` using utf8mb4), `epoch`, `inserts`, `updates`, `deletes`, `schemaops`, `orig_server_id`, `orig_epoch`, `gci`, `next_position`, convert(`next_file` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`ndb_binlog_index` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.0031580924987793 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='ndb_binlog_index' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='mysql' AND tbl='ndb_binlog_index') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`plugin` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `name`, `dl` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`name`) # TableParser:4632 12902 PRIMARY key cols: `name` # TableParser:4654 12902 This key is the clustered key # SchemaIterator:7509 12902 Next schema object: mysql plugin # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', convert(`name` using utf8mb4), convert(`dl` using utf8mb4))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`name` using utf8mb4), convert(`dl` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`plugin` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1', # select_type => 'SIMPLE', # table => 'plugin', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`name` using utf8mb4), convert(`dl` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`plugin` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`name` using utf8mb4), convert(`dl` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`plugin` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `mysql`.`plugin` # TableParser:4573 12902 SHOW TABLES FROM `mysql` LIKE 'plugin' # TableParser:4588 12902 Table mysql plugin exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`plugin` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `name`, `dl` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`name`) # TableParser:4632 12902 PRIMARY key cols: `name` # TableParser:4654 12902 This key is the clustered key # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`plugin` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1', # select_type => 'SIMPLE', # table => 'plugin', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 1 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `mysql` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`name` using utf8mb4), convert(`dl` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`plugin` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`name` using utf8mb4), convert(`dl` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`plugin` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1', # select_type => 'SIMPLE', # table => 'plugin', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`name` using utf8mb4), convert(`dl` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`plugin` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.00311088562011719 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='plugin' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='mysql' AND tbl='plugin') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`proc` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4444 12902 Table cols: `db`, `name`, `type`, `specific_name`, `language`, `sql_data_access`, `is_deterministic`, `security_type`, `param_list`, `returns`, `body`, `definer`, `created`, `modified`, `sql_mode`, `comment`, `character_set_client`, `collation_connection`, `db_collation`, `body_utf8` # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4612 12902 Parsed key: PRIMARY KEY (`db`,`name`,`type`) # TableParser:4632 12902 PRIMARY key cols: `db`, `name`, `type` # SchemaIterator:7509 12902 Next schema object: mysql proc # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', convert(`db` using utf8mb4), convert(`name` using utf8mb4), convert(`type` using utf8mb4), convert(`specific_name` using utf8mb4), convert(`language` using utf8mb4), convert(`sql_data_access` using utf8mb4), convert(`is_deterministic` using utf8mb4), convert(`security_type` using utf8mb4), CRC32(`param_list`), CRC32(`returns`), CRC32(`body`), convert(`definer` using utf8mb4), UNIX_TIMESTAMP(`created`), UNIX_TIMESTAMP(`modified`), convert(`sql_mode` using utf8mb4), CRC32(`comment`), convert(`character_set_client` using utf8mb4), convert(`collation_connection` using utf8mb4), convert(`db_collation` using utf8mb4), CRC32(`body_utf8`), CONCAT(ISNULL(`character_set_client`), ISNULL(`collation_connection`), ISNULL(`db_collation`), ISNULL(`body_utf8`)))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`db` using utf8mb4), convert(`name` using utf8mb4), convert(`type` using utf8mb4), convert(`specific_name` using utf8mb4), convert(`language` using utf8mb4), convert(`sql_data_access` using utf8mb4), convert(`is_deterministic` using utf8mb4), convert(`security_type` using utf8mb4), CRC32(`param_list`), CRC32(`returns`), CRC32(`body`), convert(`definer` using utf8mb4), UNIX_TIMESTAMP(`created`), UNIX_TIMESTAMP(`modified`), convert(`sql_mode` using utf8mb4), CRC32(`comment`), convert(`character_set_client` using utf8mb4), convert(`collation_connection` using utf8mb4), convert(`db_collation` using utf8mb4), CRC32(`body_utf8`), CONCAT(ISNULL(`character_set_client`), ISNULL(`collation_connection`), ISNULL(`db_collation`), ISNULL(`body_utf8`)))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`proc` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '54', # select_type => 'SIMPLE', # table => 'proc', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`db` using utf8mb4), convert(`name` using utf8mb4), convert(`type` using utf8mb4), convert(`specific_name` using utf8mb4), convert(`language` using utf8mb4), convert(`sql_data_access` using utf8mb4), convert(`is_deterministic` using utf8mb4), convert(`security_type` using utf8mb4), CRC32(`param_list`), CRC32(`returns`), CRC32(`body`), convert(`definer` using utf8mb4), UNIX_TIMESTAMP(`created`), UNIX_TIMESTAMP(`modified`), convert(`sql_mode` using utf8mb4), CRC32(`comment`), convert(`character_set_client` using utf8mb4), convert(`collation_connection` using utf8mb4), convert(`db_collation` using utf8mb4), CRC32(`body_utf8`), CONCAT(ISNULL(`character_set_client`), ISNULL(`collation_connection`), ISNULL(`db_collation`), ISNULL(`body_utf8`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`proc` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`db` using utf8mb4), convert(`name` using utf8mb4), convert(`type` using utf8mb4), convert(`specific_name` using utf8mb4), convert(`language` using utf8mb4), convert(`sql_data_access` using utf8mb4), convert(`is_deterministic` using utf8mb4), convert(`security_type` using utf8mb4), CRC32(`param_list`), CRC32(`returns`), CRC32(`body`), convert(`definer` using utf8mb4), UNIX_TIMESTAMP(`created`), UNIX_TIMESTAMP(`modified`), convert(`sql_mode` using utf8mb4), CRC32(`comment`), convert(`character_set_client` using utf8mb4), convert(`collation_connection` using utf8mb4), convert(`db_collation` using utf8mb4), CRC32(`body_utf8`), CONCAT(ISNULL(`character_set_client`), ISNULL(`collation_connection`), ISNULL(`db_collation`), ISNULL(`body_utf8`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`proc` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `mysql`.`proc` # TableParser:4573 12902 SHOW TABLES FROM `mysql` LIKE 'proc' # TableParser:4588 12902 Table mysql proc exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`proc` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4444 12902 Table cols: `db`, `name`, `type`, `specific_name`, `language`, `sql_data_access`, `is_deterministic`, `security_type`, `param_list`, `returns`, `body`, `definer`, `created`, `modified`, `sql_mode`, `comment`, `character_set_client`, `collation_connection`, `db_collation`, `body_utf8` # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4612 12902 Parsed key: PRIMARY KEY (`db`,`name`,`type`) # TableParser:4632 12902 PRIMARY key cols: `db`, `name`, `type` # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`proc` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '54', # select_type => 'SIMPLE', # table => 'proc', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 54 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `mysql` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`db` using utf8mb4), convert(`name` using utf8mb4), convert(`type` using utf8mb4), convert(`specific_name` using utf8mb4), convert(`language` using utf8mb4), convert(`sql_data_access` using utf8mb4), convert(`is_deterministic` using utf8mb4), convert(`security_type` using utf8mb4), CRC32(`param_list`), CRC32(`returns`), CRC32(`body`), convert(`definer` using utf8mb4), UNIX_TIMESTAMP(`created`), UNIX_TIMESTAMP(`modified`), convert(`sql_mode` using utf8mb4), CRC32(`comment`), convert(`character_set_client` using utf8mb4), convert(`collation_connection` using utf8mb4), convert(`db_collation` using utf8mb4), CRC32(`body_utf8`), CONCAT(ISNULL(`character_set_client`), ISNULL(`collation_connection`), ISNULL(`db_collation`), ISNULL(`body_utf8`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`proc` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`db` using utf8mb4), convert(`name` using utf8mb4), convert(`type` using utf8mb4), convert(`specific_name` using utf8mb4), convert(`language` using utf8mb4), convert(`sql_data_access` using utf8mb4), convert(`is_deterministic` using utf8mb4), convert(`security_type` using utf8mb4), CRC32(`param_list`), CRC32(`returns`), CRC32(`body`), convert(`definer` using utf8mb4), UNIX_TIMESTAMP(`created`), UNIX_TIMESTAMP(`modified`), convert(`sql_mode` using utf8mb4), CRC32(`comment`), convert(`character_set_client` using utf8mb4), convert(`collation_connection` using utf8mb4), convert(`db_collation` using utf8mb4), CRC32(`body_utf8`), CONCAT(ISNULL(`character_set_client`), ISNULL(`collation_connection`), ISNULL(`db_collation`), ISNULL(`body_utf8`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`proc` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '54', # select_type => 'SIMPLE', # table => 'proc', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`db` using utf8mb4), convert(`name` using utf8mb4), convert(`type` using utf8mb4), convert(`specific_name` using utf8mb4), convert(`language` using utf8mb4), convert(`sql_data_access` using utf8mb4), convert(`is_deterministic` using utf8mb4), convert(`security_type` using utf8mb4), CRC32(`param_list`), CRC32(`returns`), CRC32(`body`), convert(`definer` using utf8mb4), UNIX_TIMESTAMP(`created`), UNIX_TIMESTAMP(`modified`), convert(`sql_mode` using utf8mb4), CRC32(`comment`), convert(`character_set_client` using utf8mb4), convert(`collation_connection` using utf8mb4), convert(`db_collation` using utf8mb4), CRC32(`body_utf8`), CONCAT(ISNULL(`character_set_client`), ISNULL(`collation_connection`), ISNULL(`db_collation`), ISNULL(`body_utf8`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`proc` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.0333571434020996 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # pt_table_checksum:10415 12902 Total avg rate: 28768 # WeightedAvgRate:8787 12902 Master op time: 54 n / 0.0333571434020996 s # WeightedAvgRate:8799 12902 Initial avg rate: 1618.84365663641 n/s # WeightedAvgRate:8803 12902 Adjust n to 809 # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='proc' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='mysql' AND tbl='proc') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`procs_priv` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4444 12902 Table cols: `host`, `db`, `user`, `routine_name`, `routine_type`, `grantor`, `proc_priv`, `timestamp` # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4612 12902 Parsed key: PRIMARY KEY (`host`,`db`,`user`,`routine_name`,`routine_type`), # TableParser:4632 12902 PRIMARY key cols: `host`, `db`, `user`, `routine_name`, `routine_type` # TableParser:4612 12902 Parsed key: KEY `grantor` (`grantor`) # TableParser:4632 12902 grantor key cols: `grantor` # SchemaIterator:7509 12902 Next schema object: mysql procs_priv # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`user` using utf8mb4), convert(`routine_name` using utf8mb4), convert(`routine_type` using utf8mb4), convert(`grantor` using utf8mb4), convert(`proc_priv` using utf8mb4), UNIX_TIMESTAMP(`timestamp`))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`user` using utf8mb4), convert(`routine_name` using utf8mb4), convert(`routine_type` using utf8mb4), convert(`grantor` using utf8mb4), convert(`proc_priv` using utf8mb4), UNIX_TIMESTAMP(`timestamp`))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`procs_priv` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => 'no matching row in const table', # filtered => undef, # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => undef, # select_type => 'SIMPLE', # table => undef, # type => undef # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY, grantor # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`user` using utf8mb4), convert(`routine_name` using utf8mb4), convert(`routine_type` using utf8mb4), convert(`grantor` using utf8mb4), convert(`proc_priv` using utf8mb4), UNIX_TIMESTAMP(`timestamp`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`procs_priv` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`user` using utf8mb4), convert(`routine_name` using utf8mb4), convert(`routine_type` using utf8mb4), convert(`grantor` using utf8mb4), convert(`proc_priv` using utf8mb4), UNIX_TIMESTAMP(`timestamp`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`procs_priv` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `mysql`.`procs_priv` # TableParser:4573 12902 SHOW TABLES FROM `mysql` LIKE 'procs\_priv' # TableParser:4588 12902 Table mysql procs_priv exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`procs_priv` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4444 12902 Table cols: `host`, `db`, `user`, `routine_name`, `routine_type`, `grantor`, `proc_priv`, `timestamp` # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4612 12902 Parsed key: PRIMARY KEY (`host`,`db`,`user`,`routine_name`,`routine_type`), # TableParser:4632 12902 PRIMARY key cols: `host`, `db`, `user`, `routine_name`, `routine_type` # TableParser:4612 12902 Parsed key: KEY `grantor` (`grantor`) # TableParser:4632 12902 grantor key cols: `grantor` # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`procs_priv` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => 'no matching row in const table', # filtered => undef, # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => undef, # select_type => 'SIMPLE', # table => undef, # type => undef # }; # # pt_table_checksum:10170 12902 Table on slave has 0 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `mysql` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`user` using utf8mb4), convert(`routine_name` using utf8mb4), convert(`routine_type` using utf8mb4), convert(`grantor` using utf8mb4), convert(`proc_priv` using utf8mb4), UNIX_TIMESTAMP(`timestamp`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`procs_priv` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`user` using utf8mb4), convert(`routine_name` using utf8mb4), convert(`routine_type` using utf8mb4), convert(`grantor` using utf8mb4), convert(`proc_priv` using utf8mb4), UNIX_TIMESTAMP(`timestamp`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`procs_priv` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => 'no matching row in const table', # filtered => undef, # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => undef, # select_type => 'SIMPLE', # table => undef, # type => undef # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`user` using utf8mb4), convert(`routine_name` using utf8mb4), convert(`routine_type` using utf8mb4), convert(`grantor` using utf8mb4), convert(`proc_priv` using utf8mb4), UNIX_TIMESTAMP(`timestamp`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`procs_priv` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.00332403182983398 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='procs_priv' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='mysql' AND tbl='procs_priv') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`proxies_priv` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4444 12902 Table cols: `host`, `user`, `proxied_host`, `proxied_user`, `with_grant`, `grantor`, `timestamp` # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4612 12902 Parsed key: PRIMARY KEY (`host`,`user`,`proxied_host`,`proxied_user`), # TableParser:4632 12902 PRIMARY key cols: `host`, `user`, `proxied_host`, `proxied_user` # TableParser:4612 12902 Parsed key: KEY `grantor` (`grantor`) # TableParser:4632 12902 grantor key cols: `grantor` # SchemaIterator:7509 12902 Next schema object: mysql proxies_priv # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`user` using utf8mb4), convert(`proxied_host` using utf8mb4), convert(`proxied_user` using utf8mb4), `with_grant`, convert(`grantor` using utf8mb4), UNIX_TIMESTAMP(`timestamp`))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`user` using utf8mb4), convert(`proxied_host` using utf8mb4), convert(`proxied_user` using utf8mb4), `with_grant`, convert(`grantor` using utf8mb4), UNIX_TIMESTAMP(`timestamp`))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`proxies_priv` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1', # select_type => 'SIMPLE', # table => 'proxies_priv', # type => 'system' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY, grantor # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`user` using utf8mb4), convert(`proxied_host` using utf8mb4), convert(`proxied_user` using utf8mb4), `with_grant`, convert(`grantor` using utf8mb4), UNIX_TIMESTAMP(`timestamp`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`proxies_priv` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`user` using utf8mb4), convert(`proxied_host` using utf8mb4), convert(`proxied_user` using utf8mb4), `with_grant`, convert(`grantor` using utf8mb4), UNIX_TIMESTAMP(`timestamp`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`proxies_priv` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `mysql`.`proxies_priv` # TableParser:4573 12902 SHOW TABLES FROM `mysql` LIKE 'proxies\_priv' # TableParser:4588 12902 Table mysql proxies_priv exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`proxies_priv` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4444 12902 Table cols: `host`, `user`, `proxied_host`, `proxied_user`, `with_grant`, `grantor`, `timestamp` # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4612 12902 Parsed key: PRIMARY KEY (`host`,`user`,`proxied_host`,`proxied_user`), # TableParser:4632 12902 PRIMARY key cols: `host`, `user`, `proxied_host`, `proxied_user` # TableParser:4612 12902 Parsed key: KEY `grantor` (`grantor`) # TableParser:4632 12902 grantor key cols: `grantor` # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`proxies_priv` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1', # select_type => 'SIMPLE', # table => 'proxies_priv', # type => 'system' # }; # # pt_table_checksum:10170 12902 Table on slave has 1 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `mysql` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`user` using utf8mb4), convert(`proxied_host` using utf8mb4), convert(`proxied_user` using utf8mb4), `with_grant`, convert(`grantor` using utf8mb4), UNIX_TIMESTAMP(`timestamp`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`proxies_priv` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`user` using utf8mb4), convert(`proxied_host` using utf8mb4), convert(`proxied_user` using utf8mb4), `with_grant`, convert(`grantor` using utf8mb4), UNIX_TIMESTAMP(`timestamp`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`proxies_priv` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1', # select_type => 'SIMPLE', # table => 'proxies_priv', # type => 'system' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`user` using utf8mb4), convert(`proxied_host` using utf8mb4), convert(`proxied_user` using utf8mb4), `with_grant`, convert(`grantor` using utf8mb4), UNIX_TIMESTAMP(`timestamp`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`proxies_priv` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.0397930145263672 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # pt_table_checksum:10415 12902 Total avg rate: 18954 # WeightedAvgRate:8787 12902 Master op time: 1 n / 0.0397930145263672 s # WeightedAvgRate:8799 12902 Initial avg rate: 25.1300388247136 n/s # WeightedAvgRate:8803 12902 Adjust n to 12 # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='proxies_priv' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='mysql' AND tbl='proxies_priv') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`server_cost` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `cost_name`, `cost_value`, `last_update`, `comment` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`cost_name`) # TableParser:4632 12902 PRIMARY key cols: `cost_name` # TableParser:4654 12902 This key is the clustered key # SchemaIterator:7509 12902 Next schema object: mysql server_cost # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', convert(`cost_name` using utf8mb4), `cost_value`, UNIX_TIMESTAMP(`last_update`), convert(`comment` using utf8mb4), CONCAT(ISNULL(`cost_value`), ISNULL(`comment`)))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`cost_name` using utf8mb4), `cost_value`, UNIX_TIMESTAMP(`last_update`), convert(`comment` using utf8mb4), CONCAT(ISNULL(`cost_value`), ISNULL(`comment`)))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`server_cost` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '6', # select_type => 'SIMPLE', # table => 'server_cost', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`cost_name` using utf8mb4), `cost_value`, UNIX_TIMESTAMP(`last_update`), convert(`comment` using utf8mb4), CONCAT(ISNULL(`cost_value`), ISNULL(`comment`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`server_cost` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`cost_name` using utf8mb4), `cost_value`, UNIX_TIMESTAMP(`last_update`), convert(`comment` using utf8mb4), CONCAT(ISNULL(`cost_value`), ISNULL(`comment`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`server_cost` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `mysql`.`server_cost` # TableParser:4573 12902 SHOW TABLES FROM `mysql` LIKE 'server\_cost' # TableParser:4588 12902 Table mysql server_cost exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`server_cost` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `cost_name`, `cost_value`, `last_update`, `comment` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`cost_name`) # TableParser:4632 12902 PRIMARY key cols: `cost_name` # TableParser:4654 12902 This key is the clustered key # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`server_cost` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '6', # select_type => 'SIMPLE', # table => 'server_cost', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 6 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `mysql` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`cost_name` using utf8mb4), `cost_value`, UNIX_TIMESTAMP(`last_update`), convert(`comment` using utf8mb4), CONCAT(ISNULL(`cost_value`), ISNULL(`comment`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`server_cost` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`cost_name` using utf8mb4), `cost_value`, UNIX_TIMESTAMP(`last_update`), convert(`comment` using utf8mb4), CONCAT(ISNULL(`cost_value`), ISNULL(`comment`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`server_cost` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '6', # select_type => 'SIMPLE', # table => 'server_cost', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`cost_name` using utf8mb4), `cost_value`, UNIX_TIMESTAMP(`last_update`), convert(`comment` using utf8mb4), CONCAT(ISNULL(`cost_value`), ISNULL(`comment`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`server_cost` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.00306105613708496 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # pt_table_checksum:10415 12902 Total avg rate: 18519 # WeightedAvgRate:8787 12902 Master op time: 6 n / 0.00306105613708496 s # WeightedAvgRate:8799 12902 Initial avg rate: 1960.10779655736 n/s # WeightedAvgRate:8803 12902 Adjust n to 980 # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='server_cost' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='mysql' AND tbl='server_cost') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`servers` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `server_name`, `host`, `db`, `username`, `password`, `port`, `socket`, `wrapper`, `owner` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`server_name`) # TableParser:4632 12902 PRIMARY key cols: `server_name` # TableParser:4654 12902 This key is the clustered key # SchemaIterator:7509 12902 Next schema object: mysql servers # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', convert(`server_name` using utf8mb4), convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`username` using utf8mb4), convert(`password` using utf8mb4), `port`, convert(`socket` using utf8mb4), convert(`wrapper` using utf8mb4), convert(`owner` using utf8mb4))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`server_name` using utf8mb4), convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`username` using utf8mb4), convert(`password` using utf8mb4), `port`, convert(`socket` using utf8mb4), convert(`wrapper` using utf8mb4), convert(`owner` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`servers` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1', # select_type => 'SIMPLE', # table => 'servers', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`server_name` using utf8mb4), convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`username` using utf8mb4), convert(`password` using utf8mb4), `port`, convert(`socket` using utf8mb4), convert(`wrapper` using utf8mb4), convert(`owner` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`servers` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`server_name` using utf8mb4), convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`username` using utf8mb4), convert(`password` using utf8mb4), `port`, convert(`socket` using utf8mb4), convert(`wrapper` using utf8mb4), convert(`owner` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`servers` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `mysql`.`servers` # TableParser:4573 12902 SHOW TABLES FROM `mysql` LIKE 'servers' # TableParser:4588 12902 Table mysql servers exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`servers` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `server_name`, `host`, `db`, `username`, `password`, `port`, `socket`, `wrapper`, `owner` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`server_name`) # TableParser:4632 12902 PRIMARY key cols: `server_name` # TableParser:4654 12902 This key is the clustered key # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`servers` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1', # select_type => 'SIMPLE', # table => 'servers', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 1 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `mysql` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`server_name` using utf8mb4), convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`username` using utf8mb4), convert(`password` using utf8mb4), `port`, convert(`socket` using utf8mb4), convert(`wrapper` using utf8mb4), convert(`owner` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`servers` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`server_name` using utf8mb4), convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`username` using utf8mb4), convert(`password` using utf8mb4), `port`, convert(`socket` using utf8mb4), convert(`wrapper` using utf8mb4), convert(`owner` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`servers` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1', # select_type => 'SIMPLE', # table => 'servers', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`server_name` using utf8mb4), convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`username` using utf8mb4), convert(`password` using utf8mb4), `port`, convert(`socket` using utf8mb4), convert(`wrapper` using utf8mb4), convert(`owner` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`servers` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.0035710334777832 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='servers' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='mysql' AND tbl='servers') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`tables_priv` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4444 12902 Table cols: `host`, `db`, `user`, `table_name`, `grantor`, `timestamp`, `table_priv`, `column_priv` # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4612 12902 Parsed key: PRIMARY KEY (`host`,`db`,`user`,`table_name`), # TableParser:4632 12902 PRIMARY key cols: `host`, `db`, `user`, `table_name` # TableParser:4612 12902 Parsed key: KEY `grantor` (`grantor`) # TableParser:4632 12902 grantor key cols: `grantor` # SchemaIterator:7509 12902 Next schema object: mysql tables_priv # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`user` using utf8mb4), convert(`table_name` using utf8mb4), convert(`grantor` using utf8mb4), UNIX_TIMESTAMP(`timestamp`), convert(`table_priv` using utf8mb4), convert(`column_priv` using utf8mb4))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`user` using utf8mb4), convert(`table_name` using utf8mb4), convert(`grantor` using utf8mb4), UNIX_TIMESTAMP(`timestamp`), convert(`table_priv` using utf8mb4), convert(`column_priv` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`tables_priv` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1', # select_type => 'SIMPLE', # table => 'tables_priv', # type => 'system' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY, grantor # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`user` using utf8mb4), convert(`table_name` using utf8mb4), convert(`grantor` using utf8mb4), UNIX_TIMESTAMP(`timestamp`), convert(`table_priv` using utf8mb4), convert(`column_priv` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`tables_priv` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`user` using utf8mb4), convert(`table_name` using utf8mb4), convert(`grantor` using utf8mb4), UNIX_TIMESTAMP(`timestamp`), convert(`table_priv` using utf8mb4), convert(`column_priv` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`tables_priv` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `mysql`.`tables_priv` # TableParser:4573 12902 SHOW TABLES FROM `mysql` LIKE 'tables\_priv' # TableParser:4588 12902 Table mysql tables_priv exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`tables_priv` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4444 12902 Table cols: `host`, `db`, `user`, `table_name`, `grantor`, `timestamp`, `table_priv`, `column_priv` # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4612 12902 Parsed key: PRIMARY KEY (`host`,`db`,`user`,`table_name`), # TableParser:4632 12902 PRIMARY key cols: `host`, `db`, `user`, `table_name` # TableParser:4612 12902 Parsed key: KEY `grantor` (`grantor`) # TableParser:4632 12902 grantor key cols: `grantor` # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`tables_priv` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1', # select_type => 'SIMPLE', # table => 'tables_priv', # type => 'system' # }; # # pt_table_checksum:10170 12902 Table on slave has 1 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `mysql` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`user` using utf8mb4), convert(`table_name` using utf8mb4), convert(`grantor` using utf8mb4), UNIX_TIMESTAMP(`timestamp`), convert(`table_priv` using utf8mb4), convert(`column_priv` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`tables_priv` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`user` using utf8mb4), convert(`table_name` using utf8mb4), convert(`grantor` using utf8mb4), UNIX_TIMESTAMP(`timestamp`), convert(`table_priv` using utf8mb4), convert(`column_priv` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`tables_priv` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1', # select_type => 'SIMPLE', # table => 'tables_priv', # type => 'system' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`db` using utf8mb4), convert(`user` using utf8mb4), convert(`table_name` using utf8mb4), convert(`grantor` using utf8mb4), UNIX_TIMESTAMP(`timestamp`), convert(`table_priv` using utf8mb4), convert(`column_priv` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`tables_priv` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.0028071403503418 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # pt_table_checksum:10415 12902 Total avg rate: 18102 # WeightedAvgRate:8787 12902 Master op time: 1 n / 0.0028071403503418 s # WeightedAvgRate:8799 12902 Initial avg rate: 356.234414812298 n/s # WeightedAvgRate:8803 12902 Adjust n to 178 # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='tables_priv' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='mysql' AND tbl='tables_priv') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`time_zone` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `time_zone_id`, `use_leap_seconds` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`time_zone_id`) # TableParser:4632 12902 PRIMARY key cols: `time_zone_id` # TableParser:4654 12902 This key is the clustered key # SchemaIterator:7509 12902 Next schema object: mysql time_zone # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', `time_zone_id`, convert(`use_leap_seconds` using utf8mb4))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `time_zone_id`, convert(`use_leap_seconds` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`time_zone` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1', # select_type => 'SIMPLE', # table => 'time_zone', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `time_zone_id`, convert(`use_leap_seconds` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `time_zone_id`, convert(`use_leap_seconds` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `mysql`.`time_zone` # TableParser:4573 12902 SHOW TABLES FROM `mysql` LIKE 'time\_zone' # TableParser:4588 12902 Table mysql time_zone exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`time_zone` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `time_zone_id`, `use_leap_seconds` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`time_zone_id`) # TableParser:4632 12902 PRIMARY key cols: `time_zone_id` # TableParser:4654 12902 This key is the clustered key # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`time_zone` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1', # select_type => 'SIMPLE', # table => 'time_zone', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 1 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `mysql` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `time_zone_id`, convert(`use_leap_seconds` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `time_zone_id`, convert(`use_leap_seconds` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1', # select_type => 'SIMPLE', # table => 'time_zone', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `time_zone_id`, convert(`use_leap_seconds` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.0181820392608643 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='time_zone' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='mysql' AND tbl='time_zone') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`time_zone_leap_second` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `transition_time`, `correction` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`transition_time`) # TableParser:4632 12902 PRIMARY key cols: `transition_time` # TableParser:4654 12902 This key is the clustered key # SchemaIterator:7509 12902 Next schema object: mysql time_zone_leap_second # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', `transition_time`, `correction`)) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `transition_time`, `correction`)) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`time_zone_leap_second` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1', # select_type => 'SIMPLE', # table => 'time_zone_leap_second', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `transition_time`, `correction`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone_leap_second` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `transition_time`, `correction`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone_leap_second` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `mysql`.`time_zone_leap_second` # TableParser:4573 12902 SHOW TABLES FROM `mysql` LIKE 'time\_zone\_leap\_second' # TableParser:4588 12902 Table mysql time_zone_leap_second exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`time_zone_leap_second` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `transition_time`, `correction` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`transition_time`) # TableParser:4632 12902 PRIMARY key cols: `transition_time` # TableParser:4654 12902 This key is the clustered key # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`time_zone_leap_second` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1', # select_type => 'SIMPLE', # table => 'time_zone_leap_second', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 1 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `mysql` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `transition_time`, `correction`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone_leap_second` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `transition_time`, `correction`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone_leap_second` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1', # select_type => 'SIMPLE', # table => 'time_zone_leap_second', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `transition_time`, `correction`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone_leap_second` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.00309205055236816 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='time_zone_leap_second' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='mysql' AND tbl='time_zone_leap_second') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`time_zone_name` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `name`, `time_zone_id` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`name`) # TableParser:4632 12902 PRIMARY key cols: `name` # TableParser:4654 12902 This key is the clustered key # SchemaIterator:7509 12902 Next schema object: mysql time_zone_name # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', convert(`name` using utf8mb4), `time_zone_id`)) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`name` using utf8mb4), `time_zone_id`)) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`time_zone_name` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1', # select_type => 'SIMPLE', # table => 'time_zone_name', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`name` using utf8mb4), `time_zone_id`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone_name` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`name` using utf8mb4), `time_zone_id`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone_name` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `mysql`.`time_zone_name` # TableParser:4573 12902 SHOW TABLES FROM `mysql` LIKE 'time\_zone\_name' # TableParser:4588 12902 Table mysql time_zone_name exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`time_zone_name` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `name`, `time_zone_id` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`name`) # TableParser:4632 12902 PRIMARY key cols: `name` # TableParser:4654 12902 This key is the clustered key # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`time_zone_name` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1', # select_type => 'SIMPLE', # table => 'time_zone_name', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 1 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `mysql` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`name` using utf8mb4), `time_zone_id`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone_name` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`name` using utf8mb4), `time_zone_id`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone_name` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1', # select_type => 'SIMPLE', # table => 'time_zone_name', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`name` using utf8mb4), `time_zone_id`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone_name` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.00469779968261719 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='time_zone_name' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='mysql' AND tbl='time_zone_name') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`time_zone_transition` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `time_zone_id`, `transition_time`, `transition_type_id` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`time_zone_id`,`transition_time`) # TableParser:4632 12902 PRIMARY key cols: `time_zone_id`, `transition_time` # TableParser:4654 12902 This key is the clustered key # SchemaIterator:7509 12902 Next schema object: mysql time_zone_transition # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', `time_zone_id`, `transition_time`, `transition_type_id`)) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `time_zone_id`, `transition_time`, `transition_type_id`)) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`time_zone_transition` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1', # select_type => 'SIMPLE', # table => 'time_zone_transition', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `time_zone_id`, `transition_time`, `transition_type_id`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone_transition` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `time_zone_id`, `transition_time`, `transition_type_id`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone_transition` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `mysql`.`time_zone_transition` # TableParser:4573 12902 SHOW TABLES FROM `mysql` LIKE 'time\_zone\_transition' # TableParser:4588 12902 Table mysql time_zone_transition exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`time_zone_transition` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `time_zone_id`, `transition_time`, `transition_type_id` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`time_zone_id`,`transition_time`) # TableParser:4632 12902 PRIMARY key cols: `time_zone_id`, `transition_time` # TableParser:4654 12902 This key is the clustered key # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`time_zone_transition` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1', # select_type => 'SIMPLE', # table => 'time_zone_transition', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 1 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `mysql` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `time_zone_id`, `transition_time`, `transition_type_id`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone_transition` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `time_zone_id`, `transition_time`, `transition_type_id`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone_transition` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1', # select_type => 'SIMPLE', # table => 'time_zone_transition', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `time_zone_id`, `transition_time`, `transition_type_id`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone_transition` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.00224995613098145 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='time_zone_transition' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='mysql' AND tbl='time_zone_transition') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`time_zone_transition_type` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `time_zone_id`, `transition_type_id`, `offset`, `is_dst`, `abbreviation` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`time_zone_id`,`transition_type_id`) # TableParser:4632 12902 PRIMARY key cols: `time_zone_id`, `transition_type_id` # TableParser:4654 12902 This key is the clustered key # SchemaIterator:7509 12902 Next schema object: mysql time_zone_transition_type # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', `time_zone_id`, `transition_type_id`, `offset`, `is_dst`, convert(`abbreviation` using utf8mb4))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `time_zone_id`, `transition_type_id`, `offset`, `is_dst`, convert(`abbreviation` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`time_zone_transition_type` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1', # select_type => 'SIMPLE', # table => 'time_zone_transition_type', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `time_zone_id`, `transition_type_id`, `offset`, `is_dst`, convert(`abbreviation` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone_transition_type` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `time_zone_id`, `transition_type_id`, `offset`, `is_dst`, convert(`abbreviation` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone_transition_type` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `mysql`.`time_zone_transition_type` # TableParser:4573 12902 SHOW TABLES FROM `mysql` LIKE 'time\_zone\_transition\_type' # TableParser:4588 12902 Table mysql time_zone_transition_type exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`time_zone_transition_type` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `time_zone_id`, `transition_type_id`, `offset`, `is_dst`, `abbreviation` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`time_zone_id`,`transition_type_id`) # TableParser:4632 12902 PRIMARY key cols: `time_zone_id`, `transition_type_id` # TableParser:4654 12902 This key is the clustered key # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`time_zone_transition_type` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1', # select_type => 'SIMPLE', # table => 'time_zone_transition_type', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 1 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `mysql` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `time_zone_id`, `transition_type_id`, `offset`, `is_dst`, convert(`abbreviation` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone_transition_type` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `time_zone_id`, `transition_type_id`, `offset`, `is_dst`, convert(`abbreviation` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone_transition_type` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1', # select_type => 'SIMPLE', # table => 'time_zone_transition_type', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `time_zone_id`, `transition_type_id`, `offset`, `is_dst`, convert(`abbreviation` using utf8mb4))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone_transition_type` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.0029749870300293 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='time_zone_transition_type' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='mysql' AND tbl='time_zone_transition_type') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`user` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4444 12902 Table cols: `host`, `user`, `select_priv`, `insert_priv`, `update_priv`, `delete_priv`, `create_priv`, `drop_priv`, `reload_priv`, `shutdown_priv`, `process_priv`, `file_priv`, `grant_priv`, `references_priv`, `index_priv`, `alter_priv`, `show_db_priv`, `super_priv`, `create_tmp_table_priv`, `lock_tables_priv`, `execute_priv`, `repl_slave_priv`, `repl_client_priv`, `create_view_priv`, `show_view_priv`, `create_routine_priv`, `alter_routine_priv`, `create_user_priv`, `event_priv`, `trigger_priv`, `create_tablespace_priv`, `ssl_type`, `ssl_cipher`, `x509_issuer`, `x509_subject`, `max_questions`, `max_updates`, `max_connections`, `max_user_connections`, `plugin`, `authentication_string`, `password_expired`, `password_last_changed`, `password_lifetime`, `account_locked` # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4612 12902 Parsed key: PRIMARY KEY (`host`,`user`) # TableParser:4632 12902 PRIMARY key cols: `host`, `user` # SchemaIterator:7509 12902 Next schema object: mysql user # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`user` using utf8mb4), convert(`select_priv` using utf8mb4), convert(`insert_priv` using utf8mb4), convert(`update_priv` using utf8mb4), convert(`delete_priv` using utf8mb4), convert(`create_priv` using utf8mb4), convert(`drop_priv` using utf8mb4), convert(`reload_priv` using utf8mb4), convert(`shutdown_priv` using utf8mb4), convert(`process_priv` using utf8mb4), convert(`file_priv` using utf8mb4), convert(`grant_priv` using utf8mb4), convert(`references_priv` using utf8mb4), convert(`index_priv` using utf8mb4), convert(`alter_priv` using utf8mb4), convert(`show_db_priv` using utf8mb4), convert(`super_priv` using utf8mb4), convert(`create_tmp_table_priv` using utf8mb4), convert(`lock_tables_priv` using utf8mb4), convert(`execute_priv` using utf8mb4), convert(`repl_slave_priv` using utf8mb4), convert(`repl_client_priv` using utf8mb4), convert(`create_view_priv` using utf8mb4), convert(`show_view_priv` using utf8mb4), convert(`create_routine_priv` using utf8mb4), convert(`alter_routine_priv` using utf8mb4), convert(`create_user_priv` using utf8mb4), convert(`event_priv` using utf8mb4), convert(`trigger_priv` using utf8mb4), convert(`create_tablespace_priv` using utf8mb4), convert(`ssl_type` using utf8mb4), CRC32(`ssl_cipher`), CRC32(`x509_issuer`), CRC32(`x509_subject`), `max_questions`, `max_updates`, `max_connections`, `max_user_connections`, convert(`plugin` using utf8mb4), CRC32(`authentication_string`), convert(`password_expired` using utf8mb4), UNIX_TIMESTAMP(`password_last_changed`), `password_lifetime`, convert(`account_locked` using utf8mb4), CONCAT(ISNULL(`authentication_string`), ISNULL(`password_last_changed`), ISNULL(`password_lifetime`)))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`user` using utf8mb4), convert(`select_priv` using utf8mb4), convert(`insert_priv` using utf8mb4), convert(`update_priv` using utf8mb4), convert(`delete_priv` using utf8mb4), convert(`create_priv` using utf8mb4), convert(`drop_priv` using utf8mb4), convert(`reload_priv` using utf8mb4), convert(`shutdown_priv` using utf8mb4), convert(`process_priv` using utf8mb4), convert(`file_priv` using utf8mb4), convert(`grant_priv` using utf8mb4), convert(`references_priv` using utf8mb4), convert(`index_priv` using utf8mb4), convert(`alter_priv` using utf8mb4), convert(`show_db_priv` using utf8mb4), convert(`super_priv` using utf8mb4), convert(`create_tmp_table_priv` using utf8mb4), convert(`lock_tables_priv` using utf8mb4), convert(`execute_priv` using utf8mb4), convert(`repl_slave_priv` using utf8mb4), convert(`repl_client_priv` using utf8mb4), convert(`create_view_priv` using utf8mb4), convert(`show_view_priv` using utf8mb4), convert(`create_routine_priv` using utf8mb4), convert(`alter_routine_priv` using utf8mb4), convert(`create_user_priv` using utf8mb4), convert(`event_priv` using utf8mb4), convert(`trigger_priv` using utf8mb4), convert(`create_tablespace_priv` using utf8mb4), convert(`ssl_type` using utf8mb4), CRC32(`ssl_cipher`), CRC32(`x509_issuer`), CRC32(`x509_subject`), `max_questions`, `max_updates`, `max_connections`, `max_user_connections`, convert(`plugin` using utf8mb4), CRC32(`authentication_string`), convert(`password_expired` using utf8mb4), UNIX_TIMESTAMP(`password_last_changed`), `password_lifetime`, convert(`account_locked` using utf8mb4), CONCAT(ISNULL(`authentication_string`), ISNULL(`password_last_changed`), ISNULL(`password_lifetime`)))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`user` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '12', # select_type => 'SIMPLE', # table => 'user', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`user` using utf8mb4), convert(`select_priv` using utf8mb4), convert(`insert_priv` using utf8mb4), convert(`update_priv` using utf8mb4), convert(`delete_priv` using utf8mb4), convert(`create_priv` using utf8mb4), convert(`drop_priv` using utf8mb4), convert(`reload_priv` using utf8mb4), convert(`shutdown_priv` using utf8mb4), convert(`process_priv` using utf8mb4), convert(`file_priv` using utf8mb4), convert(`grant_priv` using utf8mb4), convert(`references_priv` using utf8mb4), convert(`index_priv` using utf8mb4), convert(`alter_priv` using utf8mb4), convert(`show_db_priv` using utf8mb4), convert(`super_priv` using utf8mb4), convert(`create_tmp_table_priv` using utf8mb4), convert(`lock_tables_priv` using utf8mb4), convert(`execute_priv` using utf8mb4), convert(`repl_slave_priv` using utf8mb4), convert(`repl_client_priv` using utf8mb4), convert(`create_view_priv` using utf8mb4), convert(`show_view_priv` using utf8mb4), convert(`create_routine_priv` using utf8mb4), convert(`alter_routine_priv` using utf8mb4), convert(`create_user_priv` using utf8mb4), convert(`event_priv` using utf8mb4), convert(`trigger_priv` using utf8mb4), convert(`create_tablespace_priv` using utf8mb4), convert(`ssl_type` using utf8mb4), CRC32(`ssl_cipher`), CRC32(`x509_issuer`), CRC32(`x509_subject`), `max_questions`, `max_updates`, `max_connections`, `max_user_connections`, convert(`plugin` using utf8mb4), CRC32(`authentication_string`), convert(`password_expired` using utf8mb4), UNIX_TIMESTAMP(`password_last_changed`), `password_lifetime`, convert(`account_locked` using utf8mb4), CONCAT(ISNULL(`authentication_string`), ISNULL(`password_last_changed`), ISNULL(`password_lifetime`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`user` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`user` using utf8mb4), convert(`select_priv` using utf8mb4), convert(`insert_priv` using utf8mb4), convert(`update_priv` using utf8mb4), convert(`delete_priv` using utf8mb4), convert(`create_priv` using utf8mb4), convert(`drop_priv` using utf8mb4), convert(`reload_priv` using utf8mb4), convert(`shutdown_priv` using utf8mb4), convert(`process_priv` using utf8mb4), convert(`file_priv` using utf8mb4), convert(`grant_priv` using utf8mb4), convert(`references_priv` using utf8mb4), convert(`index_priv` using utf8mb4), convert(`alter_priv` using utf8mb4), convert(`show_db_priv` using utf8mb4), convert(`super_priv` using utf8mb4), convert(`create_tmp_table_priv` using utf8mb4), convert(`lock_tables_priv` using utf8mb4), convert(`execute_priv` using utf8mb4), convert(`repl_slave_priv` using utf8mb4), convert(`repl_client_priv` using utf8mb4), convert(`create_view_priv` using utf8mb4), convert(`show_view_priv` using utf8mb4), convert(`create_routine_priv` using utf8mb4), convert(`alter_routine_priv` using utf8mb4), convert(`create_user_priv` using utf8mb4), convert(`event_priv` using utf8mb4), convert(`trigger_priv` using utf8mb4), convert(`create_tablespace_priv` using utf8mb4), convert(`ssl_type` using utf8mb4), CRC32(`ssl_cipher`), CRC32(`x509_issuer`), CRC32(`x509_subject`), `max_questions`, `max_updates`, `max_connections`, `max_user_connections`, convert(`plugin` using utf8mb4), CRC32(`authentication_string`), convert(`password_expired` using utf8mb4), UNIX_TIMESTAMP(`password_last_changed`), `password_lifetime`, convert(`account_locked` using utf8mb4), CONCAT(ISNULL(`authentication_string`), ISNULL(`password_last_changed`), ISNULL(`password_lifetime`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`user` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `mysql`.`user` # TableParser:4573 12902 SHOW TABLES FROM `mysql` LIKE 'user' # TableParser:4588 12902 Table mysql user exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `mysql` # TableParser:4402 12902 SHOW CREATE TABLE `mysql`.`user` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4444 12902 Table cols: `host`, `user`, `select_priv`, `insert_priv`, `update_priv`, `delete_priv`, `create_priv`, `drop_priv`, `reload_priv`, `shutdown_priv`, `process_priv`, `file_priv`, `grant_priv`, `references_priv`, `index_priv`, `alter_priv`, `show_db_priv`, `super_priv`, `create_tmp_table_priv`, `lock_tables_priv`, `execute_priv`, `repl_slave_priv`, `repl_client_priv`, `create_view_priv`, `show_view_priv`, `create_routine_priv`, `alter_routine_priv`, `create_user_priv`, `event_priv`, `trigger_priv`, `create_tablespace_priv`, `ssl_type`, `ssl_cipher`, `x509_issuer`, `x509_subject`, `max_questions`, `max_updates`, `max_connections`, `max_user_connections`, `plugin`, `authentication_string`, `password_expired`, `password_last_changed`, `password_lifetime`, `account_locked` # TableParser:4596 12902 Storage engine: MyISAM # TableParser:4612 12902 Parsed key: PRIMARY KEY (`host`,`user`) # TableParser:4632 12902 PRIMARY key cols: `host`, `user` # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `mysql`.`user` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '12', # select_type => 'SIMPLE', # table => 'user', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 12 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `mysql` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`user` using utf8mb4), convert(`select_priv` using utf8mb4), convert(`insert_priv` using utf8mb4), convert(`update_priv` using utf8mb4), convert(`delete_priv` using utf8mb4), convert(`create_priv` using utf8mb4), convert(`drop_priv` using utf8mb4), convert(`reload_priv` using utf8mb4), convert(`shutdown_priv` using utf8mb4), convert(`process_priv` using utf8mb4), convert(`file_priv` using utf8mb4), convert(`grant_priv` using utf8mb4), convert(`references_priv` using utf8mb4), convert(`index_priv` using utf8mb4), convert(`alter_priv` using utf8mb4), convert(`show_db_priv` using utf8mb4), convert(`super_priv` using utf8mb4), convert(`create_tmp_table_priv` using utf8mb4), convert(`lock_tables_priv` using utf8mb4), convert(`execute_priv` using utf8mb4), convert(`repl_slave_priv` using utf8mb4), convert(`repl_client_priv` using utf8mb4), convert(`create_view_priv` using utf8mb4), convert(`show_view_priv` using utf8mb4), convert(`create_routine_priv` using utf8mb4), convert(`alter_routine_priv` using utf8mb4), convert(`create_user_priv` using utf8mb4), convert(`event_priv` using utf8mb4), convert(`trigger_priv` using utf8mb4), convert(`create_tablespace_priv` using utf8mb4), convert(`ssl_type` using utf8mb4), CRC32(`ssl_cipher`), CRC32(`x509_issuer`), CRC32(`x509_subject`), `max_questions`, `max_updates`, `max_connections`, `max_user_connections`, convert(`plugin` using utf8mb4), CRC32(`authentication_string`), convert(`password_expired` using utf8mb4), UNIX_TIMESTAMP(`password_last_changed`), `password_lifetime`, convert(`account_locked` using utf8mb4), CONCAT(ISNULL(`authentication_string`), ISNULL(`password_last_changed`), ISNULL(`password_lifetime`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`user` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`user` using utf8mb4), convert(`select_priv` using utf8mb4), convert(`insert_priv` using utf8mb4), convert(`update_priv` using utf8mb4), convert(`delete_priv` using utf8mb4), convert(`create_priv` using utf8mb4), convert(`drop_priv` using utf8mb4), convert(`reload_priv` using utf8mb4), convert(`shutdown_priv` using utf8mb4), convert(`process_priv` using utf8mb4), convert(`file_priv` using utf8mb4), convert(`grant_priv` using utf8mb4), convert(`references_priv` using utf8mb4), convert(`index_priv` using utf8mb4), convert(`alter_priv` using utf8mb4), convert(`show_db_priv` using utf8mb4), convert(`super_priv` using utf8mb4), convert(`create_tmp_table_priv` using utf8mb4), convert(`lock_tables_priv` using utf8mb4), convert(`execute_priv` using utf8mb4), convert(`repl_slave_priv` using utf8mb4), convert(`repl_client_priv` using utf8mb4), convert(`create_view_priv` using utf8mb4), convert(`show_view_priv` using utf8mb4), convert(`create_routine_priv` using utf8mb4), convert(`alter_routine_priv` using utf8mb4), convert(`create_user_priv` using utf8mb4), convert(`event_priv` using utf8mb4), convert(`trigger_priv` using utf8mb4), convert(`create_tablespace_priv` using utf8mb4), convert(`ssl_type` using utf8mb4), CRC32(`ssl_cipher`), CRC32(`x509_issuer`), CRC32(`x509_subject`), `max_questions`, `max_updates`, `max_connections`, `max_user_connections`, convert(`plugin` using utf8mb4), CRC32(`authentication_string`), convert(`password_expired` using utf8mb4), UNIX_TIMESTAMP(`password_last_changed`), `password_lifetime`, convert(`account_locked` using utf8mb4), CONCAT(ISNULL(`authentication_string`), ISNULL(`password_last_changed`), ISNULL(`password_lifetime`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`user` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '12', # select_type => 'SIMPLE', # table => 'user', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`host` using utf8mb4), convert(`user` using utf8mb4), convert(`select_priv` using utf8mb4), convert(`insert_priv` using utf8mb4), convert(`update_priv` using utf8mb4), convert(`delete_priv` using utf8mb4), convert(`create_priv` using utf8mb4), convert(`drop_priv` using utf8mb4), convert(`reload_priv` using utf8mb4), convert(`shutdown_priv` using utf8mb4), convert(`process_priv` using utf8mb4), convert(`file_priv` using utf8mb4), convert(`grant_priv` using utf8mb4), convert(`references_priv` using utf8mb4), convert(`index_priv` using utf8mb4), convert(`alter_priv` using utf8mb4), convert(`show_db_priv` using utf8mb4), convert(`super_priv` using utf8mb4), convert(`create_tmp_table_priv` using utf8mb4), convert(`lock_tables_priv` using utf8mb4), convert(`execute_priv` using utf8mb4), convert(`repl_slave_priv` using utf8mb4), convert(`repl_client_priv` using utf8mb4), convert(`create_view_priv` using utf8mb4), convert(`show_view_priv` using utf8mb4), convert(`create_routine_priv` using utf8mb4), convert(`alter_routine_priv` using utf8mb4), convert(`create_user_priv` using utf8mb4), convert(`event_priv` using utf8mb4), convert(`trigger_priv` using utf8mb4), convert(`create_tablespace_priv` using utf8mb4), convert(`ssl_type` using utf8mb4), CRC32(`ssl_cipher`), CRC32(`x509_issuer`), CRC32(`x509_subject`), `max_questions`, `max_updates`, `max_connections`, `max_user_connections`, convert(`plugin` using utf8mb4), CRC32(`authentication_string`), convert(`password_expired` using utf8mb4), UNIX_TIMESTAMP(`password_last_changed`), `password_lifetime`, convert(`account_locked` using utf8mb4), CONCAT(ISNULL(`authentication_string`), ISNULL(`password_last_changed`), ISNULL(`password_lifetime`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`user` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.00468683242797852 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # pt_table_checksum:10415 12902 Total avg rate: 17529 # WeightedAvgRate:8787 12902 Master op time: 12 n / 0.00468683242797852 s # WeightedAvgRate:8799 12902 Initial avg rate: 2560.364635263 n/s # WeightedAvgRate:8803 12902 Adjust n to 1280 # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='user' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='mysql' AND tbl='user') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # SchemaIterator:7657 12902 No more tables in database mysql # SchemaIterator:7603 12902 Next database: percona # SchemaIterator:7609 12902 SHOW /*!50002 FULL*/ TABLES FROM `percona` # SchemaIterator:7728 12902 Table checksums is in --ignore-tables list # SchemaIterator:7627 12902 Found 0 tables in database percona # SchemaIterator:7657 12902 No more tables in database percona # SchemaIterator:7603 12902 Next database: sakila # SchemaIterator:7609 12902 SHOW /*!50002 FULL*/ TABLES FROM `sakila` # SchemaIterator:7627 12902 Found 17 tables in database sakila # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`actor` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `actor_id`, `first_name`, `last_name`, `last_update` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`actor_id`), # TableParser:4632 12902 PRIMARY key cols: `actor_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: KEY `idx_actor_last_name` (`last_name`) # TableParser:4632 12902 idx_actor_last_name key cols: `last_name` # SchemaIterator:7509 12902 Next schema object: sakila actor # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', `actor_id`, convert(`first_name` using utf8mb4), convert(`last_name` using utf8mb4), UNIX_TIMESTAMP(`last_update`))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `actor_id`, convert(`first_name` using utf8mb4), convert(`last_name` using utf8mb4), UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`actor` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '200', # select_type => 'SIMPLE', # table => 'actor', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY, idx_actor_last_name # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `actor_id`, convert(`first_name` using utf8mb4), convert(`last_name` using utf8mb4), UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`actor` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `actor_id`, convert(`first_name` using utf8mb4), convert(`last_name` using utf8mb4), UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`actor` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `sakila`.`actor` # TableParser:4573 12902 SHOW TABLES FROM `sakila` LIKE 'actor' # TableParser:4588 12902 Table sakila actor exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`actor` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `actor_id`, `first_name`, `last_name`, `last_update` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`actor_id`), # TableParser:4632 12902 PRIMARY key cols: `actor_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: KEY `idx_actor_last_name` (`last_name`) # TableParser:4632 12902 idx_actor_last_name key cols: `last_name` # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`actor` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '200', # select_type => 'SIMPLE', # table => 'actor', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 200 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `sakila` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `actor_id`, convert(`first_name` using utf8mb4), convert(`last_name` using utf8mb4), UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`actor` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `actor_id`, convert(`first_name` using utf8mb4), convert(`last_name` using utf8mb4), UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`actor` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '200', # select_type => 'SIMPLE', # table => 'actor', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `actor_id`, convert(`first_name` using utf8mb4), convert(`last_name` using utf8mb4), UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`actor` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.00382399559020996 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # pt_table_checksum:10415 12902 Total avg rate: 18545 # WeightedAvgRate:8787 12902 Master op time: 200 n / 0.00382399559020996 s # WeightedAvgRate:8799 12902 Initial avg rate: 52301.3155433631 n/s # WeightedAvgRate:8803 12902 Adjust n to 26150 # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='actor' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='sakila' AND tbl='actor') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`address` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `address_id`, `address`, `address2`, `district`, `city_id`, `postal_code`, `phone`, `last_update` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`address_id`), # TableParser:4632 12902 PRIMARY key cols: `address_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: KEY `idx_fk_city_id` (`city_id`), # TableParser:4632 12902 idx_fk_city_id key cols: `city_id` # SchemaIterator:7509 12902 Next schema object: sakila address # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', `address_id`, convert(`address` using utf8mb4), convert(`address2` using utf8mb4), convert(`district` using utf8mb4), `city_id`, convert(`postal_code` using utf8mb4), convert(`phone` using utf8mb4), UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`address2`), ISNULL(`postal_code`)))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `address_id`, convert(`address` using utf8mb4), convert(`address2` using utf8mb4), convert(`district` using utf8mb4), `city_id`, convert(`postal_code` using utf8mb4), convert(`phone` using utf8mb4), UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`address2`), ISNULL(`postal_code`)))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`address` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '603', # select_type => 'SIMPLE', # table => 'address', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY, idx_fk_city_id # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `address_id`, convert(`address` using utf8mb4), convert(`address2` using utf8mb4), convert(`district` using utf8mb4), `city_id`, convert(`postal_code` using utf8mb4), convert(`phone` using utf8mb4), UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`address2`), ISNULL(`postal_code`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`address` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `address_id`, convert(`address` using utf8mb4), convert(`address2` using utf8mb4), convert(`district` using utf8mb4), `city_id`, convert(`postal_code` using utf8mb4), convert(`phone` using utf8mb4), UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`address2`), ISNULL(`postal_code`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`address` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `sakila`.`address` # TableParser:4573 12902 SHOW TABLES FROM `sakila` LIKE 'address' # TableParser:4588 12902 Table sakila address exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`address` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `address_id`, `address`, `address2`, `district`, `city_id`, `postal_code`, `phone`, `last_update` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`address_id`), # TableParser:4632 12902 PRIMARY key cols: `address_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: KEY `idx_fk_city_id` (`city_id`), # TableParser:4632 12902 idx_fk_city_id key cols: `city_id` # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`address` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '603', # select_type => 'SIMPLE', # table => 'address', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 603 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `sakila` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `address_id`, convert(`address` using utf8mb4), convert(`address2` using utf8mb4), convert(`district` using utf8mb4), `city_id`, convert(`postal_code` using utf8mb4), convert(`phone` using utf8mb4), UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`address2`), ISNULL(`postal_code`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`address` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `address_id`, convert(`address` using utf8mb4), convert(`address2` using utf8mb4), convert(`district` using utf8mb4), `city_id`, convert(`postal_code` using utf8mb4), convert(`phone` using utf8mb4), UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`address2`), ISNULL(`postal_code`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`address` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '603', # select_type => 'SIMPLE', # table => 'address', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `address_id`, convert(`address` using utf8mb4), convert(`address2` using utf8mb4), convert(`district` using utf8mb4), `city_id`, convert(`postal_code` using utf8mb4), convert(`phone` using utf8mb4), UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`address2`), ISNULL(`postal_code`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`address` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.00583505630493164 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # pt_table_checksum:10415 12902 Total avg rate: 22163 # WeightedAvgRate:8787 12902 Master op time: 603 n / 0.00583505630493164 s # WeightedAvgRate:8799 12902 Initial avg rate: 103340.905123805 n/s # WeightedAvgRate:8803 12902 Adjust n to 51670 # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='address' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='sakila' AND tbl='address') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`category` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `category_id`, `name`, `last_update` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`category_id`) # TableParser:4632 12902 PRIMARY key cols: `category_id` # TableParser:4654 12902 This key is the clustered key # SchemaIterator:7509 12902 Next schema object: sakila category # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', `category_id`, convert(`name` using utf8mb4), UNIX_TIMESTAMP(`last_update`))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `category_id`, convert(`name` using utf8mb4), UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`category` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '16', # select_type => 'SIMPLE', # table => 'category', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `category_id`, convert(`name` using utf8mb4), UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`category` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `category_id`, convert(`name` using utf8mb4), UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`category` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `sakila`.`category` # TableParser:4573 12902 SHOW TABLES FROM `sakila` LIKE 'category' # TableParser:4588 12902 Table sakila category exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`category` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `category_id`, `name`, `last_update` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`category_id`) # TableParser:4632 12902 PRIMARY key cols: `category_id` # TableParser:4654 12902 This key is the clustered key # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`category` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '16', # select_type => 'SIMPLE', # table => 'category', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 16 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `sakila` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `category_id`, convert(`name` using utf8mb4), UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`category` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `category_id`, convert(`name` using utf8mb4), UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`category` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '16', # select_type => 'SIMPLE', # table => 'category', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `category_id`, convert(`name` using utf8mb4), UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`category` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.00297093391418457 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # pt_table_checksum:10415 12902 Total avg rate: 21806 # WeightedAvgRate:8787 12902 Master op time: 16 n / 0.00297093391418457 s # WeightedAvgRate:8799 12902 Initial avg rate: 5385.51191718161 n/s # WeightedAvgRate:8803 12902 Adjust n to 2692 # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='category' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='sakila' AND tbl='category') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`city` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `city_id`, `city`, `country_id`, `last_update` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`city_id`), # TableParser:4632 12902 PRIMARY key cols: `city_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: KEY `idx_fk_country_id` (`country_id`), # TableParser:4632 12902 idx_fk_country_id key cols: `country_id` # SchemaIterator:7509 12902 Next schema object: sakila city # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', `city_id`, convert(`city` using utf8mb4), `country_id`, UNIX_TIMESTAMP(`last_update`))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `city_id`, convert(`city` using utf8mb4), `country_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`city` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '600', # select_type => 'SIMPLE', # table => 'city', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY, idx_fk_country_id # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `city_id`, convert(`city` using utf8mb4), `country_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`city` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `city_id`, convert(`city` using utf8mb4), `country_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`city` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `sakila`.`city` # TableParser:4573 12902 SHOW TABLES FROM `sakila` LIKE 'city' # TableParser:4588 12902 Table sakila city exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`city` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `city_id`, `city`, `country_id`, `last_update` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`city_id`), # TableParser:4632 12902 PRIMARY key cols: `city_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: KEY `idx_fk_country_id` (`country_id`), # TableParser:4632 12902 idx_fk_country_id key cols: `country_id` # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`city` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '600', # select_type => 'SIMPLE', # table => 'city', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 600 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `sakila` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `city_id`, convert(`city` using utf8mb4), `country_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`city` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `city_id`, convert(`city` using utf8mb4), `country_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`city` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '600', # select_type => 'SIMPLE', # table => 'city', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `city_id`, convert(`city` using utf8mb4), `country_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`city` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.0399858951568604 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # pt_table_checksum:10415 12902 Total avg rate: 20293 # WeightedAvgRate:8787 12902 Master op time: 600 n / 0.0399858951568604 s # WeightedAvgRate:8799 12902 Initial avg rate: 15005.2911819597 n/s # WeightedAvgRate:8803 12902 Adjust n to 7502 # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='city' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='sakila' AND tbl='city') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`country` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `country_id`, `country`, `last_update` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`country_id`) # TableParser:4632 12902 PRIMARY key cols: `country_id` # TableParser:4654 12902 This key is the clustered key # SchemaIterator:7509 12902 Next schema object: sakila country # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', `country_id`, convert(`country` using utf8mb4), UNIX_TIMESTAMP(`last_update`))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `country_id`, convert(`country` using utf8mb4), UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`country` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '109', # select_type => 'SIMPLE', # table => 'country', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `country_id`, convert(`country` using utf8mb4), UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`country` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `country_id`, convert(`country` using utf8mb4), UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`country` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `sakila`.`country` # TableParser:4573 12902 SHOW TABLES FROM `sakila` LIKE 'country' # TableParser:4588 12902 Table sakila country exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`country` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `country_id`, `country`, `last_update` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`country_id`) # TableParser:4632 12902 PRIMARY key cols: `country_id` # TableParser:4654 12902 This key is the clustered key # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`country` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '109', # select_type => 'SIMPLE', # table => 'country', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 109 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `sakila` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `country_id`, convert(`country` using utf8mb4), UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`country` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `country_id`, convert(`country` using utf8mb4), UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`country` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '109', # select_type => 'SIMPLE', # table => 'country', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `country_id`, convert(`country` using utf8mb4), UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`country` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.0170049667358398 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # pt_table_checksum:10415 12902 Total avg rate: 19093 # WeightedAvgRate:8787 12902 Master op time: 109 n / 0.0170049667358398 s # WeightedAvgRate:8799 12902 Initial avg rate: 6409.89198586731 n/s # WeightedAvgRate:8803 12902 Adjust n to 3204 # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='country' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='sakila' AND tbl='country') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`customer` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `customer_id`, `store_id`, `first_name`, `last_name`, `email`, `address_id`, `active`, `create_date`, `last_update` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`customer_id`), # TableParser:4632 12902 PRIMARY key cols: `customer_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: KEY `idx_fk_store_id` (`store_id`), # TableParser:4632 12902 idx_fk_store_id key cols: `store_id` # TableParser:4612 12902 Parsed key: KEY `idx_fk_address_id` (`address_id`), # TableParser:4632 12902 idx_fk_address_id key cols: `address_id` # TableParser:4612 12902 Parsed key: KEY `idx_last_name` (`last_name`), # TableParser:4632 12902 idx_last_name key cols: `last_name` # SchemaIterator:7509 12902 Next schema object: sakila customer # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', `customer_id`, `store_id`, convert(`first_name` using utf8mb4), convert(`last_name` using utf8mb4), convert(`email` using utf8mb4), `address_id`, `active`, `create_date`, UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`email`)))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `customer_id`, `store_id`, convert(`first_name` using utf8mb4), convert(`last_name` using utf8mb4), convert(`email` using utf8mb4), `address_id`, `active`, `create_date`, UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`email`)))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`customer` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '599', # select_type => 'SIMPLE', # table => 'customer', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY, idx_fk_address_id, idx_fk_store_id, idx_last_name # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `customer_id`, `store_id`, convert(`first_name` using utf8mb4), convert(`last_name` using utf8mb4), convert(`email` using utf8mb4), `address_id`, `active`, `create_date`, UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`email`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`customer` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `customer_id`, `store_id`, convert(`first_name` using utf8mb4), convert(`last_name` using utf8mb4), convert(`email` using utf8mb4), `address_id`, `active`, `create_date`, UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`email`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`customer` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `sakila`.`customer` # TableParser:4573 12902 SHOW TABLES FROM `sakila` LIKE 'customer' # TableParser:4588 12902 Table sakila customer exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`customer` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `customer_id`, `store_id`, `first_name`, `last_name`, `email`, `address_id`, `active`, `create_date`, `last_update` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`customer_id`), # TableParser:4632 12902 PRIMARY key cols: `customer_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: KEY `idx_fk_store_id` (`store_id`), # TableParser:4632 12902 idx_fk_store_id key cols: `store_id` # TableParser:4612 12902 Parsed key: KEY `idx_fk_address_id` (`address_id`), # TableParser:4632 12902 idx_fk_address_id key cols: `address_id` # TableParser:4612 12902 Parsed key: KEY `idx_last_name` (`last_name`), # TableParser:4632 12902 idx_last_name key cols: `last_name` # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`customer` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '599', # select_type => 'SIMPLE', # table => 'customer', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 599 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `sakila` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `customer_id`, `store_id`, convert(`first_name` using utf8mb4), convert(`last_name` using utf8mb4), convert(`email` using utf8mb4), `address_id`, `active`, `create_date`, UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`email`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`customer` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `customer_id`, `store_id`, convert(`first_name` using utf8mb4), convert(`last_name` using utf8mb4), convert(`email` using utf8mb4), `address_id`, `active`, `create_date`, UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`email`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`customer` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '599', # select_type => 'SIMPLE', # table => 'customer', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `customer_id`, `store_id`, convert(`first_name` using utf8mb4), convert(`last_name` using utf8mb4), convert(`email` using utf8mb4), `address_id`, `active`, `create_date`, UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`email`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`customer` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.00371789932250977 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # pt_table_checksum:10415 12902 Total avg rate: 21727 # WeightedAvgRate:8787 12902 Master op time: 599 n / 0.00371789932250977 s # WeightedAvgRate:8799 12902 Initial avg rate: 161112.485314865 n/s # WeightedAvgRate:8803 12902 Adjust n to 80556 # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='customer' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='sakila' AND tbl='customer') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`film` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `film_id`, `title`, `description`, `release_year`, `language_id`, `original_language_id`, `rental_duration`, `rental_rate`, `length`, `replacement_cost`, `rating`, `special_features`, `last_update` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`film_id`), # TableParser:4632 12902 PRIMARY key cols: `film_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: KEY `idx_title` (`title`), # TableParser:4632 12902 idx_title key cols: `title` # TableParser:4612 12902 Parsed key: KEY `idx_fk_language_id` (`language_id`), # TableParser:4632 12902 idx_fk_language_id key cols: `language_id` # TableParser:4612 12902 Parsed key: KEY `idx_fk_original_language_id` (`original_language_id`), # TableParser:4632 12902 idx_fk_original_language_id key cols: `original_language_id` # SchemaIterator:7509 12902 Next schema object: sakila film # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', `film_id`, convert(`title` using utf8mb4), CRC32(`description`), `release_year`, `language_id`, `original_language_id`, `rental_duration`, `rental_rate`, `length`, `replacement_cost`, convert(`rating` using utf8mb4), convert(`special_features` using utf8mb4), UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`description`), ISNULL(`release_year`), ISNULL(`original_language_id`), ISNULL(`length`), ISNULL(`rating`), ISNULL(`special_features`)))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `film_id`, convert(`title` using utf8mb4), CRC32(`description`), `release_year`, `language_id`, `original_language_id`, `rental_duration`, `rental_rate`, `length`, `replacement_cost`, convert(`rating` using utf8mb4), convert(`special_features` using utf8mb4), UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`description`), ISNULL(`release_year`), ISNULL(`original_language_id`), ISNULL(`length`), ISNULL(`rating`), ISNULL(`special_features`)))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`film` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1000', # select_type => 'SIMPLE', # table => 'film', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY, idx_fk_language_id, idx_title, idx_fk_original_language_id # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `film_id`, convert(`title` using utf8mb4), CRC32(`description`), `release_year`, `language_id`, `original_language_id`, `rental_duration`, `rental_rate`, `length`, `replacement_cost`, convert(`rating` using utf8mb4), convert(`special_features` using utf8mb4), UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`description`), ISNULL(`release_year`), ISNULL(`original_language_id`), ISNULL(`length`), ISNULL(`rating`), ISNULL(`special_features`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`film` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `film_id`, convert(`title` using utf8mb4), CRC32(`description`), `release_year`, `language_id`, `original_language_id`, `rental_duration`, `rental_rate`, `length`, `replacement_cost`, convert(`rating` using utf8mb4), convert(`special_features` using utf8mb4), UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`description`), ISNULL(`release_year`), ISNULL(`original_language_id`), ISNULL(`length`), ISNULL(`rating`), ISNULL(`special_features`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`film` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `sakila`.`film` # TableParser:4573 12902 SHOW TABLES FROM `sakila` LIKE 'film' # TableParser:4588 12902 Table sakila film exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`film` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `film_id`, `title`, `description`, `release_year`, `language_id`, `original_language_id`, `rental_duration`, `rental_rate`, `length`, `replacement_cost`, `rating`, `special_features`, `last_update` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`film_id`), # TableParser:4632 12902 PRIMARY key cols: `film_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: KEY `idx_title` (`title`), # TableParser:4632 12902 idx_title key cols: `title` # TableParser:4612 12902 Parsed key: KEY `idx_fk_language_id` (`language_id`), # TableParser:4632 12902 idx_fk_language_id key cols: `language_id` # TableParser:4612 12902 Parsed key: KEY `idx_fk_original_language_id` (`original_language_id`), # TableParser:4632 12902 idx_fk_original_language_id key cols: `original_language_id` # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`film` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1000', # select_type => 'SIMPLE', # table => 'film', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 1000 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `sakila` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `film_id`, convert(`title` using utf8mb4), CRC32(`description`), `release_year`, `language_id`, `original_language_id`, `rental_duration`, `rental_rate`, `length`, `replacement_cost`, convert(`rating` using utf8mb4), convert(`special_features` using utf8mb4), UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`description`), ISNULL(`release_year`), ISNULL(`original_language_id`), ISNULL(`length`), ISNULL(`rating`), ISNULL(`special_features`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`film` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `film_id`, convert(`title` using utf8mb4), CRC32(`description`), `release_year`, `language_id`, `original_language_id`, `rental_duration`, `rental_rate`, `length`, `replacement_cost`, convert(`rating` using utf8mb4), convert(`special_features` using utf8mb4), UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`description`), ISNULL(`release_year`), ISNULL(`original_language_id`), ISNULL(`length`), ISNULL(`rating`), ISNULL(`special_features`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`film` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1000', # select_type => 'SIMPLE', # table => 'film', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `film_id`, convert(`title` using utf8mb4), CRC32(`description`), `release_year`, `language_id`, `original_language_id`, `rental_duration`, `rental_rate`, `length`, `replacement_cost`, convert(`rating` using utf8mb4), convert(`special_features` using utf8mb4), UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`description`), ISNULL(`release_year`), ISNULL(`original_language_id`), ISNULL(`length`), ISNULL(`rating`), ISNULL(`special_features`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`film` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.0253889560699463 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # pt_table_checksum:10415 12902 Total avg rate: 23712 # WeightedAvgRate:8787 12902 Master op time: 1000 n / 0.0253889560699463 s # WeightedAvgRate:8799 12902 Initial avg rate: 39387.2043121825 n/s # WeightedAvgRate:8803 12902 Adjust n to 19693 # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='film' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='sakila' AND tbl='film') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`film_actor` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `actor_id`, `film_id`, `last_update` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`actor_id`,`film_id`), # TableParser:4632 12902 PRIMARY key cols: `actor_id`, `film_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: KEY `idx_fk_film_id` (`film_id`), # TableParser:4632 12902 idx_fk_film_id key cols: `film_id` # SchemaIterator:7509 12902 Next schema object: sakila film_actor # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', `actor_id`, `film_id`, UNIX_TIMESTAMP(`last_update`))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `actor_id`, `film_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`film_actor` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '5457', # select_type => 'SIMPLE', # table => 'film_actor', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY, idx_fk_film_id # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `actor_id`, `film_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`film_actor` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `actor_id`, `film_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`film_actor` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `sakila`.`film_actor` # TableParser:4573 12902 SHOW TABLES FROM `sakila` LIKE 'film\_actor' # TableParser:4588 12902 Table sakila film_actor exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`film_actor` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `actor_id`, `film_id`, `last_update` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`actor_id`,`film_id`), # TableParser:4632 12902 PRIMARY key cols: `actor_id`, `film_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: KEY `idx_fk_film_id` (`film_id`), # TableParser:4632 12902 idx_fk_film_id key cols: `film_id` # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`film_actor` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '5437', # select_type => 'SIMPLE', # table => 'film_actor', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 5437 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `sakila` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `actor_id`, `film_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`film_actor` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `actor_id`, `film_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`film_actor` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '5457', # select_type => 'SIMPLE', # table => 'film_actor', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `actor_id`, `film_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`film_actor` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.0517997741699219 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # pt_table_checksum:10415 12902 Total avg rate: 38944 # WeightedAvgRate:8787 12902 Master op time: 5457 n / 0.0517997741699219 s # WeightedAvgRate:8799 12902 Initial avg rate: 105347.949628102 n/s # WeightedAvgRate:8803 12902 Adjust n to 52673 # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='film_actor' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='sakila' AND tbl='film_actor') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`film_category` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `film_id`, `category_id`, `last_update` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`film_id`,`category_id`), # TableParser:4632 12902 PRIMARY key cols: `film_id`, `category_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: KEY `fk_film_category_category` (`category_id`), # TableParser:4632 12902 fk_film_category_category key cols: `category_id` # SchemaIterator:7509 12902 Next schema object: sakila film_category # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', `film_id`, `category_id`, UNIX_TIMESTAMP(`last_update`))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `film_id`, `category_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`film_category` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1000', # select_type => 'SIMPLE', # table => 'film_category', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY, fk_film_category_category # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `film_id`, `category_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`film_category` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `film_id`, `category_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`film_category` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `sakila`.`film_category` # TableParser:4573 12902 SHOW TABLES FROM `sakila` LIKE 'film\_category' # TableParser:4588 12902 Table sakila film_category exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`film_category` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `film_id`, `category_id`, `last_update` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`film_id`,`category_id`), # TableParser:4632 12902 PRIMARY key cols: `film_id`, `category_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: KEY `fk_film_category_category` (`category_id`), # TableParser:4632 12902 fk_film_category_category key cols: `category_id` # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`film_category` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1000', # select_type => 'SIMPLE', # table => 'film_category', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 1000 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `sakila` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `film_id`, `category_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`film_category` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `film_id`, `category_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`film_category` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1000', # select_type => 'SIMPLE', # table => 'film_category', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `film_id`, `category_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`film_category` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.00379395484924316 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # pt_table_checksum:10415 12902 Total avg rate: 41972 # WeightedAvgRate:8787 12902 Master op time: 1000 n / 0.00379395484924316 s # WeightedAvgRate:8799 12902 Initial avg rate: 263577.201030604 n/s # WeightedAvgRate:8803 12902 Adjust n to 131788 # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='film_category' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='sakila' AND tbl='film_category') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`film_text` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `film_id`, `title`, `description` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`film_id`), # TableParser:4632 12902 PRIMARY key cols: `film_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: FULLTEXT KEY `idx_title_description` (`title`,`description`) # TableParser:4632 12902 idx_title_description key cols: `title`, `description` # SchemaIterator:7509 12902 Next schema object: sakila film_text # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', `film_id`, convert(`title` using utf8mb4), CRC32(`description`), CONCAT(ISNULL(`description`)))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `film_id`, convert(`title` using utf8mb4), CRC32(`description`), CONCAT(ISNULL(`description`)))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`film_text` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1000', # select_type => 'SIMPLE', # table => 'film_text', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `film_id`, convert(`title` using utf8mb4), CRC32(`description`), CONCAT(ISNULL(`description`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`film_text` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `film_id`, convert(`title` using utf8mb4), CRC32(`description`), CONCAT(ISNULL(`description`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`film_text` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `sakila`.`film_text` # TableParser:4573 12902 SHOW TABLES FROM `sakila` LIKE 'film\_text' # TableParser:4588 12902 Table sakila film_text exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`film_text` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `film_id`, `title`, `description` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`film_id`), # TableParser:4632 12902 PRIMARY key cols: `film_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: FULLTEXT KEY `idx_title_description` (`title`,`description`) # TableParser:4632 12902 idx_title_description key cols: `title`, `description` # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`film_text` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1000', # select_type => 'SIMPLE', # table => 'film_text', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 1000 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `sakila` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `film_id`, convert(`title` using utf8mb4), CRC32(`description`), CONCAT(ISNULL(`description`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`film_text` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `film_id`, convert(`title` using utf8mb4), CRC32(`description`), CONCAT(ISNULL(`description`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`film_text` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1000', # select_type => 'SIMPLE', # table => 'film_text', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `film_id`, convert(`title` using utf8mb4), CRC32(`description`), CONCAT(ISNULL(`description`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`film_text` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.00672698020935059 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # pt_table_checksum:10415 12902 Total avg rate: 44463 # WeightedAvgRate:8787 12902 Master op time: 1000 n / 0.00672698020935059 s # WeightedAvgRate:8799 12902 Initial avg rate: 148655.112528797 n/s # WeightedAvgRate:8803 12902 Adjust n to 74327 # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='film_text' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='sakila' AND tbl='film_text') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`inventory` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `inventory_id`, `film_id`, `store_id`, `last_update` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`inventory_id`), # TableParser:4632 12902 PRIMARY key cols: `inventory_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: KEY `idx_fk_film_id` (`film_id`), # TableParser:4632 12902 idx_fk_film_id key cols: `film_id` # TableParser:4612 12902 Parsed key: KEY `idx_store_id_film_id` (`store_id`,`film_id`), # TableParser:4632 12902 idx_store_id_film_id key cols: `store_id`, `film_id` # SchemaIterator:7509 12902 Next schema object: sakila inventory # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', `inventory_id`, `film_id`, `store_id`, UNIX_TIMESTAMP(`last_update`))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `inventory_id`, `film_id`, `store_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`inventory` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '4581', # select_type => 'SIMPLE', # table => 'inventory', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY, idx_fk_film_id, idx_store_id_film_id # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `inventory_id`, `film_id`, `store_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`inventory` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `inventory_id`, `film_id`, `store_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`inventory` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `sakila`.`inventory` # TableParser:4573 12902 SHOW TABLES FROM `sakila` LIKE 'inventory' # TableParser:4588 12902 Table sakila inventory exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`inventory` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `inventory_id`, `film_id`, `store_id`, `last_update` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`inventory_id`), # TableParser:4632 12902 PRIMARY key cols: `inventory_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: KEY `idx_fk_film_id` (`film_id`), # TableParser:4632 12902 idx_fk_film_id key cols: `film_id` # TableParser:4612 12902 Parsed key: KEY `idx_store_id_film_id` (`store_id`,`film_id`), # TableParser:4632 12902 idx_store_id_film_id key cols: `store_id`, `film_id` # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`inventory` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '4581', # select_type => 'SIMPLE', # table => 'inventory', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 4581 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `sakila` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `inventory_id`, `film_id`, `store_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`inventory` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `inventory_id`, `film_id`, `store_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`inventory` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '4581', # select_type => 'SIMPLE', # table => 'inventory', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `inventory_id`, `film_id`, `store_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`inventory` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.00701904296875 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # pt_table_checksum:10415 12902 Total avg rate: 58926 # WeightedAvgRate:8787 12902 Master op time: 4581 n / 0.00701904296875 s # WeightedAvgRate:8799 12902 Initial avg rate: 652653.07826087 n/s # WeightedAvgRate:8803 12902 Adjust n to 326326 # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='inventory' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='sakila' AND tbl='inventory') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`language` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `language_id`, `name`, `last_update` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`language_id`) # TableParser:4632 12902 PRIMARY key cols: `language_id` # TableParser:4654 12902 This key is the clustered key # SchemaIterator:7509 12902 Next schema object: sakila language # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', `language_id`, convert(`name` using utf8mb4), UNIX_TIMESTAMP(`last_update`))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `language_id`, convert(`name` using utf8mb4), UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`language` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '6', # select_type => 'SIMPLE', # table => 'language', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `language_id`, convert(`name` using utf8mb4), UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`language` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `language_id`, convert(`name` using utf8mb4), UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`language` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `sakila`.`language` # TableParser:4573 12902 SHOW TABLES FROM `sakila` LIKE 'language' # TableParser:4588 12902 Table sakila language exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`language` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `language_id`, `name`, `last_update` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`language_id`) # TableParser:4632 12902 PRIMARY key cols: `language_id` # TableParser:4654 12902 This key is the clustered key # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`language` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '6', # select_type => 'SIMPLE', # table => 'language', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 6 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `sakila` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `language_id`, convert(`name` using utf8mb4), UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`language` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `language_id`, convert(`name` using utf8mb4), UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`language` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '6', # select_type => 'SIMPLE', # table => 'language', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `language_id`, convert(`name` using utf8mb4), UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`language` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.00357317924499512 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # pt_table_checksum:10415 12902 Total avg rate: 58241 # WeightedAvgRate:8787 12902 Master op time: 6 n / 0.00357317924499512 s # WeightedAvgRate:8799 12902 Initial avg rate: 1679.17688663508 n/s # WeightedAvgRate:8803 12902 Adjust n to 839 # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='language' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='sakila' AND tbl='language') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`payment` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `payment_id`, `customer_id`, `staff_id`, `rental_id`, `amount`, `payment_date`, `last_update` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`payment_id`), # TableParser:4632 12902 PRIMARY key cols: `payment_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: KEY `idx_fk_staff_id` (`staff_id`), # TableParser:4632 12902 idx_fk_staff_id key cols: `staff_id` # TableParser:4612 12902 Parsed key: KEY `idx_fk_customer_id` (`customer_id`), # TableParser:4632 12902 idx_fk_customer_id key cols: `customer_id` # TableParser:4612 12902 Parsed key: KEY `fk_payment_rental` (`rental_id`), # TableParser:4632 12902 fk_payment_rental key cols: `rental_id` # SchemaIterator:7509 12902 Next schema object: sakila payment # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', `payment_id`, `customer_id`, `staff_id`, `rental_id`, `amount`, `payment_date`, UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`rental_id`)))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `payment_id`, `customer_id`, `staff_id`, `rental_id`, `amount`, `payment_date`, UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`rental_id`)))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`payment` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '16086', # select_type => 'SIMPLE', # table => 'payment', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY, idx_fk_customer_id, idx_fk_staff_id, fk_payment_rental # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `payment_id`, `customer_id`, `staff_id`, `rental_id`, `amount`, `payment_date`, UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`rental_id`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`payment` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `payment_id`, `customer_id`, `staff_id`, `rental_id`, `amount`, `payment_date`, UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`rental_id`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`payment` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `sakila`.`payment` # TableParser:4573 12902 SHOW TABLES FROM `sakila` LIKE 'payment' # TableParser:4588 12902 Table sakila payment exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`payment` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `payment_id`, `customer_id`, `staff_id`, `rental_id`, `amount`, `payment_date`, `last_update` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`payment_id`), # TableParser:4632 12902 PRIMARY key cols: `payment_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: KEY `idx_fk_staff_id` (`staff_id`), # TableParser:4632 12902 idx_fk_staff_id key cols: `staff_id` # TableParser:4612 12902 Parsed key: KEY `idx_fk_customer_id` (`customer_id`), # TableParser:4632 12902 idx_fk_customer_id key cols: `customer_id` # TableParser:4612 12902 Parsed key: KEY `fk_payment_rental` (`rental_id`), # TableParser:4632 12902 fk_payment_rental key cols: `rental_id` # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`payment` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '16086', # select_type => 'SIMPLE', # table => 'payment', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 16086 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `sakila` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `payment_id`, `customer_id`, `staff_id`, `rental_id`, `amount`, `payment_date`, UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`rental_id`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`payment` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `payment_id`, `customer_id`, `staff_id`, `rental_id`, `amount`, `payment_date`, UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`rental_id`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`payment` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '16086', # select_type => 'SIMPLE', # table => 'payment', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `payment_id`, `customer_id`, `staff_id`, `rental_id`, `amount`, `payment_date`, UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`rental_id`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`payment` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.0612361431121826 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # pt_table_checksum:10415 12902 Total avg rate: 92917 # WeightedAvgRate:8787 12902 Master op time: 16049 n / 0.0612361431121826 s # WeightedAvgRate:8799 12902 Initial avg rate: 262083.782295021 n/s # WeightedAvgRate:8803 12902 Adjust n to 131041 # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='payment' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='sakila' AND tbl='payment') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`ple` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `id`, `name` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`id`) # TableParser:4632 12902 PRIMARY key cols: `id` # TableParser:4654 12902 This key is the clustered key # SchemaIterator:7509 12902 Next schema object: sakila ple # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', `id`, convert(`name` using utf8mb4), CONCAT(ISNULL(`name`)))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `id`, convert(`name` using utf8mb4), CONCAT(ISNULL(`name`)))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`ple` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1', # select_type => 'SIMPLE', # table => 'ple', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `id`, convert(`name` using utf8mb4), CONCAT(ISNULL(`name`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`ple` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `id`, convert(`name` using utf8mb4), CONCAT(ISNULL(`name`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`ple` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `sakila`.`ple` # TableParser:4573 12902 SHOW TABLES FROM `sakila` LIKE 'ple' # TableParser:4588 12902 Table sakila ple exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`ple` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `id`, `name` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`id`) # TableParser:4632 12902 PRIMARY key cols: `id` # TableParser:4654 12902 This key is the clustered key # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`ple` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1', # select_type => 'SIMPLE', # table => 'ple', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 1 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `sakila` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `id`, convert(`name` using utf8mb4), CONCAT(ISNULL(`name`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`ple` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `id`, convert(`name` using utf8mb4), CONCAT(ISNULL(`name`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`ple` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '1', # select_type => 'SIMPLE', # table => 'ple', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `id`, convert(`name` using utf8mb4), CONCAT(ISNULL(`name`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`ple` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.00339913368225098 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='ple' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='sakila' AND tbl='ple') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`rental` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `rental_id`, `rental_date`, `inventory_id`, `customer_id`, `return_date`, `staff_id`, `last_update` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`rental_id`), # TableParser:4632 12902 PRIMARY key cols: `rental_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: UNIQUE KEY `rental_date` (`rental_date`,`inventory_id`,`customer_id`), # TableParser:4632 12902 rental_date key cols: `rental_date`, `inventory_id`, `customer_id` # TableParser:4612 12902 Parsed key: KEY `idx_fk_inventory_id` (`inventory_id`), # TableParser:4632 12902 idx_fk_inventory_id key cols: `inventory_id` # TableParser:4612 12902 Parsed key: KEY `idx_fk_customer_id` (`customer_id`), # TableParser:4632 12902 idx_fk_customer_id key cols: `customer_id` # TableParser:4612 12902 Parsed key: KEY `idx_fk_staff_id` (`staff_id`), # TableParser:4632 12902 idx_fk_staff_id key cols: `staff_id` # SchemaIterator:7509 12902 Next schema object: sakila rental # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', `rental_id`, `rental_date`, `inventory_id`, `customer_id`, `return_date`, `staff_id`, UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`return_date`)))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `rental_id`, `rental_date`, `inventory_id`, `customer_id`, `return_date`, `staff_id`, UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`return_date`)))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`rental` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '16005', # select_type => 'SIMPLE', # table => 'rental', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY, rental_date, idx_fk_customer_id, idx_fk_inventory_id, idx_fk_staff_id # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `rental_id`, `rental_date`, `inventory_id`, `customer_id`, `return_date`, `staff_id`, UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`return_date`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`rental` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `rental_id`, `rental_date`, `inventory_id`, `customer_id`, `return_date`, `staff_id`, UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`return_date`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`rental` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `sakila`.`rental` # TableParser:4573 12902 SHOW TABLES FROM `sakila` LIKE 'rental' # TableParser:4588 12902 Table sakila rental exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`rental` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `rental_id`, `rental_date`, `inventory_id`, `customer_id`, `return_date`, `staff_id`, `last_update` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`rental_id`), # TableParser:4632 12902 PRIMARY key cols: `rental_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: UNIQUE KEY `rental_date` (`rental_date`,`inventory_id`,`customer_id`), # TableParser:4632 12902 rental_date key cols: `rental_date`, `inventory_id`, `customer_id` # TableParser:4612 12902 Parsed key: KEY `idx_fk_inventory_id` (`inventory_id`), # TableParser:4632 12902 idx_fk_inventory_id key cols: `inventory_id` # TableParser:4612 12902 Parsed key: KEY `idx_fk_customer_id` (`customer_id`), # TableParser:4632 12902 idx_fk_customer_id key cols: `customer_id` # TableParser:4612 12902 Parsed key: KEY `idx_fk_staff_id` (`staff_id`), # TableParser:4632 12902 idx_fk_staff_id key cols: `staff_id` # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`rental` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '16005', # select_type => 'SIMPLE', # table => 'rental', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 16005 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `sakila` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `rental_id`, `rental_date`, `inventory_id`, `customer_id`, `return_date`, `staff_id`, UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`return_date`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`rental` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `rental_id`, `rental_date`, `inventory_id`, `customer_id`, `return_date`, `staff_id`, UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`return_date`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`rental` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '16005', # select_type => 'SIMPLE', # table => 'rental', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `rental_id`, `rental_date`, `inventory_id`, `customer_id`, `return_date`, `staff_id`, UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`return_date`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`rental` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.0604329109191895 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # pt_table_checksum:10415 12902 Total avg rate: 117723 # WeightedAvgRate:8787 12902 Master op time: 16044 n / 0.0604329109191895 s # WeightedAvgRate:8799 12902 Initial avg rate: 265484.481153886 n/s # WeightedAvgRate:8803 12902 Adjust n to 132742 # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='rental' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='sakila' AND tbl='rental') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`staff` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `staff_id`, `first_name`, `last_name`, `address_id`, `picture`, `email`, `store_id`, `active`, `username`, `password`, `last_update` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`staff_id`), # TableParser:4632 12902 PRIMARY key cols: `staff_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: KEY `idx_fk_store_id` (`store_id`), # TableParser:4632 12902 idx_fk_store_id key cols: `store_id` # TableParser:4612 12902 Parsed key: KEY `idx_fk_address_id` (`address_id`), # TableParser:4632 12902 idx_fk_address_id key cols: `address_id` # SchemaIterator:7509 12902 Next schema object: sakila staff # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', `staff_id`, convert(`first_name` using utf8mb4), convert(`last_name` using utf8mb4), `address_id`, CRC32(`picture`), convert(`email` using utf8mb4), `store_id`, `active`, convert(`username` using utf8mb4), convert(`password` using utf8mb4), UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`picture`), ISNULL(`email`), ISNULL(`password`)))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `staff_id`, convert(`first_name` using utf8mb4), convert(`last_name` using utf8mb4), `address_id`, CRC32(`picture`), convert(`email` using utf8mb4), `store_id`, `active`, convert(`username` using utf8mb4), convert(`password` using utf8mb4), UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`picture`), ISNULL(`email`), ISNULL(`password`)))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`staff` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '2', # select_type => 'SIMPLE', # table => 'staff', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY, idx_fk_address_id, idx_fk_store_id # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `staff_id`, convert(`first_name` using utf8mb4), convert(`last_name` using utf8mb4), `address_id`, CRC32(`picture`), convert(`email` using utf8mb4), `store_id`, `active`, convert(`username` using utf8mb4), convert(`password` using utf8mb4), UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`picture`), ISNULL(`email`), ISNULL(`password`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`staff` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `staff_id`, convert(`first_name` using utf8mb4), convert(`last_name` using utf8mb4), `address_id`, CRC32(`picture`), convert(`email` using utf8mb4), `store_id`, `active`, convert(`username` using utf8mb4), convert(`password` using utf8mb4), UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`picture`), ISNULL(`email`), ISNULL(`password`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`staff` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `sakila`.`staff` # TableParser:4573 12902 SHOW TABLES FROM `sakila` LIKE 'staff' # TableParser:4588 12902 Table sakila staff exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`staff` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `staff_id`, `first_name`, `last_name`, `address_id`, `picture`, `email`, `store_id`, `active`, `username`, `password`, `last_update` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`staff_id`), # TableParser:4632 12902 PRIMARY key cols: `staff_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: KEY `idx_fk_store_id` (`store_id`), # TableParser:4632 12902 idx_fk_store_id key cols: `store_id` # TableParser:4612 12902 Parsed key: KEY `idx_fk_address_id` (`address_id`), # TableParser:4632 12902 idx_fk_address_id key cols: `address_id` # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`staff` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '2', # select_type => 'SIMPLE', # table => 'staff', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 2 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `sakila` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `staff_id`, convert(`first_name` using utf8mb4), convert(`last_name` using utf8mb4), `address_id`, CRC32(`picture`), convert(`email` using utf8mb4), `store_id`, `active`, convert(`username` using utf8mb4), convert(`password` using utf8mb4), UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`picture`), ISNULL(`email`), ISNULL(`password`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`staff` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `staff_id`, convert(`first_name` using utf8mb4), convert(`last_name` using utf8mb4), `address_id`, CRC32(`picture`), convert(`email` using utf8mb4), `store_id`, `active`, convert(`username` using utf8mb4), convert(`password` using utf8mb4), UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`picture`), ISNULL(`email`), ISNULL(`password`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`staff` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '2', # select_type => 'SIMPLE', # table => 'staff', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `staff_id`, convert(`first_name` using utf8mb4), convert(`last_name` using utf8mb4), `address_id`, CRC32(`picture`), convert(`email` using utf8mb4), `store_id`, `active`, convert(`username` using utf8mb4), convert(`password` using utf8mb4), UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`picture`), ISNULL(`email`), ISNULL(`password`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`staff` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.00575613975524902 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # pt_table_checksum:10415 12902 Total avg rate: 116138 # WeightedAvgRate:8787 12902 Master op time: 2 n / 0.00575613975524902 s # WeightedAvgRate:8799 12902 Initial avg rate: 347.455080147455 n/s # WeightedAvgRate:8803 12902 Adjust n to 173 # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='staff' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='sakila' AND tbl='staff') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`store` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `store_id`, `manager_staff_id`, `address_id`, `last_update` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`store_id`), # TableParser:4632 12902 PRIMARY key cols: `store_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: UNIQUE KEY `idx_unique_manager` (`manager_staff_id`), # TableParser:4632 12902 idx_unique_manager key cols: `manager_staff_id` # TableParser:4612 12902 Parsed key: KEY `idx_fk_address_id` (`address_id`), # TableParser:4632 12902 idx_fk_address_id key cols: `address_id` # SchemaIterator:7509 12902 Next schema object: sakila store # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', `store_id`, `manager_staff_id`, `address_id`, UNIX_TIMESTAMP(`last_update`))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `store_id`, `manager_staff_id`, `address_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`store` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '2', # select_type => 'SIMPLE', # table => 'store', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY, idx_unique_manager, idx_fk_address_id # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `store_id`, `manager_staff_id`, `address_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`store` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `store_id`, `manager_staff_id`, `address_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`store` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `sakila`.`store` # TableParser:4573 12902 SHOW TABLES FROM `sakila` LIKE 'store' # TableParser:4588 12902 Table sakila store exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `sakila` # TableParser:4402 12902 SHOW CREATE TABLE `sakila`.`store` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `store_id`, `manager_staff_id`, `address_id`, `last_update` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`store_id`), # TableParser:4632 12902 PRIMARY key cols: `store_id` # TableParser:4654 12902 This key is the clustered key # TableParser:4612 12902 Parsed key: UNIQUE KEY `idx_unique_manager` (`manager_staff_id`), # TableParser:4632 12902 idx_unique_manager key cols: `manager_staff_id` # TableParser:4612 12902 Parsed key: KEY `idx_fk_address_id` (`address_id`), # TableParser:4632 12902 idx_fk_address_id key cols: `address_id` # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sakila`.`store` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '2', # select_type => 'SIMPLE', # table => 'store', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 2 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `sakila` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `store_id`, `manager_staff_id`, `address_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`store` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `store_id`, `manager_staff_id`, `address_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`store` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '2', # select_type => 'SIMPLE', # table => 'store', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `store_id`, `manager_staff_id`, `address_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`store` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.00357913970947266 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # pt_table_checksum:10415 12902 Total avg rate: 115175 # WeightedAvgRate:8787 12902 Master op time: 2 n / 0.00357913970947266 s # WeightedAvgRate:8799 12902 Initial avg rate: 558.793498534506 n/s # WeightedAvgRate:8803 12902 Adjust n to 279 # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='store' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='sakila' AND tbl='store') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # SchemaIterator:7657 12902 No more tables in database sakila # SchemaIterator:7603 12902 Next database: sys # SchemaIterator:7609 12902 SHOW /*!50002 FULL*/ TABLES FROM `sys` # SchemaIterator:7627 12902 Found 1 tables in database sys # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2657470) USE `sys` # TableParser:4402 12902 SHOW CREATE TABLE `sys`.`sys_config` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `variable`, `value`, `set_time`, `set_by` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`variable`) # TableParser:4632 12902 PRIMARY key cols: `variable` # TableParser:4654 12902 This key is the clustered key # SchemaIterator:7509 12902 Next schema object: sys sys_config # RowChecksum:5897 12902 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5879 12902 Row checksum: CRC32(CONCAT_WS('#', convert(`variable` using utf8mb4), convert(`value` using utf8mb4), UNIX_TIMESTAMP(`set_time`), convert(`set_by` using utf8mb4), CONCAT(ISNULL(`value`), ISNULL(`set_by`)))) # RowChecksum:5918 12902 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`variable` using utf8mb4), convert(`value` using utf8mb4), UNIX_TIMESTAMP(`set_time`), convert(`set_by` using utf8mb4), CONCAT(ISNULL(`value`), ISNULL(`set_by`)))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sys`.`sys_config` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '6', # select_type => 'SIMPLE', # table => 'sys_config', # type => 'ALL' # }; # # NibbleIterator:6598 12902 One nibble: yes # NibbleIterator:6660 12902 Auto-selecting best index # TableParser:4508 12902 Indexes sorted best-first: PRIMARY # NibbleIterator:6693 12902 Best index: PRIMARY # NibbleIterator:6246 12902 One nibble statement: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`variable` using utf8mb4), convert(`value` using utf8mb4), UNIX_TIMESTAMP(`set_time`), convert(`set_by` using utf8mb4), CONCAT(ISNULL(`value`), ISNULL(`set_by`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sys`.`sys_config` /*checksum table*/ # NibbleIterator:6256 12902 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`variable` using utf8mb4), convert(`value` using utf8mb4), UNIX_TIMESTAMP(`set_time`), convert(`set_by` using utf8mb4), CONCAT(ISNULL(`value`), ISNULL(`set_by`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sys`.`sys_config` /*explain checksum table*/ # OobNibbleIterator:7040 12902 Preparing out-of-bound statement handles # NibbleIterator:6740 12902 Preparing statement handles # TableParser:4567 12902 Checking `sys`.`sys_config` # TableParser:4573 12902 SHOW TABLES FROM `sys` LIKE 'sys\_config' # TableParser:4588 12902 Table sys sys_config exists # TableParser:4393 12902 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4398 12902 DBI::db=HASH(0x2662fd8) USE `sys` # TableParser:4402 12902 SHOW CREATE TABLE `sys`.`sys_config` # TableParser:4412 12902 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4444 12902 Table cols: `variable`, `value`, `set_time`, `set_by` # TableParser:4596 12902 Storage engine: InnoDB # TableParser:4612 12902 Parsed key: PRIMARY KEY (`variable`) # TableParser:4632 12902 PRIMARY key cols: `variable` # TableParser:4654 12902 This key is the clustered key # pt_table_checksum:10134 12902 Getting table row estimate on slave # NibbleIterator:6728 12902 EXPLAIN SELECT * FROM `sys`.`sys_config` WHERE 1=1 # NibbleIterator:6730 12902 $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '6', # select_type => 'SIMPLE', # table => 'sys_config', # type => 'ALL' # }; # # pt_table_checksum:10170 12902 Table on slave has 6 rows # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `percona` # pt_table_checksum:10236 12902 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11363 12902 use_repl_db # pt_table_checksum:11384 12902 USE `sys` # NibbleIterator:6414 12902 init callback returned 1 # NibbleIterator:6450 12902 Nibble: REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`variable` using utf8mb4), convert(`value` using utf8mb4), UNIX_TIMESTAMP(`set_time`), convert(`set_by` using utf8mb4), CONCAT(ISNULL(`value`), ISNULL(`set_by`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sys`.`sys_config` /*checksum table*/ params: # pt_table_checksum:11449 12902 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`variable` using utf8mb4), convert(`value` using utf8mb4), UNIX_TIMESTAMP(`set_time`), convert(`set_by` using utf8mb4), CONCAT(ISNULL(`value`), ISNULL(`set_by`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sys`.`sys_config` /*explain checksum table*/ params: # pt_table_checksum:11459 12902 EXPLAIN plan: $VAR1 = { # extra => undef, # filtered => '100.00', # id => '1', # key => undef, # key_len => undef, # partitions => undef, # possible_keys => undef, # ref => undef, # rows => '6', # select_type => 'SIMPLE', # table => 'sys_config', # type => 'ALL' # }; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Quoter:4081 12902 Serializing $VAR1 = []; # # Retry:7882 12902 Try 1 of 2 # pt_table_checksum:10829 12902 REPLACE INTO `percona`.`checksums` (db, tbl, chunk, chunk_index, lower_boundary, upper_boundary, this_cnt, this_crc) SELECT ?, ?, ?, ?, ?, ?, COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', convert(`variable` using utf8mb4), convert(`value` using utf8mb4), UNIX_TIMESTAMP(`set_time`), convert(`set_by` using utf8mb4), CONCAT(ISNULL(`value`), ISNULL(`set_by`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sys`.`sys_config` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10850 12902 SHOW WARNINGS # Retry:7899 12902 Try code succeeded # pt_table_checksum:10351 12902 Nibble time: 0.0270400047302246 # NibbleIterator:6458 12902 0 rows in nibble 1 # NibbleIterator:6470 12902 No rows in nibble or nibble skipped # pt_table_checksum:10415 12902 Total avg rate: 108370 # WeightedAvgRate:8787 12902 Master op time: 6 n / 0.0270400047302246 s # WeightedAvgRate:8799 12902 Initial avg rate: 221.893452307475 n/s # WeightedAvgRate:8803 12902 Adjust n to 110 # ReplicaLagWaiter:8498 12902 Checking slave lag # MasterSlave:5378 12902 DBI::db=HASH(0x2662fd8) SHOW SLAVE STATUS # ReplicaLagWaiter:8501 12902 slave slave lag: 0 # ReplicaLagWaiter:8534 12902 All slaves caught up # MySQLStatusWaiter:8676 12902 Checking status variables # pt_table_checksum:9920 12902 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8679 12902 Threads_running = 2 # MySQLStatusWaiter:8706 12902 All var vals are low enough # OobNibbleIterator:7081 12902 Done nibbling past boundaries # NibbleIterator:6479 12902 Done nibbling # pt_table_checksum:10474 12902 Checking slave diffs # pt_table_checksum:11543 12902 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sys' AND tbl='sys_config' AND master_crc IS NOT NULL # pt_table_checksum:11561 12902 Getting last checksum on slave # pt_table_checksum:11564 12902 slave max chunk: 1 # RowChecksum:6162 12902 SELECT CONCAT(db, '.', tbl) AS `table`, chunk, chunk_index, lower_boundary, upper_boundary, COALESCE(this_cnt-master_cnt, 0) AS cnt_diff, COALESCE(this_crc <> master_crc OR ISNULL(master_crc) <> ISNULL(this_crc), 0) AS crc_diff, this_cnt, master_cnt, this_crc, master_crc FROM `percona`.`checksums` WHERE (master_cnt <> this_cnt OR master_crc <> this_crc OR ISNULL(master_crc) <> ISNULL(this_crc)) AND (db='sys' AND tbl='sys_config') # pt_table_checksum:10506 12902 0 checksum diffs on slave # OobNibbleIterator:7089 12902 Finish nibble_sth # OobNibbleIterator:7089 12902 Finish explain_nibble_sth # SchemaIterator:7586 12902 Getting next schema object from dbh DBI::db=HASH(0x2657470) # SchemaIterator:7657 12902 No more tables in database sys # SchemaIterator:7662 12902 No more databases # pt_table_checksum:10701 12902 Exit status 0 oktorun 1 have time 1 # Cxn:3764 12902 Destroying cxn # Cxn:3773 12902 DBI::db=HASH(0x2662fd8) Disconnecting dbh on slave h=192.168.70.2 # Cxn:3764 12902 Destroying cxn # Cxn:3773 12902 DBI::db=HASH(0x2657470) Disconnecting dbh on master h=localhost TS ERRORS DIFFS ROWS CHUNKS SKIPPED TIME TABLE 09-21T12:48:25 0 0 0 1 0 0.056 mysql.columns_priv 09-21T12:48:25 0 0 4 1 0 0.048 mysql.db 09-21T12:48:25 0 0 2 1 0 0.099 mysql.engine_cost 09-21T12:48:25 0 0 0 1 0 0.087 mysql.event 09-21T12:48:25 0 0 0 1 0 0.041 mysql.func 09-21T12:48:25 0 0 40 1 0 0.054 mysql.help_category 09-21T12:48:25 0 0 485 1 0 0.044 mysql.help_keyword 09-21T12:48:25 0 0 1090 1 0 0.044 mysql.help_relation 09-21T12:48:25 0 0 533 1 0 0.045 mysql.help_topic 09-21T12:48:26 0 0 0 1 0 0.045 mysql.ndb_binlog_index 09-21T12:48:26 0 0 0 1 0 0.027 mysql.plugin 09-21T12:48:26 0 0 54 1 0 0.186 mysql.proc 09-21T12:48:26 0 0 0 1 0 0.046 mysql.procs_priv 09-21T12:48:26 0 0 1 1 0 0.106 mysql.proxies_priv 09-21T12:48:26 0 0 6 1 0 0.039 mysql.server_cost 09-21T12:48:26 0 0 0 1 0 0.027 mysql.servers 09-21T12:48:26 0 0 1 1 0 0.040 mysql.tables_priv 09-21T12:48:26 0 0 0 1 0 0.039 mysql.time_zone 09-21T12:48:26 0 0 0 1 0 0.039 mysql.time_zone_leap_second 09-21T12:48:26 0 0 0 1 0 0.023 mysql.time_zone_name 09-21T12:48:26 0 0 0 1 0 0.051 mysql.time_zone_transition 09-21T12:48:26 0 0 0 1 0 0.027 mysql.time_zone_transition_type 09-21T12:48:26 0 0 12 1 0 0.056 mysql.user 09-21T12:48:26 0 0 200 1 0 0.041 sakila.actor 09-21T12:48:26 0 0 603 1 0 0.042 sakila.address 09-21T12:48:26 0 0 16 1 0 0.026 sakila.category 09-21T12:48:27 0 0 600 1 0 0.084 sakila.city 09-21T12:48:27 0 0 109 1 0 0.041 sakila.country 09-21T12:48:27 0 0 599 1 0 0.042 sakila.customer 09-21T12:48:27 0 0 1000 1 0 0.145 sakila.film 09-21T12:48:27 0 0 5457 1 0 0.112 sakila.film_actor 09-21T12:48:27 0 0 1000 1 0 0.041 sakila.film_category 09-21T12:48:27 0 0 1000 1 0 0.040 sakila.film_text 09-21T12:48:27 0 0 4581 1 0 0.045 sakila.inventory 09-21T12:48:27 0 0 6 1 0 0.042 sakila.language 09-21T12:48:27 0 0 16049 1 0 0.098 sakila.payment 09-21T12:48:27 0 0 0 1 0 0.024 sakila.ple 09-21T12:48:27 0 0 16044 1 0 0.125 sakila.rental 09-21T12:48:27 0 0 2 1 0 0.042 sakila.staff 09-21T12:48:27 0 0 2 1 0 0.026 sakila.store 09-21T12:48:28 0 0 6 1 0 0.108 sys.sys_config