# /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 12873 Option rule: This tool accepts additional command-line arguments. Refer to the SYNOPSIS and usage information for details. # OptionParser:1961 12873 =item --ask-pass # OptionParser:1988 12873 Short help: Prompt for a password when connecting to MySQL # OptionParser:1961 12873 =item --[no]check-binlog-format # OptionParser:1988 12873 Short help: Check that the binlog_format is the same on all servers # OptionParser:1961 12873 =item --binary-index # OptionParser:1980 12873 Option has no attributes # OptionParser:1988 12873 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 12873 =item --check-interval # OptionParser:1988 12873 Short help: Sleep time between checks for --max-lag # OptionParser:1961 12873 =item --[no]check-plan # OptionParser:1988 12873 Short help: Check query execution plans for safety # OptionParser:1961 12873 =item --[no]check-replication-filters # OptionParser:1988 12873 Short help: Do not checksum if any replication filters are set on any replicas # OptionParser:1961 12873 =item --check-slave-lag # OptionParser:1988 12873 Short help: Pause checksumming until this replica's lag is less than --max-lag # OptionParser:1961 12873 =item --[no]check-slave-tables # OptionParser:1988 12873 Short help: Checks that tables on slaves exist and have all the checksum --columns # OptionParser:1961 12873 =item --chunk-index # OptionParser:1988 12873 Short help: Prefer this index for chunking tables # OptionParser:1961 12873 =item --chunk-index-columns # OptionParser:1988 12873 Short help: Use only this many left-most columns of a --chunk-index # OptionParser:1961 12873 =item --chunk-size # OptionParser:1988 12873 Short help: Number of rows to select for each checksum query # OptionParser:1961 12873 =item --chunk-size-limit # OptionParser:1988 12873 Short help: Do not checksum chunks this much larger than the desired chunk size # OptionParser:1961 12873 =item --chunk-time # OptionParser:1988 12873 Short help: Adjust the chunk size dynamically so each checksum query takes this long to execute # OptionParser:1961 12873 =item --columns # OptionParser:1988 12873 Short help: Checksum only this comma-separated list of columns # OptionParser:1961 12873 =item --config # OptionParser:1988 12873 Short help: Read this comma-separated list of config files; if specified, this must be the first option on the command line # OptionParser:1961 12873 =item --[no]create-replicate-table # OptionParser:1988 12873 Short help: Create the --replicate database and table if they do not exist # OptionParser:1961 12873 =item --databases # OptionParser:1988 12873 Short help: Only checksum this comma-separated list of databases # OptionParser:1961 12873 =item --databases-regex # OptionParser:1988 12873 Short help: Only checksum databases whose names match this Perl regex # OptionParser:1961 12873 =item --defaults-file # OptionParser:1988 12873 Short help: Only read mysql options from the given file # OptionParser:1961 12873 =item --[no]empty-replicate-table # OptionParser:1988 12873 Short help: Delete previous checksums for each table before checksumming the table # OptionParser:1961 12873 =item --engines # OptionParser:1988 12873 Short help: Only checksum tables which use these storage engines # OptionParser:1961 12873 =item --explain # OptionParser:1988 12873 Short help: Show, but do not execute, checksum queries (disables --[no]empty-replicate-table) # OptionParser:1961 12873 =item --float-precision # OptionParser:1988 12873 Short help: Precision for FLOAT and DOUBLE number-to-string conversion # OptionParser:1961 12873 =item --function # OptionParser:1988 12873 Short help: Hash function for checksums (FNV1A_64, MURMUR_HASH, SHA1, MD5, CRC32, etc) # OptionParser:1961 12873 =item --help # OptionParser:1988 12873 Short help: Show help and exit # OptionParser:1961 12873 =item --host # OptionParser:1988 12873 Short help: Host to connect to # OptionParser:1961 12873 =item --ignore-columns # OptionParser:1988 12873 Short help: Ignore this comma-separated list of columns when calculating the checksum # OptionParser:1961 12873 =item --ignore-databases # OptionParser:1988 12873 Short help: Ignore this comma-separated list of databases # OptionParser:1961 12873 =item --ignore-databases-regex # OptionParser:1988 12873 Short help: Ignore databases whose names match this Perl regex # OptionParser:1961 12873 =item --ignore-engines # OptionParser:1988 12873 Short help: Ignore this comma-separated list of storage engines # OptionParser:1961 12873 =item --ignore-tables # OptionParser:1988 12873 Short help: Ignore this comma-separated list of tables # OptionParser:1961 12873 =item --ignore-tables-regex # OptionParser:1988 12873 Short help: Ignore tables whose names match the Perl regex # OptionParser:1961 12873 =item --max-lag # OptionParser:1988 12873 Short help: Pause checksumming until all replicas' lag is less than this value # OptionParser:1961 12873 =item --max-load # OptionParser:1988 12873 Short help: Examine SHOW GLOBAL STATUS after every chunk, and pause if any status variables are higher than the threshold # OptionParser:1961 12873 =item --password # OptionParser:1988 12873 Short help: Password to use when connecting # OptionParser:1961 12873 =item --pause-file # OptionParser:1988 12873 Short help: Execution will be paused while the file specified by this param exists # OptionParser:1961 12873 =item --pid # OptionParser:1988 12873 Short help: Create the given PID file # OptionParser:1961 12873 =item --plugin # OptionParser:1988 12873 Short help: Perl module file that defines a pt_table_checksum_plugin class # OptionParser:1961 12873 =item --port # OptionParser:1988 12873 Short help: Port number to use for connection # OptionParser:1961 12873 =item --progress # OptionParser:1988 12873 Short help: Print progress reports to STDERR # OptionParser:1961 12873 =item --quiet # OptionParser:1988 12873 Short help: Print only the most important information (disables --progress) # OptionParser:1961 12873 =item --recurse # OptionParser:1988 12873 Short help: Number of levels to recurse in the hierarchy when discovering replicas # OptionParser:1961 12873 =item --recursion-method # OptionParser:1988 12873 Short help: Preferred recursion method for discovering replicas. pt-table-checksum performs several REPLICA CHECKS before and while running # OptionParser:1961 12873 =item --replicate # OptionParser:1988 12873 Short help: Write checksum results to this table # OptionParser:1961 12873 =item --[no]replicate-check # OptionParser:1988 12873 Short help: Check replicas for data differences after finishing each table # OptionParser:1961 12873 =item --replicate-check-only # OptionParser:1980 12873 Option has no attributes # OptionParser:1988 12873 Short help: Check replicas for consistency without executing checksum queries # OptionParser:1961 12873 =item --replicate-check-retries # OptionParser:1988 12873 Short help: Retry checksum comparison this many times when a difference is encountered # OptionParser:1961 12873 =item --replicate-database # OptionParser:1988 12873 Short help: USE only this database # OptionParser:1961 12873 =item --resume # OptionParser:1980 12873 Option has no attributes # OptionParser:1988 12873 Short help: Resume checksumming from the last completed chunk (disables --[no]empty-replicate-table) # OptionParser:1961 12873 =item --retries # OptionParser:1988 12873 Short help: Retry a chunk this many times when there is a nonfatal error # OptionParser:1961 12873 =item --run-time # OptionParser:1988 12873 Short help: How long to run # OptionParser:1961 12873 =item --separator # OptionParser:1988 12873 Short help: The separator character used for CONCAT_WS() # OptionParser:1961 12873 =item --skip-check-slave-lag # OptionParser:1988 12873 Short help: DSN to skip when checking slave lag # OptionParser:1961 12873 =item --slave-user # OptionParser:1988 12873 Short help: Sets the user to be used to connect to the slaves # OptionParser:1961 12873 =item --slave-password # OptionParser:1988 12873 Short help: Sets the password to be used to connect to the slaves # OptionParser:1961 12873 =item --set-vars # OptionParser:1988 12873 Short help: Set the MySQL variables in this comma-separated list of variable=value pairs # OptionParser:1961 12873 =item --socket # OptionParser:1988 12873 Short help: Socket file to use for connection # OptionParser:1961 12873 =item --slave-skip-tolerance # OptionParser:1988 12873 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 12873 =item --tables # OptionParser:1988 12873 Short help: Checksum only this comma-separated list of tables # OptionParser:1961 12873 =item --tables-regex # OptionParser:1988 12873 Short help: Checksum only tables whose names match this Perl regex # OptionParser:1961 12873 =item --trim # OptionParser:1980 12873 Option has no attributes # OptionParser:1988 12873 Short help: Add TRIM() to VARCHAR columns (helps when comparing 4.1 to >= 5.0) # OptionParser:1961 12873 =item --user # OptionParser:1988 12873 Short help: User for login if not current user # OptionParser:1961 12873 =item --version # OptionParser:1988 12873 Short help: Show version and exit # OptionParser:1961 12873 =item --[no]version-check # OptionParser:1988 12873 Short help: Check for the latest version of Percona Toolkit, MySQL, and other programs # OptionParser:1961 12873 =item --where # OptionParser:1988 12873 Short help: Do only rows matching this WHERE clause # OptionParser:2028 12873 Parsing opt spec: group => Connection spec => ask-pass desc => Prompt for a password when connecting to MySQL attributes => HASH(0x153ce88) # OptionParser:2067 12873 ask-pass type: undef # OptionParser:2028 12873 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(0x1f36c98) # OptionParser:2067 12873 check-binlog-format type: undef # OptionParser:2074 12873 check-binlog-format default: yes # OptionParser:2028 12873 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(0x1f36b60) # OptionParser:2067 12873 binary-index type: undef # OptionParser:2028 12873 Parsing opt spec: group => Throttle spec => check-interval=m desc => Sleep time between checks for --max-lag (default 1) attributes => HASH(0x1f36ab8) # OptionParser:2067 12873 check-interval type: m # OptionParser:2074 12873 check-interval default: 1 # OptionParser:2028 12873 Parsing opt spec: group => default spec => check-plan! desc => Check query execution plans for safety (default yes) attributes => HASH(0x1f369c8) # OptionParser:2067 12873 check-plan type: undef # OptionParser:2074 12873 check-plan default: yes # OptionParser:2028 12873 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(0x1f368f0) # OptionParser:2067 12873 check-replication-filters type: undef # OptionParser:2074 12873 check-replication-filters default: yes # OptionParser:2028 12873 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(0x1f36800) # OptionParser:2067 12873 check-slave-lag type: s # OptionParser:2028 12873 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(0x1f36728) # OptionParser:2067 12873 check-slave-tables type: undef # OptionParser:2074 12873 check-slave-tables default: yes # OptionParser:2028 12873 Parsing opt spec: group => default spec => chunk-index=s desc => Prefer this index for chunking tables attributes => HASH(0x1f36638) # OptionParser:2067 12873 chunk-index type: s # OptionParser:2028 12873 Parsing opt spec: group => default spec => chunk-index-columns=i desc => Use only this many left-most columns of a --chunk-index attributes => HASH(0x1f36578) # OptionParser:2067 12873 chunk-index-columns type: i # OptionParser:2028 12873 Parsing opt spec: group => default spec => chunk-size=z desc => Number of rows to select for each checksum query (default 1000) attributes => HASH(0x1f364b8) # OptionParser:2067 12873 chunk-size type: z # OptionParser:2074 12873 chunk-size default: 1000 # OptionParser:2028 12873 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(0x1f363e0) # OptionParser:2067 12873 chunk-size-limit type: f # OptionParser:2074 12873 chunk-size-limit default: 2.0 # OptionParser:2028 12873 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(0x1f362f0) # OptionParser:2067 12873 chunk-time type: f # OptionParser:2074 12873 chunk-time default: 0.5 # OptionParser:2028 12873 Parsing opt spec: group => Filter spec => columns|c=a desc => Checksum only this comma-separated list of columns attributes => HASH(0x1f36218) # OptionParser:2067 12873 columns type: a # OptionParser:2028 12873 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(0x1f36128) # OptionParser:2067 12873 config type: A # OptionParser:2028 12873 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(0x1f36050) # OptionParser:2067 12873 create-replicate-table type: undef # OptionParser:2074 12873 create-replicate-table default: yes # OptionParser:2028 12873 Parsing opt spec: group => Filter spec => databases|d=h desc => Only checksum this comma-separated list of databases attributes => HASH(0x1f35f78) # OptionParser:2067 12873 databases type: h # OptionParser:2028 12873 Parsing opt spec: group => Filter spec => databases-regex=s desc => Only checksum databases whose names match this Perl regex attributes => HASH(0x1f30b30) # OptionParser:2067 12873 databases-regex type: s # OptionParser:2028 12873 Parsing opt spec: group => Connection spec => defaults-file|F=s desc => Only read mysql options from the given file attributes => HASH(0x1f30a58) # OptionParser:2067 12873 defaults-file type: s # OptionParser:2028 12873 Parsing opt spec: group => default spec => empty-replicate-table! desc => Delete previous checksums for each table before checksumming the table (default yes) attributes => HASH(0x1e1a250) # OptionParser:2067 12873 empty-replicate-table type: undef # OptionParser:2074 12873 empty-replicate-table default: yes # OptionParser:2028 12873 Parsing opt spec: group => Filter spec => engines|e=h desc => Only checksum tables which use these storage engines attributes => HASH(0x1e1a5b0) # OptionParser:2067 12873 engines type: h # OptionParser:2028 12873 Parsing opt spec: group => Output spec => explain+ desc => Show, but do not execute, checksum queries (disables --[no]empty-replicate-table) (default 0) attributes => HASH(0x1e1a4f0) # OptionParser:2067 12873 explain type: undef # OptionParser:2074 12873 explain default: 0 # OptionParser:2083 12873 Deferring check of disables rule for HASH(0x1e1a328) disables --[no]empty-replicate-table) (default 0) # OptionParser:2028 12873 Parsing opt spec: group => default spec => float-precision=i desc => Precision for FLOAT and DOUBLE number-to-string conversion attributes => HASH(0x1f27248) # OptionParser:2067 12873 float-precision type: i # OptionParser:2028 12873 Parsing opt spec: group => default spec => function=s desc => Hash function for checksums (FNV1A_64, MURMUR_HASH, SHA1, MD5, CRC32, etc) attributes => HASH(0x1e1a4c0) # OptionParser:2067 12873 function type: s # OptionParser:2028 12873 Parsing opt spec: group => Help spec => help desc => Show help and exit attributes => HASH(0x1e1a340) # OptionParser:2067 12873 help type: undef # OptionParser:2028 12873 Parsing opt spec: group => Connection spec => host|h=s desc => Host to connect to (default localhost) attributes => HASH(0x1ddc9b0) # OptionParser:2067 12873 host type: s # OptionParser:2074 12873 host default: localhost # OptionParser:2028 12873 Parsing opt spec: group => Filter spec => ignore-columns=H desc => Ignore this comma-separated list of columns when calculating the checksum attributes => HASH(0x1ddc698) # OptionParser:2067 12873 ignore-columns type: H # OptionParser:2028 12873 Parsing opt spec: group => Filter spec => ignore-databases=H desc => Ignore this comma-separated list of databases attributes => HASH(0x1ddcfe0) # OptionParser:2067 12873 ignore-databases type: H # OptionParser:2028 12873 Parsing opt spec: group => Filter spec => ignore-databases-regex=s desc => Ignore databases whose names match this Perl regex attributes => HASH(0x1ddc1d8) # OptionParser:2067 12873 ignore-databases-regex type: s # OptionParser:2028 12873 Parsing opt spec: group => Filter spec => ignore-engines=H desc => Ignore this comma-separated list of storage engines (default FEDERATED,MRG_MyISAM) attributes => HASH(0x1f27020) # OptionParser:2067 12873 ignore-engines type: H # OptionParser:2074 12873 ignore-engines default: FEDERATED,MRG_MyISAM # OptionParser:2028 12873 Parsing opt spec: group => Filter spec => ignore-tables=H desc => Ignore this comma-separated list of tables attributes => HASH(0x1f27110) # OptionParser:2067 12873 ignore-tables type: H # OptionParser:2028 12873 Parsing opt spec: group => Filter spec => ignore-tables-regex=s desc => Ignore tables whose names match the Perl regex attributes => HASH(0x1f37d80) # OptionParser:2067 12873 ignore-tables-regex type: s # OptionParser:2028 12873 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(0x1f37e88) # OptionParser:2067 12873 max-lag type: m # OptionParser:2074 12873 max-lag default: 1s # OptionParser:2028 12873 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(0x1f37f78) # OptionParser:2067 12873 max-load type: A # OptionParser:2074 12873 max-load default: Threads_running=25 # OptionParser:2028 12873 Parsing opt spec: group => Connection spec => password|p=s desc => Password to use when connecting attributes => HASH(0x1f38068) # OptionParser:2067 12873 password type: s # OptionParser:2028 12873 Parsing opt spec: group => default spec => pause-file=s desc => Execution will be paused while the file specified by this param exists attributes => HASH(0x1f38158) # OptionParser:2067 12873 pause-file type: s # OptionParser:2028 12873 Parsing opt spec: group => default spec => pid=s desc => Create the given PID file attributes => HASH(0x1f38218) # OptionParser:2067 12873 pid type: s # OptionParser:2028 12873 Parsing opt spec: group => default spec => plugin=s desc => Perl module file that defines a pt_table_checksum_plugin class attributes => HASH(0x1f382d8) # OptionParser:2067 12873 plugin type: s # OptionParser:2028 12873 Parsing opt spec: group => Connection spec => port|P=i desc => Port number to use for connection attributes => HASH(0x1f383e0) # OptionParser:2067 12873 port type: i # OptionParser:2028 12873 Parsing opt spec: group => default spec => progress=a desc => Print progress reports to STDERR (default time,30) attributes => HASH(0x1f384d0) # OptionParser:2067 12873 progress type: a # OptionParser:2074 12873 progress default: time,30 # OptionParser:2028 12873 Parsing opt spec: group => default spec => quiet|q+ desc => Print only the most important information (disables --progress) (default 0) attributes => HASH(0x1f385a8) # OptionParser:2067 12873 quiet type: undef # OptionParser:2074 12873 quiet default: 0 # OptionParser:2083 12873 Deferring check of disables rule for HASH(0x1f38548) disables --progress) (default 0) # OptionParser:2028 12873 Parsing opt spec: group => default spec => recurse=i desc => Number of levels to recurse in the hierarchy when discovering replicas attributes => HASH(0x1f38698) # OptionParser:2067 12873 recurse type: i # OptionParser:2028 12873 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(0x1f38758) # OptionParser:2067 12873 recursion-method type: a # OptionParser:2074 12873 recursion-method default: processlist,hosts # OptionParser:2028 12873 Parsing opt spec: group => default spec => replicate=s desc => Write checksum results to this table (default percona.checksums) attributes => HASH(0x1f386e0) # OptionParser:2067 12873 replicate type: s # OptionParser:2074 12873 replicate default: percona.checksums # OptionParser:2028 12873 Parsing opt spec: group => default spec => replicate-check! desc => Check replicas for data differences after finishing each table (default yes) attributes => HASH(0x1f38908) # OptionParser:2067 12873 replicate-check type: undef # OptionParser:2074 12873 replicate-check default: yes # OptionParser:2028 12873 Parsing opt spec: group => default spec => replicate-check-only desc => Check replicas for consistency without executing checksum queries attributes => HASH(0x1f389e0) # OptionParser:2067 12873 replicate-check-only type: undef # OptionParser:2028 12873 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(0x1f38a88) # OptionParser:2067 12873 replicate-check-retries type: i # OptionParser:2074 12873 replicate-check-retries default: 1 # OptionParser:2028 12873 Parsing opt spec: group => default spec => replicate-database=s desc => USE only this database attributes => HASH(0x1f38b60) # OptionParser:2067 12873 replicate-database type: s # OptionParser:2028 12873 Parsing opt spec: group => default spec => resume desc => Resume checksumming from the last completed chunk (disables --[no]empty-replicate-table) attributes => HASH(0x1f38c20) # OptionParser:2067 12873 resume type: undef # OptionParser:2083 12873 Deferring check of disables rule for HASH(0x1f309e0) disables --[no]empty-replicate-table) # OptionParser:2028 12873 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(0x1faa1a8) # OptionParser:2067 12873 retries type: i # OptionParser:2074 12873 retries default: 2 # OptionParser:2028 12873 Parsing opt spec: group => default spec => run-time=m desc => How long to run attributes => HASH(0x1faa280) # OptionParser:2067 12873 run-time type: m # OptionParser:2028 12873 Parsing opt spec: group => default spec => separator=s desc => The separator character used for CONCAT_WS() (default #) attributes => HASH(0x1faa340) # OptionParser:2067 12873 separator type: s # OptionParser:2074 12873 separator default: # # OptionParser:2028 12873 Parsing opt spec: group => default spec => skip-check-slave-lag=d desc => DSN to skip when checking slave lag attributes => HASH(0x1faa418) # OptionParser:2067 12873 skip-check-slave-lag type: d # OptionParser:2028 12873 Parsing opt spec: group => default spec => slave-user=s desc => Sets the user to be used to connect to the slaves attributes => HASH(0x1faa4f0) # OptionParser:2067 12873 slave-user type: s # OptionParser:2028 12873 Parsing opt spec: group => default spec => slave-password=s desc => Sets the password to be used to connect to the slaves attributes => HASH(0x1fbb458) # OptionParser:2067 12873 slave-password type: s # OptionParser:2028 12873 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(0x1fbb518) # OptionParser:2067 12873 set-vars type: A # OptionParser:2028 12873 Parsing opt spec: group => Connection spec => socket|S=s desc => Socket file to use for connection attributes => HASH(0x1fbb5f0) # OptionParser:2067 12873 socket type: s # OptionParser:2028 12873 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(0x1fbb6e0) # OptionParser:2067 12873 slave-skip-tolerance type: f # OptionParser:2074 12873 slave-skip-tolerance default: 1.0 # OptionParser:2028 12873 Parsing opt spec: group => Filter spec => tables|t=h desc => Checksum only this comma-separated list of tables attributes => HASH(0x1fbb7b8) # OptionParser:2067 12873 tables type: h # OptionParser:2028 12873 Parsing opt spec: group => Filter spec => tables-regex=s desc => Checksum only tables whose names match this Perl regex attributes => HASH(0x1fbb8a8) # OptionParser:2067 12873 tables-regex type: s # OptionParser:2028 12873 Parsing opt spec: group => default spec => trim desc => Add TRIM() to VARCHAR columns (helps when comparing 4.1 to >= 5.0) attributes => HASH(0x1fbb980) # OptionParser:2067 12873 trim type: undef # OptionParser:2028 12873 Parsing opt spec: group => Connection spec => user|u=s desc => User for login if not current user attributes => HASH(0x1fbba28) # OptionParser:2067 12873 user type: s # OptionParser:2028 12873 Parsing opt spec: group => Help spec => version desc => Show version and exit attributes => HASH(0x1fbbb18) # OptionParser:2067 12873 version type: undef # OptionParser:2028 12873 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(0x1fbbbd8) # OptionParser:2067 12873 version-check type: undef # OptionParser:2074 12873 version-check default: yes # OptionParser:2028 12873 Parsing opt spec: group => default spec => where=s desc => Do only rows matching this WHERE clause attributes => HASH(0x1fbbcb0) # OptionParser:2067 12873 where type: s # OptionParser:2089 12873 Parsing rule: This tool accepts additional command-line arguments. Refer to the SYNOPSIS and usage information for details. # OptionParser:2145 12873 Participants for This tool accepts additional command-line arguments. Refer to the SYNOPSIS and usage information for details. : # OptionParser:2121 12873 Strict mode disabled by rule # OptionParser:2145 12873 Participants for disables --[no]empty-replicate-table) : empty-replicate-table # OptionParser:2131 12873 Option resume disables empty-replicate-table # OptionParser:2145 12873 Participants for disables --progress) (default 0) : progress # OptionParser:2131 12873 Option quiet disables progress # OptionParser:2145 12873 Participants for disables --[no]empty-replicate-table) (default 0) : empty-replicate-table # OptionParser:2131 12873 Option explain disables empty-replicate-table # OptionParser:1871 12873 Parsing DSN OPTIONS # OptionParser:1961 12873 =item * A # OptionParser:1988 12873 Short help: Default character set # OptionParser:1961 12873 =item * D # OptionParser:1988 12873 Short help: DSN table database # OptionParser:1961 12873 =item * F # OptionParser:1988 12873 Short help: Defaults file for connection values # OptionParser:1961 12873 =item * h # OptionParser:1988 12873 Short help: Connect to host # OptionParser:1961 12873 =item * p # OptionParser:1988 12873 Short help: Password to use when connecting # OptionParser:1961 12873 =item * P # OptionParser:1988 12873 Short help: Port number to use for connection # OptionParser:1961 12873 =item * S # OptionParser:1988 12873 Short help: Socket file to use for connection # OptionParser:1961 12873 =item * t # OptionParser:1988 12873 Short help: DSN table table # OptionParser:1961 12873 =item * u # OptionParser:1988 12873 Short help: User for login if not current user # DSNParser:1389 12873 DSN option: copy=1, dsn=charset, desc=Default character set, key=A # DSNParser:1389 12873 DSN option: copy=, dsn=undef, desc=DSN table database, key=D # DSNParser:1389 12873 DSN option: copy=1, dsn=mysql_read_default_file, desc=Defaults file for connection values, key=F # DSNParser:1389 12873 DSN option: copy=1, dsn=host, desc=Connect to host, key=h # DSNParser:1389 12873 DSN option: copy=1, dsn=password, desc=Password to use when connecting, key=p # DSNParser:1389 12873 DSN option: copy=1, dsn=port, desc=Port number to use for connection, key=P # DSNParser:1389 12873 DSN option: copy=, dsn=mysql_socket, desc=Socket file to use for connection, key=S # DSNParser:1389 12873 DSN option: copy=, dsn=undef, desc=DSN table table, key=t # DSNParser:1389 12873 DSN option: copy=1, dsn=user, desc=User for login if not current user, key=u # OptionParser:1915 12873 pt-table-checksum 3.0.3 # OptionParser:2255 12873 Cannot open /etc/percona-toolkit/percona-toolkit.conf: No such file or directory # # OptionParser:2255 12873 Cannot open /etc/percona-toolkit/pt-table-checksum.conf: No such file or directory # # OptionParser:2255 12873 Cannot open /root/.percona-toolkit.conf: No such file or directory # # OptionParser:2255 12873 Cannot open /root/.pt-table-checksum.conf: No such file or directory # # OptionParser:2217 12873 Got option check-binlog-format = 0 # OptionParser:2452 12873 Nothing to validate for option slave-skip-tolerance type f value 1.0 # OptionParser:2452 12873 Nothing to validate for option tables type h value undef # OptionParser:2452 12873 Nothing to validate for option password type s value undef # OptionParser:2452 12873 Nothing to validate for option chunk-index-columns type i value undef # OptionParser:2452 12873 Nothing to validate for option chunk-time type f value 0.5 # OptionParser:2395 12873 Parsing option max-lag as a time value # OptionParser:2409 12873 Setting option max-lag to 1 # OptionParser:2452 12873 Nothing to validate for option skip-check-slave-lag type d value undef # OptionParser:2452 12873 Nothing to validate for option function type s value undef # OptionParser:2452 12873 Nothing to validate for option slave-user type s value undef # OptionParser:2452 12873 Nothing to validate for option pause-file type s value undef # OptionParser:2452 12873 Nothing to validate for option where type s value undef # OptionParser:2452 12873 Nothing to validate for option defaults-file type s value undef # OptionParser:2442 12873 Parsing option chunk-size as a size value # OptionParser:2452 12873 Nothing to validate for option ignore-tables-regex type s value undef # OptionParser:2452 12873 Nothing to validate for option ignore-databases-regex type s value undef # OptionParser:2452 12873 Nothing to validate for option check-slave-lag type s value undef # OptionParser:2452 12873 Nothing to validate for option chunk-index type s value undef # OptionParser:2452 12873 Nothing to validate for option pid type s value undef # OptionParser:2452 12873 Nothing to validate for option float-precision type i value undef # OptionParser:2452 12873 Nothing to validate for option replicate type s value percona.checksums # OptionParser:2452 12873 Nothing to validate for option user type s value undef # OptionParser:2452 12873 Nothing to validate for option port type i value undef # OptionParser:2452 12873 Nothing to validate for option socket type s value undef # OptionParser:2395 12873 Parsing option check-interval as a time value # OptionParser:2400 12873 No suffix given; using s for check-interval (value: 1 ) # OptionParser:2409 12873 Setting option check-interval to 1 # OptionParser:2452 12873 Nothing to validate for option recurse type i value undef # OptionParser:2452 12873 Nothing to validate for option columns type a value undef # OptionParser:2452 12873 Nothing to validate for option replicate-database type s value undef # OptionParser:2452 12873 Nothing to validate for option engines type h value undef # OptionParser:2452 12873 Nothing to validate for option retries type i value 2 # OptionParser:2452 12873 Nothing to validate for option run-time type m value undef # OptionParser:2452 12873 Nothing to validate for option databases-regex type s value undef # OptionParser:2452 12873 Nothing to validate for option replicate-check-retries type i value 1 # OptionParser:2452 12873 Nothing to validate for option plugin type s value undef # OptionParser:2452 12873 Nothing to validate for option tables-regex type s value undef # OptionParser:2452 12873 Nothing to validate for option chunk-size-limit type f value 2.0 # OptionParser:2452 12873 Nothing to validate for option databases type h value undef # OptionParser:2452 12873 Nothing to validate for option host type s value localhost # OptionParser:2452 12873 Nothing to validate for option separator type s value # # OptionParser:2452 12873 Nothing to validate for option slave-password type s value undef # OptionParser:2854 12873 --set-vars: $VAR1 = { # innodb_lock_wait_timeout => { # default => 1, # val => '1' # }, # wait_timeout => { # default => 1, # val => '10000' # } # }; # # DSNParser:1405 12873 Setting set-vars property # OptionParser:2526 12873 Getting description and usage from SYNOPSIS in /usr/bin/pt-table-checksum # OptionParser:2787 12873 Parsing SYNOPSIS in /usr/bin/pt-table-checksum # OptionParser:2800 12873 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 12873 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:7124 12873 Starting daemon # Daemon:7194 12873 Daemon running # DSNParser:1477 12873 DSN string made from options: h=localhost # DSNParser:1417 12873 Parsing h=localhost # DSNParser:1436 12873 Finding value for S # DSNParser:1446 12873 Copying value for S from defaults # DSNParser:1436 12873 Finding value for F # DSNParser:1446 12873 Copying value for F from defaults # DSNParser:1436 12873 Finding value for A # DSNParser:1446 12873 Copying value for A from defaults # DSNParser:1436 12873 Finding value for P # DSNParser:1446 12873 Copying value for P from defaults # DSNParser:1436 12873 Finding value for u # DSNParser:1446 12873 Copying value for u from defaults # DSNParser:1436 12873 Finding value for p # DSNParser:1446 12873 Copying value for p from defaults # DSNParser:1436 12873 Finding value for h # DSNParser:1436 12873 Finding value for D # DSNParser:1446 12873 Copying value for D from defaults # DSNParser:1436 12873 Finding value for t # DSNParser:1446 12873 Copying value for t from defaults # DSNParser:1417 12873 Parsing h=localhost,u=pttc,p=password # DSNParser:1436 12873 Finding value for S # DSNParser:1446 12873 Copying value for S from defaults # DSNParser:1436 12873 Finding value for F # DSNParser:1446 12873 Copying value for F from defaults # DSNParser:1436 12873 Finding value for A # DSNParser:1446 12873 Copying value for A from defaults # DSNParser:1436 12873 Finding value for P # DSNParser:1446 12873 Copying value for P from defaults # DSNParser:1436 12873 Finding value for u # DSNParser:1436 12873 Finding value for p # DSNParser:1436 12873 Finding value for h # DSNParser:1436 12873 Finding value for D # DSNParser:1446 12873 Copying value for D from defaults # DSNParser:1436 12873 Finding value for t # DSNParser:1446 12873 Copying value for t from defaults # DSNParser:1530 12873 DBI:mysql:;host=localhost;mysql_read_default_group=client # DSNParser:1579 12873 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 12873 DBI::db=HASH(0x1fd47a8) SET SESSION innodb_lock_wait_timeout=1 # DSNParser:1738 12873 DBI::db=HASH(0x1fd47a8) SET SESSION wait_timeout=10000 # DSNParser:1628 12873 DBI::db=HASH(0x1fd47a8) SELECT @@SQL_MODE # DSNParser:1638 12873 DBI::db=HASH(0x1fd47a8) 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 12873 DBH info: DBI::db=HASH(0x1fd47a8) $VAR1 = { # '@@hostname' => 'master', # 'CONNECTION_ID()' => '13354', # '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 12873 DBI::db=HASH(0x1fd47a8) Setting dbh # Cxn:3638 12873 DBI::db=HASH(0x1fd47a8) SELECT @@server_id /*!50038 , @@hostname*/ # Cxn:3640 12873 DBI::db=HASH(0x1fd47a8) hostname: master 101 # pt_table_checksum:9291 12873 DBI::db=HASH(0x1fd47a8) SELECT @@SQL_MODE # pt_table_checksum:9298 12873 DBI::db=HASH(0x1fd47a8) 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' # VersionParser:4246 12873 VersionParser got a dbh, trying to get the version # VersionParser:4294 12873 InnoDB support: DEFAULT # VersionParser:4306 12873 InnoDB version: 5.7.19-17 # pt_table_checksum:9313 12873 DBI::db=HASH(0x1fd47a8) SELECT @@binlog_format # pt_table_checksum:9315 12873 Original binlog_format: ROW # pt_table_checksum:9319 12873 DBI::db=HASH(0x1fd47a8) /*!50108 SET @@binlog_format := 'STATEMENT'*/ # pt_table_checksum:9346 12873 DBI::db=HASH(0x1fd47a8) SET SESSION TRANSACTION ISOLATION LEVEL REPEATABLE READ # Cxn:3621 12873 DBI::db=HASH(0x1fd47a8) Connected dbh to master h=localhost # Percona::XtraDB::Cluster:3812 12873 master SHOW VARIABLES LIKE 'wsrep_on' # Percona::XtraDB::Cluster:3814 12873 $VAR1 = undef; # # MasterSlave:5139 12873 Recursion methods: processlist hosts # MasterSlave:5159 12873 Connected to h=localhost,p=...,u=pttc # MasterSlave:5168 12873 SELECT @@SERVER_ID # MasterSlave:5170 12873 Working on server ID 101 # MasterSlave:5203 12873 Looking for slaves on h=localhost,p=...,u=pttc using methods processlist hosts # MasterSlave:5210 12873 Finding slaves with _find_slaves_by_processlist # MasterSlave:5272 12873 DBI::db=HASH(0x1fd47a8) SHOW GRANTS FOR CURRENT_USER() # MasterSlave:5302 12873 DBI::db=HASH(0x1fd47a8) SHOW FULL PROCESSLIST # DSNParser:1417 12873 Parsing h=192.168.70.2 # DSNParser:1436 12873 Finding value for S # DSNParser:1446 12873 Copying value for S from defaults # DSNParser:1436 12873 Finding value for F # DSNParser:1446 12873 Copying value for F from defaults # DSNParser:1436 12873 Finding value for A # DSNParser:1446 12873 Copying value for A from defaults # DSNParser:1436 12873 Finding value for P # DSNParser:1446 12873 Copying value for P from defaults # DSNParser:1436 12873 Finding value for u # DSNParser:1442 12873 Copying value for u from previous DSN # DSNParser:1436 12873 Finding value for p # DSNParser:1442 12873 Copying value for p from previous DSN # DSNParser:1436 12873 Finding value for h # DSNParser:1436 12873 Finding value for D # DSNParser:1446 12873 Copying value for D from defaults # DSNParser:1436 12873 Finding value for t # DSNParser:1446 12873 Copying value for t from defaults # MasterSlave:5215 12873 Found 1 slaves # MasterSlave:5192 12873 Recursing from h=localhost,p=...,u=pttc to h=192.168.70.2,p=...,u=pttc # MasterSlave:5139 12873 Recursion methods: processlist hosts # DSNParser:1530 12873 DBI:mysql:;host=192.168.70.2;mysql_read_default_group=client # DSNParser:1579 12873 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 12873 DBI::db=HASH(0x1fe0180) SET SESSION innodb_lock_wait_timeout=1 # DSNParser:1738 12873 DBI::db=HASH(0x1fe0180) SET SESSION wait_timeout=10000 # DSNParser:1628 12873 DBI::db=HASH(0x1fe0180) SELECT @@SQL_MODE # DSNParser:1638 12873 DBI::db=HASH(0x1fe0180) 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 12873 DBH info: DBI::db=HASH(0x1fe0180) $VAR1 = { # '@@hostname' => 'slave', # 'CONNECTION_ID()' => '35', # '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:5159 12873 Connected to h=192.168.70.2,p=...,u=pttc # MasterSlave:5168 12873 SELECT @@SERVER_ID # MasterSlave:5170 12873 Working on server ID 102 # MasterSlave:5081 12873 Found slave: h=192.168.70.2,p=...,u=pttc # DSNParser:1477 12873 DSN string made from options: h=localhost # DSNParser:1417 12873 Parsing h=localhost # DSNParser:1436 12873 Finding value for S # DSNParser:1446 12873 Copying value for S from defaults # DSNParser:1436 12873 Finding value for F # DSNParser:1446 12873 Copying value for F from defaults # DSNParser:1436 12873 Finding value for A # DSNParser:1446 12873 Copying value for A from defaults # DSNParser:1436 12873 Finding value for P # DSNParser:1446 12873 Copying value for P from defaults # DSNParser:1436 12873 Finding value for u # DSNParser:1446 12873 Copying value for u from defaults # DSNParser:1436 12873 Finding value for p # DSNParser:1446 12873 Copying value for p from defaults # DSNParser:1436 12873 Finding value for h # DSNParser:1436 12873 Finding value for D # DSNParser:1446 12873 Copying value for D from defaults # DSNParser:1436 12873 Finding value for t # DSNParser:1446 12873 Copying value for t from defaults # Cxn:3633 12873 DBI::db=HASH(0x1fe0180) Setting dbh # Cxn:3638 12873 DBI::db=HASH(0x1fe0180) SELECT @@server_id /*!50038 , @@hostname*/ # Cxn:3640 12873 DBI::db=HASH(0x1fe0180) hostname: slave 102 # Cxn:3621 12873 DBI::db=HASH(0x1fe0180) Connected dbh to slave h=192.168.70.2 # Percona::XtraDB::Cluster:3812 12873 slave SHOW VARIABLES LIKE 'wsrep_on' # Percona::XtraDB::Cluster:3814 12873 $VAR1 = undef; # # MasterSlave:5203 12873 Looking for slaves on h=192.168.70.2,p=...,u=pttc using methods processlist hosts # MasterSlave:5210 12873 Finding slaves with _find_slaves_by_processlist # MasterSlave:5272 12873 DBI::db=HASH(0x1fe0180) SHOW GRANTS FOR CURRENT_USER() # MasterSlave:5302 12873 DBI::db=HASH(0x1fe0180) SHOW FULL PROCESSLIST # MasterSlave:5210 12873 Finding slaves with _find_slaves_by_hosts # MasterSlave:5244 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE HOSTS # MasterSlave:5215 12873 Found 0 slaves # Cxn:3715 12873 master SHOW VARIABLES LIKE 'wsrep_on' # Cxn:3702 12873 SELECT @@SERVER_ID # Cxn:3705 12873 Generated unique id for cluster: 101 # Cxn:3715 12873 slave SHOW VARIABLES LIKE 'wsrep_on' # Cxn:3702 12873 SELECT @@SERVER_ID # Cxn:3705 12873 Generated unique id for cluster: 102 # Cxn:3725 12873 Removing duplicates from master slave # Cxn:3715 12873 master SHOW VARIABLES LIKE 'wsrep_on' # Cxn:3702 12873 SELECT @@SERVER_ID # Cxn:3705 12873 Generated unique id for cluster: 101 # Cxn:3731 12873 Server ID for master : 101 # Cxn:3715 12873 slave SHOW VARIABLES LIKE 'wsrep_on' # Cxn:3702 12873 SELECT @@SERVER_ID # Cxn:3705 12873 Generated unique id for cluster: 102 # Cxn:3731 12873 Server ID for slave : 102 # pt_table_checksum:9525 12873 1 slaves found # pt_table_checksum:9668 12873 Will check slave lag on all slaves # pt_table_checksum:9684 12873 May check slave lag on slave # pt_table_checksum:9753 12873 Checking slave replication filters # MasterSlave:5386 12873 DBI::db=HASH(0x1fe0180) SHOW MASTER STATUS # MasterSlave:5390 12873 # MasterSlave:5394 12873 Server on dbh DBI::db=HASH(0x1fe0180) does not seem to be a master # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # MasterSlave:5688 12873 DBI::db=HASH(0x1fe0180) SHOW VARIABLES LIKE 'slave_skip_errors' # pt_table_checksum:10989 12873 Checking --replicate table `percona`.`checksums` # pt_table_checksum:10998 12873 SHOW DATABASES LIKE 'percona' # pt_table_checksum:11013 12873 CREATE DATABASE IF NOT EXISTS `percona` /* pt-table-checksum */ # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # TableParser:4551 12873 Checking `percona`.`checksums` # TableParser:4557 12873 SHOW TABLES FROM `percona` LIKE 'checksums' # TableParser:4572 12873 Table percona checksums exists # pt_table_checksum:11070 12873 --replicate table exists: yes # pt_table_checksum:11362 12873 Creating --replicate table `percona`.`checksums` # pt_table_checksum:11370 12873 DBI::db=HASH(0x1fd47a8) 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:11148 12873 Checking if slave has repl table # TableParser:4551 12873 Checking `percona`.`checksums` # TableParser:4557 12873 SHOW TABLES FROM `percona` LIKE 'checksums' # TableParser:4572 12873 Table percona checksums exists # MySQLStatusWaiter:8555 12873 Parsing spec for max thresholds # MySQLStatusWaiter:8697 12873 Checking and setting values # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8713 12873 Wait if Threads_running >= 25 # MySQLStatusWaiter:8565 12873 Parsing spec for critical thresholds # VersionCheck:832 12873 FindBin::Bin: /usr/bin # VersionCheck:997 12873 SELECT CONCAT(@@hostname, @@port) # VersionCheck:1018 12873 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 12873 SELECT CONCAT(@@hostname, @@port) # VersionCheck:1018 12873 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 12873 Version check file percona-version-check in /tmp # VersionCheck:932 12873 Version check file /tmp/percona-version-check contents: 0,1505984438 # 39719b1b2baae425646bf998b7f882c7,1505988134 # fdab197d801cca12944563fc073df00a,1505984438 # VersionCheck:940 12873 Intsance fdab197d801cca12944563fc073df00a last checked 1505984438 now 1505997991 diff 13553 hours until next check 20.24 # VersionCheck:940 12873 Intsance 39719b1b2baae425646bf998b7f882c7 last checked 1505988134 now 1505997991 diff 9857 hours until next check 21.26 # VersionCheck:940 12873 Intsance 0 last checked 1505984438 now 1505997991 diff 13553 hours until next check 20.24 # VersionCheck:860 12873 0 instances to check # RowChecksum:5977 12873 SELECT CRC32('test-string') # RowChecksum:5985 12873 Chosen hash func: CRC32 # RowChecksum:6025 12873 SELECT CRC32('a') bigint 10 # RowChecksum:6031 12873 crc_type: int length: 10 # Percona::XtraDB::Cluster:3812 12873 master SHOW VARIABLES LIKE 'wsrep_on' # Percona::XtraDB::Cluster:3814 12873 $VAR1 = undef; # # SchemaIterator:7423 12873 Filter ignore-tables value: percona checksums # SchemaIterator:7427 12873 Filter ignore-engines value: mrg_myisam # SchemaIterator:7427 12873 Filter ignore-engines value: federated # SchemaIterator:7447 12873 Schema object filters: $VAR1 = { # 'ignore-engines' => { # federated => 1, # mrg_myisam => 1 # }, # 'ignore-tables' => { # percona => { # checksums => 1 # } # } # }; # # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # SchemaIterator:7562 12873 SHOW DATABASES # SchemaIterator:7647 12873 Database information_schema is a system database, ignoring # SchemaIterator:7647 12873 Database performance_schema is a system database, ignoring # SchemaIterator:7568 12873 Found 4 databases # SchemaIterator:7575 12873 Next database: mysql # SchemaIterator:7581 12873 SHOW /*!50002 FULL*/ TABLES FROM `mysql` # SchemaIterator:7599 12873 Found 22 tables in database mysql # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`columns_priv` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: MyISAM # TableParser:4428 12873 Table cols: `host`, `db`, `user`, `table_name`, `column_name`, `timestamp`, `column_priv` # TableParser:4580 12873 Storage engine: MyISAM # TableParser:4596 12873 Parsed key: PRIMARY KEY (`host`,`db`,`user`,`table_name`,`column_name`) # TableParser:4616 12873 PRIMARY key cols: `host`, `db`, `user`, `table_name`, `column_name` # SchemaIterator:7481 12873 Next schema object: mysql columns_priv # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `host`, `db`, `user`, `table_name`, `column_name`, UNIX_TIMESTAMP(`timestamp`), `column_priv`)) # RowChecksum:5890 12873 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `host`, `db`, `user`, `table_name`, `column_name`, UNIX_TIMESTAMP(`timestamp`), `column_priv`)) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`columns_priv` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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('#', `host`, `db`, `user`, `table_name`, `column_name`, UNIX_TIMESTAMP(`timestamp`), `column_priv`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`columns_priv` /*checksum table*/ # NibbleIterator:6228 12873 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `host`, `db`, `user`, `table_name`, `column_name`, UNIX_TIMESTAMP(`timestamp`), `column_priv`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`columns_priv` /*explain checksum table*/ # OobNibbleIterator:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `mysql`.`columns_priv` # TableParser:4557 12873 SHOW TABLES FROM `mysql` LIKE 'columns\_priv' # TableParser:4572 12873 Table mysql columns_priv exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`columns_priv` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: MyISAM # TableParser:4428 12873 Table cols: `host`, `db`, `user`, `table_name`, `column_name`, `timestamp`, `column_priv` # TableParser:4580 12873 Storage engine: MyISAM # TableParser:4596 12873 Parsed key: PRIMARY KEY (`host`,`db`,`user`,`table_name`,`column_name`) # TableParser:4616 12873 PRIMARY key cols: `host`, `db`, `user`, `table_name`, `column_name` # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`columns_priv` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 0 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `mysql` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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('#', `host`, `db`, `user`, `table_name`, `column_name`, UNIX_TIMESTAMP(`timestamp`), `column_priv`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`columns_priv` /*checksum table*/ params: # pt_table_checksum:11401 12873 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `host`, `db`, `user`, `table_name`, `column_name`, UNIX_TIMESTAMP(`timestamp`), `column_priv`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`columns_priv` /*explain checksum table*/ params: # pt_table_checksum:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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('#', `host`, `db`, `user`, `table_name`, `column_name`, UNIX_TIMESTAMP(`timestamp`), `column_priv`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`columns_priv` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.0244181156158447 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='columns_priv' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`db` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: MyISAM # TableParser:4428 12873 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:4580 12873 Storage engine: MyISAM # TableParser:4596 12873 Parsed key: PRIMARY KEY (`host`,`db`,`user`), # TableParser:4616 12873 PRIMARY key cols: `host`, `db`, `user` # TableParser:4596 12873 Parsed key: KEY `user` (`user`) # TableParser:4616 12873 user key cols: `user` # SchemaIterator:7481 12873 Next schema object: mysql db # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `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`)) # RowChecksum:5890 12873 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `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`)) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`db` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY, user # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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('#', `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`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`db` /*checksum table*/ # NibbleIterator:6228 12873 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `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`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`db` /*explain checksum table*/ # OobNibbleIterator:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `mysql`.`db` # TableParser:4557 12873 SHOW TABLES FROM `mysql` LIKE 'db' # TableParser:4572 12873 Table mysql db exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`db` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: MyISAM # TableParser:4428 12873 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:4580 12873 Storage engine: MyISAM # TableParser:4596 12873 Parsed key: PRIMARY KEY (`host`,`db`,`user`), # TableParser:4616 12873 PRIMARY key cols: `host`, `db`, `user` # TableParser:4596 12873 Parsed key: KEY `user` (`user`) # TableParser:4616 12873 user key cols: `user` # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`db` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 4 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `mysql` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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('#', `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`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`db` /*checksum table*/ params: # pt_table_checksum:11401 12873 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `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`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`db` /*explain checksum table*/ params: # pt_table_checksum:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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('#', `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`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`db` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.00309205055236816 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # pt_table_checksum:10367 12873 Total avg rate: 1293 # WeightedAvgRate:8766 12873 Master op time: 4 n / 0.00309205055236816 s # WeightedAvgRate:8778 12873 Initial avg rate: 1293.63991055594 n/s # WeightedAvgRate:8782 12873 Adjust n to 646 # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='db' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`engine_cost` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `engine_name`, `device_type`, `cost_name`, `cost_value`, `last_update`, `comment` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`cost_name`,`engine_name`,`device_type`) # TableParser:4616 12873 PRIMARY key cols: `cost_name`, `engine_name`, `device_type` # TableParser:4638 12873 This key is the clustered key # SchemaIterator:7481 12873 Next schema object: mysql engine_cost # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `engine_name`, `device_type`, `cost_name`, `cost_value`, UNIX_TIMESTAMP(`last_update`), `comment`, CONCAT(ISNULL(`cost_value`), ISNULL(`comment`)))) # RowChecksum:5890 12873 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `engine_name`, `device_type`, `cost_name`, `cost_value`, UNIX_TIMESTAMP(`last_update`), `comment`, CONCAT(ISNULL(`cost_value`), ISNULL(`comment`)))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`engine_cost` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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('#', `engine_name`, `device_type`, `cost_name`, `cost_value`, UNIX_TIMESTAMP(`last_update`), `comment`, CONCAT(ISNULL(`cost_value`), ISNULL(`comment`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`engine_cost` /*checksum table*/ # NibbleIterator:6228 12873 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `engine_name`, `device_type`, `cost_name`, `cost_value`, UNIX_TIMESTAMP(`last_update`), `comment`, CONCAT(ISNULL(`cost_value`), ISNULL(`comment`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`engine_cost` /*explain checksum table*/ # OobNibbleIterator:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `mysql`.`engine_cost` # TableParser:4557 12873 SHOW TABLES FROM `mysql` LIKE 'engine\_cost' # TableParser:4572 12873 Table mysql engine_cost exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`engine_cost` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `engine_name`, `device_type`, `cost_name`, `cost_value`, `last_update`, `comment` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`cost_name`,`engine_name`,`device_type`) # TableParser:4616 12873 PRIMARY key cols: `cost_name`, `engine_name`, `device_type` # TableParser:4638 12873 This key is the clustered key # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`engine_cost` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 2 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `mysql` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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('#', `engine_name`, `device_type`, `cost_name`, `cost_value`, UNIX_TIMESTAMP(`last_update`), `comment`, CONCAT(ISNULL(`cost_value`), ISNULL(`comment`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`engine_cost` /*checksum table*/ params: # pt_table_checksum:11401 12873 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `engine_name`, `device_type`, `cost_name`, `cost_value`, UNIX_TIMESTAMP(`last_update`), `comment`, CONCAT(ISNULL(`cost_value`), ISNULL(`comment`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`engine_cost` /*explain checksum table*/ params: # pt_table_checksum:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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('#', `engine_name`, `device_type`, `cost_name`, `cost_value`, UNIX_TIMESTAMP(`last_update`), `comment`, 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:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.0295360088348389 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # pt_table_checksum:10367 12873 Total avg rate: 183 # WeightedAvgRate:8766 12873 Master op time: 2 n / 0.0295360088348389 s # WeightedAvgRate:8778 12873 Initial avg rate: 67.7139559100119 n/s # WeightedAvgRate:8782 12873 Adjust n to 33 # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='engine_cost' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`event` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: MyISAM # TableParser:4428 12873 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:4580 12873 Storage engine: MyISAM # TableParser:4596 12873 Parsed key: PRIMARY KEY (`db`,`name`) # TableParser:4616 12873 PRIMARY key cols: `db`, `name` # SchemaIterator:7481 12873 Next schema object: mysql event # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `db`, `name`, CRC32(`body`), `definer`, `execute_at`, `interval_value`, `interval_field`, UNIX_TIMESTAMP(`created`), UNIX_TIMESTAMP(`modified`), `last_executed`, `starts`, `ends`, `status`, `on_completion`, `sql_mode`, `comment`, `originator`, `time_zone`, `character_set_client`, `collation_connection`, `db_collation`, 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:5890 12873 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `db`, `name`, CRC32(`body`), `definer`, `execute_at`, `interval_value`, `interval_field`, UNIX_TIMESTAMP(`created`), UNIX_TIMESTAMP(`modified`), `last_executed`, `starts`, `ends`, `status`, `on_completion`, `sql_mode`, `comment`, `originator`, `time_zone`, `character_set_client`, `collation_connection`, `db_collation`, 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:6700 12873 EXPLAIN SELECT * FROM `mysql`.`event` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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('#', `db`, `name`, CRC32(`body`), `definer`, `execute_at`, `interval_value`, `interval_field`, UNIX_TIMESTAMP(`created`), UNIX_TIMESTAMP(`modified`), `last_executed`, `starts`, `ends`, `status`, `on_completion`, `sql_mode`, `comment`, `originator`, `time_zone`, `character_set_client`, `collation_connection`, `db_collation`, 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:6228 12873 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `db`, `name`, CRC32(`body`), `definer`, `execute_at`, `interval_value`, `interval_field`, UNIX_TIMESTAMP(`created`), UNIX_TIMESTAMP(`modified`), `last_executed`, `starts`, `ends`, `status`, `on_completion`, `sql_mode`, `comment`, `originator`, `time_zone`, `character_set_client`, `collation_connection`, `db_collation`, 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:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `mysql`.`event` # TableParser:4557 12873 SHOW TABLES FROM `mysql` LIKE 'event' # TableParser:4572 12873 Table mysql event exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`event` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: MyISAM # TableParser:4428 12873 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:4580 12873 Storage engine: MyISAM # TableParser:4596 12873 Parsed key: PRIMARY KEY (`db`,`name`) # TableParser:4616 12873 PRIMARY key cols: `db`, `name` # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`event` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 0 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `mysql` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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('#', `db`, `name`, CRC32(`body`), `definer`, `execute_at`, `interval_value`, `interval_field`, UNIX_TIMESTAMP(`created`), UNIX_TIMESTAMP(`modified`), `last_executed`, `starts`, `ends`, `status`, `on_completion`, `sql_mode`, `comment`, `originator`, `time_zone`, `character_set_client`, `collation_connection`, `db_collation`, 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:11401 12873 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `db`, `name`, CRC32(`body`), `definer`, `execute_at`, `interval_value`, `interval_field`, UNIX_TIMESTAMP(`created`), UNIX_TIMESTAMP(`modified`), `last_executed`, `starts`, `ends`, `status`, `on_completion`, `sql_mode`, `comment`, `originator`, `time_zone`, `character_set_client`, `collation_connection`, `db_collation`, 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:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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('#', `db`, `name`, CRC32(`body`), `definer`, `execute_at`, `interval_value`, `interval_field`, UNIX_TIMESTAMP(`created`), UNIX_TIMESTAMP(`modified`), `last_executed`, `starts`, `ends`, `status`, `on_completion`, `sql_mode`, `comment`, `originator`, `time_zone`, `character_set_client`, `collation_connection`, `db_collation`, 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:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.00808286666870117 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='event' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`func` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: MyISAM # TableParser:4428 12873 Table cols: `name`, `ret`, `dl`, `type` # TableParser:4580 12873 Storage engine: MyISAM # TableParser:4596 12873 Parsed key: PRIMARY KEY (`name`) # TableParser:4616 12873 PRIMARY key cols: `name` # SchemaIterator:7481 12873 Next schema object: mysql func # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `name`, `ret`, `dl`, `type`)) # RowChecksum:5890 12873 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `name`, `ret`, `dl`, `type`)) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`func` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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('#', `name`, `ret`, `dl`, `type`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`func` /*checksum table*/ # NibbleIterator:6228 12873 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `name`, `ret`, `dl`, `type`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`func` /*explain checksum table*/ # OobNibbleIterator:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `mysql`.`func` # TableParser:4557 12873 SHOW TABLES FROM `mysql` LIKE 'func' # TableParser:4572 12873 Table mysql func exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`func` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: MyISAM # TableParser:4428 12873 Table cols: `name`, `ret`, `dl`, `type` # TableParser:4580 12873 Storage engine: MyISAM # TableParser:4596 12873 Parsed key: PRIMARY KEY (`name`) # TableParser:4616 12873 PRIMARY key cols: `name` # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`func` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 0 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `mysql` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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('#', `name`, `ret`, `dl`, `type`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`func` /*checksum table*/ params: # pt_table_checksum:11401 12873 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `name`, `ret`, `dl`, `type`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`func` /*explain checksum table*/ params: # pt_table_checksum:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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('#', `name`, `ret`, `dl`, `type`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`func` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.00316095352172852 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='func' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`gtid_executed` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `source_uuid`, `interval_start`, `interval_end` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`source_uuid`,`interval_start`) # TableParser:4616 12873 PRIMARY key cols: `source_uuid`, `interval_start` # TableParser:4638 12873 This key is the clustered key # SchemaIterator:7481 12873 Next schema object: mysql gtid_executed # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `source_uuid`, `interval_start`, `interval_end`)) # RowChecksum:5890 12873 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `source_uuid`, `interval_start`, `interval_end`)) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`gtid_executed` WHERE 1=1 # NibbleIterator:6702 12873 $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 => 'gtid_executed', # type => 'ALL' # }; # # NibbleIterator:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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('#', `source_uuid`, `interval_start`, `interval_end`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`gtid_executed` /*checksum table*/ # NibbleIterator:6228 12873 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `source_uuid`, `interval_start`, `interval_end`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`gtid_executed` /*explain checksum table*/ # OobNibbleIterator:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `mysql`.`gtid_executed` # TableParser:4557 12873 SHOW TABLES FROM `mysql` LIKE 'gtid\_executed' # TableParser:4572 12873 Table mysql gtid_executed exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`gtid_executed` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `source_uuid`, `interval_start`, `interval_end` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`source_uuid`,`interval_start`) # TableParser:4616 12873 PRIMARY key cols: `source_uuid`, `interval_start` # TableParser:4638 12873 This key is the clustered key # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`gtid_executed` WHERE 1=1 # NibbleIterator:6702 12873 $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 => 'gtid_executed', # type => 'ALL' # }; # # pt_table_checksum:10122 12873 Table on slave has 1 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `mysql` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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('#', `source_uuid`, `interval_start`, `interval_end`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`gtid_executed` /*checksum table*/ params: # pt_table_checksum:11401 12873 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `source_uuid`, `interval_start`, `interval_end`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`gtid_executed` /*explain checksum table*/ params: # pt_table_checksum:11411 12873 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 => 'gtid_executed', # type => 'ALL' # }; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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('#', `source_uuid`, `interval_start`, `interval_end`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`gtid_executed` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses the general log, slow query log, or performance_schema table(s). This is unsafe because system tables may differ on slaves. # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.00322914123535156 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='gtid_executed' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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='gtid_executed') # pt_table_checksum:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`help_category` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `help_category_id`, `name`, `parent_category_id`, `url` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`help_category_id`), # TableParser:4616 12873 PRIMARY key cols: `help_category_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: UNIQUE KEY `name` (`name`) # TableParser:4616 12873 name key cols: `name` # SchemaIterator:7481 12873 Next schema object: mysql help_category # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `help_category_id`, `name`, `parent_category_id`, CRC32(`url`), CONCAT(ISNULL(`parent_category_id`)))) # RowChecksum:5890 12873 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_category_id`, `name`, `parent_category_id`, CRC32(`url`), CONCAT(ISNULL(`parent_category_id`)))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`help_category` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY, name # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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`, `name`, `parent_category_id`, CRC32(`url`), CONCAT(ISNULL(`parent_category_id`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`help_category` /*checksum table*/ # NibbleIterator:6228 12873 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_category_id`, `name`, `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:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `mysql`.`help_category` # TableParser:4557 12873 SHOW TABLES FROM `mysql` LIKE 'help\_category' # TableParser:4572 12873 Table mysql help_category exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`help_category` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `help_category_id`, `name`, `parent_category_id`, `url` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`help_category_id`), # TableParser:4616 12873 PRIMARY key cols: `help_category_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: UNIQUE KEY `name` (`name`) # TableParser:4616 12873 name key cols: `name` # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`help_category` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 40 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `mysql` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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`, `name`, `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:11401 12873 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_category_id`, `name`, `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:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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`, `name`, `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:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.00383901596069336 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # pt_table_checksum:10367 12873 Total avg rate: 1261 # WeightedAvgRate:8766 12873 Master op time: 40 n / 0.00383901596069336 s # WeightedAvgRate:8778 12873 Initial avg rate: 10419.3367283567 n/s # WeightedAvgRate:8782 12873 Adjust n to 5209 # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='help_category' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`help_keyword` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `help_keyword_id`, `name` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`help_keyword_id`), # TableParser:4616 12873 PRIMARY key cols: `help_keyword_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: UNIQUE KEY `name` (`name`) # TableParser:4616 12873 name key cols: `name` # SchemaIterator:7481 12873 Next schema object: mysql help_keyword # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `help_keyword_id`, `name`)) # RowChecksum:5890 12873 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_keyword_id`, `name`)) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`help_keyword` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY, name # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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`, `name`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`help_keyword` /*checksum table*/ # NibbleIterator:6228 12873 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_keyword_id`, `name`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`help_keyword` /*explain checksum table*/ # OobNibbleIterator:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `mysql`.`help_keyword` # TableParser:4557 12873 SHOW TABLES FROM `mysql` LIKE 'help\_keyword' # TableParser:4572 12873 Table mysql help_keyword exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`help_keyword` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `help_keyword_id`, `name` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`help_keyword_id`), # TableParser:4616 12873 PRIMARY key cols: `help_keyword_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: UNIQUE KEY `name` (`name`) # TableParser:4616 12873 name key cols: `name` # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`help_keyword` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 557 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `mysql` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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`, `name`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`help_keyword` /*checksum table*/ params: # pt_table_checksum:11401 12873 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_keyword_id`, `name`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`help_keyword` /*explain checksum table*/ params: # pt_table_checksum:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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`, `name`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`help_keyword` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.00362205505371094 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # pt_table_checksum:10367 12873 Total avg rate: 13245 # WeightedAvgRate:8766 12873 Master op time: 485 n / 0.00362205505371094 s # WeightedAvgRate:8778 12873 Initial avg rate: 133901.885202738 n/s # WeightedAvgRate:8782 12873 Adjust n to 66950 # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='help_keyword' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`help_relation` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `help_topic_id`, `help_keyword_id` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`help_keyword_id`,`help_topic_id`) # TableParser:4616 12873 PRIMARY key cols: `help_keyword_id`, `help_topic_id` # TableParser:4638 12873 This key is the clustered key # SchemaIterator:7481 12873 Next schema object: mysql help_relation # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `help_topic_id`, `help_keyword_id`)) # RowChecksum:5890 12873 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:6700 12873 EXPLAIN SELECT * FROM `mysql`.`help_relation` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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:6228 12873 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:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `mysql`.`help_relation` # TableParser:4557 12873 SHOW TABLES FROM `mysql` LIKE 'help\_relation' # TableParser:4572 12873 Table mysql help_relation exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`help_relation` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `help_topic_id`, `help_keyword_id` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`help_keyword_id`,`help_topic_id`) # TableParser:4616 12873 PRIMARY key cols: `help_keyword_id`, `help_topic_id` # TableParser:4638 12873 This key is the clustered key # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`help_relation` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 740 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `mysql` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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:11401 12873 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:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.00406789779663086 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # pt_table_checksum:10367 12873 Total avg rate: 36709 # WeightedAvgRate:8766 12873 Master op time: 1090 n / 0.00406789779663086 s # WeightedAvgRate:8778 12873 Initial avg rate: 267951.668034228 n/s # WeightedAvgRate:8782 12873 Adjust n to 133975 # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='help_relation' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`help_topic` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `help_topic_id`, `name`, `help_category_id`, `description`, `example`, `url` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`help_topic_id`), # TableParser:4616 12873 PRIMARY key cols: `help_topic_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: UNIQUE KEY `name` (`name`) # TableParser:4616 12873 name key cols: `name` # SchemaIterator:7481 12873 Next schema object: mysql help_topic # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `help_topic_id`, `name`, `help_category_id`, CRC32(`description`), CRC32(`example`), CRC32(`url`))) # RowChecksum:5890 12873 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_topic_id`, `name`, `help_category_id`, CRC32(`description`), CRC32(`example`), CRC32(`url`))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`help_topic` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY, name # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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`, `name`, `help_category_id`, CRC32(`description`), CRC32(`example`), CRC32(`url`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`help_topic` /*checksum table*/ # NibbleIterator:6228 12873 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_topic_id`, `name`, `help_category_id`, CRC32(`description`), CRC32(`example`), CRC32(`url`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`help_topic` /*explain checksum table*/ # OobNibbleIterator:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `mysql`.`help_topic` # TableParser:4557 12873 SHOW TABLES FROM `mysql` LIKE 'help\_topic' # TableParser:4572 12873 Table mysql help_topic exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`help_topic` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `help_topic_id`, `name`, `help_category_id`, `description`, `example`, `url` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`help_topic_id`), # TableParser:4616 12873 PRIMARY key cols: `help_topic_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: UNIQUE KEY `name` (`name`) # TableParser:4616 12873 name key cols: `name` # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`help_topic` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 438 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `mysql` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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`, `name`, `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:11401 12873 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `help_topic_id`, `name`, `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:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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`, `name`, `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:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.00617289543151855 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # pt_table_checksum:10367 12873 Total avg rate: 42797 # WeightedAvgRate:8766 12873 Master op time: 533 n / 0.00617289543151855 s # WeightedAvgRate:8778 12873 Initial avg rate: 86345.2177204434 n/s # WeightedAvgRate:8782 12873 Adjust n to 43172 # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='help_topic' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`ndb_binlog_index` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: MyISAM # TableParser:4428 12873 Table cols: `position`, `file`, `epoch`, `inserts`, `updates`, `deletes`, `schemaops`, `orig_server_id`, `orig_epoch`, `gci`, `next_position`, `next_file` # TableParser:4580 12873 Storage engine: MyISAM # TableParser:4596 12873 Parsed key: PRIMARY KEY (`epoch`,`orig_server_id`,`orig_epoch`) # TableParser:4616 12873 PRIMARY key cols: `epoch`, `orig_server_id`, `orig_epoch` # SchemaIterator:7481 12873 Next schema object: mysql ndb_binlog_index # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `position`, `file`, `epoch`, `inserts`, `updates`, `deletes`, `schemaops`, `orig_server_id`, `orig_epoch`, `gci`, `next_position`, `next_file`)) # RowChecksum:5890 12873 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `position`, `file`, `epoch`, `inserts`, `updates`, `deletes`, `schemaops`, `orig_server_id`, `orig_epoch`, `gci`, `next_position`, `next_file`)) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`ndb_binlog_index` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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`, `file`, `epoch`, `inserts`, `updates`, `deletes`, `schemaops`, `orig_server_id`, `orig_epoch`, `gci`, `next_position`, `next_file`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`ndb_binlog_index` /*checksum table*/ # NibbleIterator:6228 12873 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `position`, `file`, `epoch`, `inserts`, `updates`, `deletes`, `schemaops`, `orig_server_id`, `orig_epoch`, `gci`, `next_position`, `next_file`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`ndb_binlog_index` /*explain checksum table*/ # OobNibbleIterator:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `mysql`.`ndb_binlog_index` # TableParser:4557 12873 SHOW TABLES FROM `mysql` LIKE 'ndb\_binlog\_index' # TableParser:4572 12873 Table mysql ndb_binlog_index exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`ndb_binlog_index` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: MyISAM # TableParser:4428 12873 Table cols: `position`, `file`, `epoch`, `inserts`, `updates`, `deletes`, `schemaops`, `orig_server_id`, `orig_epoch`, `gci`, `next_position`, `next_file` # TableParser:4580 12873 Storage engine: MyISAM # TableParser:4596 12873 Parsed key: PRIMARY KEY (`epoch`,`orig_server_id`,`orig_epoch`) # TableParser:4616 12873 PRIMARY key cols: `epoch`, `orig_server_id`, `orig_epoch` # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`ndb_binlog_index` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 0 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `mysql` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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`, `file`, `epoch`, `inserts`, `updates`, `deletes`, `schemaops`, `orig_server_id`, `orig_epoch`, `gci`, `next_position`, `next_file`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`ndb_binlog_index` /*checksum table*/ params: # pt_table_checksum:11401 12873 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `position`, `file`, `epoch`, `inserts`, `updates`, `deletes`, `schemaops`, `orig_server_id`, `orig_epoch`, `gci`, `next_position`, `next_file`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`ndb_binlog_index` /*explain checksum table*/ params: # pt_table_checksum:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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`, `file`, `epoch`, `inserts`, `updates`, `deletes`, `schemaops`, `orig_server_id`, `orig_epoch`, `gci`, `next_position`, `next_file`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`ndb_binlog_index` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.00392818450927734 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='ndb_binlog_index' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`procs_priv` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: MyISAM # TableParser:4428 12873 Table cols: `host`, `db`, `user`, `routine_name`, `routine_type`, `grantor`, `proc_priv`, `timestamp` # TableParser:4580 12873 Storage engine: MyISAM # TableParser:4596 12873 Parsed key: PRIMARY KEY (`host`,`db`,`user`,`routine_name`,`routine_type`), # TableParser:4616 12873 PRIMARY key cols: `host`, `db`, `user`, `routine_name`, `routine_type` # TableParser:4596 12873 Parsed key: KEY `grantor` (`grantor`) # TableParser:4616 12873 grantor key cols: `grantor` # SchemaIterator:7481 12873 Next schema object: mysql procs_priv # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `host`, `db`, `user`, `routine_name`, `routine_type`, `grantor`, `proc_priv`, UNIX_TIMESTAMP(`timestamp`))) # RowChecksum:5890 12873 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `host`, `db`, `user`, `routine_name`, `routine_type`, `grantor`, `proc_priv`, UNIX_TIMESTAMP(`timestamp`))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`procs_priv` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY, grantor # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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('#', `host`, `db`, `user`, `routine_name`, `routine_type`, `grantor`, `proc_priv`, UNIX_TIMESTAMP(`timestamp`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`procs_priv` /*checksum table*/ # NibbleIterator:6228 12873 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `host`, `db`, `user`, `routine_name`, `routine_type`, `grantor`, `proc_priv`, UNIX_TIMESTAMP(`timestamp`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`procs_priv` /*explain checksum table*/ # OobNibbleIterator:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `mysql`.`procs_priv` # TableParser:4557 12873 SHOW TABLES FROM `mysql` LIKE 'procs\_priv' # TableParser:4572 12873 Table mysql procs_priv exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`procs_priv` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: MyISAM # TableParser:4428 12873 Table cols: `host`, `db`, `user`, `routine_name`, `routine_type`, `grantor`, `proc_priv`, `timestamp` # TableParser:4580 12873 Storage engine: MyISAM # TableParser:4596 12873 Parsed key: PRIMARY KEY (`host`,`db`,`user`,`routine_name`,`routine_type`), # TableParser:4616 12873 PRIMARY key cols: `host`, `db`, `user`, `routine_name`, `routine_type` # TableParser:4596 12873 Parsed key: KEY `grantor` (`grantor`) # TableParser:4616 12873 grantor key cols: `grantor` # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`procs_priv` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 0 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `mysql` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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('#', `host`, `db`, `user`, `routine_name`, `routine_type`, `grantor`, `proc_priv`, UNIX_TIMESTAMP(`timestamp`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`procs_priv` /*checksum table*/ params: # pt_table_checksum:11401 12873 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `host`, `db`, `user`, `routine_name`, `routine_type`, `grantor`, `proc_priv`, UNIX_TIMESTAMP(`timestamp`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`procs_priv` /*explain checksum table*/ params: # pt_table_checksum:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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('#', `host`, `db`, `user`, `routine_name`, `routine_type`, `grantor`, `proc_priv`, UNIX_TIMESTAMP(`timestamp`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`procs_priv` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.00304579734802246 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='procs_priv' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`proxies_priv` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: MyISAM # TableParser:4428 12873 Table cols: `host`, `user`, `proxied_host`, `proxied_user`, `with_grant`, `grantor`, `timestamp` # TableParser:4580 12873 Storage engine: MyISAM # TableParser:4596 12873 Parsed key: PRIMARY KEY (`host`,`user`,`proxied_host`,`proxied_user`), # TableParser:4616 12873 PRIMARY key cols: `host`, `user`, `proxied_host`, `proxied_user` # TableParser:4596 12873 Parsed key: KEY `grantor` (`grantor`) # TableParser:4616 12873 grantor key cols: `grantor` # SchemaIterator:7481 12873 Next schema object: mysql proxies_priv # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `host`, `user`, `proxied_host`, `proxied_user`, `with_grant`, `grantor`, UNIX_TIMESTAMP(`timestamp`))) # RowChecksum:5890 12873 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `host`, `user`, `proxied_host`, `proxied_user`, `with_grant`, `grantor`, UNIX_TIMESTAMP(`timestamp`))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`proxies_priv` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY, grantor # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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('#', `host`, `user`, `proxied_host`, `proxied_user`, `with_grant`, `grantor`, UNIX_TIMESTAMP(`timestamp`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`proxies_priv` /*checksum table*/ # NibbleIterator:6228 12873 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `host`, `user`, `proxied_host`, `proxied_user`, `with_grant`, `grantor`, UNIX_TIMESTAMP(`timestamp`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`proxies_priv` /*explain checksum table*/ # OobNibbleIterator:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `mysql`.`proxies_priv` # TableParser:4557 12873 SHOW TABLES FROM `mysql` LIKE 'proxies\_priv' # TableParser:4572 12873 Table mysql proxies_priv exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`proxies_priv` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: MyISAM # TableParser:4428 12873 Table cols: `host`, `user`, `proxied_host`, `proxied_user`, `with_grant`, `grantor`, `timestamp` # TableParser:4580 12873 Storage engine: MyISAM # TableParser:4596 12873 Parsed key: PRIMARY KEY (`host`,`user`,`proxied_host`,`proxied_user`), # TableParser:4616 12873 PRIMARY key cols: `host`, `user`, `proxied_host`, `proxied_user` # TableParser:4596 12873 Parsed key: KEY `grantor` (`grantor`) # TableParser:4616 12873 grantor key cols: `grantor` # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`proxies_priv` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 1 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `mysql` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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('#', `host`, `user`, `proxied_host`, `proxied_user`, `with_grant`, `grantor`, UNIX_TIMESTAMP(`timestamp`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`proxies_priv` /*checksum table*/ params: # pt_table_checksum:11401 12873 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `host`, `user`, `proxied_host`, `proxied_user`, `with_grant`, `grantor`, UNIX_TIMESTAMP(`timestamp`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`proxies_priv` /*explain checksum table*/ params: # pt_table_checksum:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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('#', `host`, `user`, `proxied_host`, `proxied_user`, `with_grant`, `grantor`, UNIX_TIMESTAMP(`timestamp`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`proxies_priv` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.00366306304931641 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # pt_table_checksum:10367 12873 Total avg rate: 39912 # WeightedAvgRate:8766 12873 Master op time: 1 n / 0.00366306304931641 s # WeightedAvgRate:8778 12873 Initial avg rate: 272.995574069253 n/s # WeightedAvgRate:8782 12873 Adjust n to 136 # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='proxies_priv' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`server_cost` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `cost_name`, `cost_value`, `last_update`, `comment` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`cost_name`) # TableParser:4616 12873 PRIMARY key cols: `cost_name` # TableParser:4638 12873 This key is the clustered key # SchemaIterator:7481 12873 Next schema object: mysql server_cost # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `cost_name`, `cost_value`, UNIX_TIMESTAMP(`last_update`), `comment`, CONCAT(ISNULL(`cost_value`), ISNULL(`comment`)))) # RowChecksum:5890 12873 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `cost_name`, `cost_value`, UNIX_TIMESTAMP(`last_update`), `comment`, CONCAT(ISNULL(`cost_value`), ISNULL(`comment`)))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`server_cost` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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('#', `cost_name`, `cost_value`, UNIX_TIMESTAMP(`last_update`), `comment`, CONCAT(ISNULL(`cost_value`), ISNULL(`comment`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`server_cost` /*checksum table*/ # NibbleIterator:6228 12873 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `cost_name`, `cost_value`, UNIX_TIMESTAMP(`last_update`), `comment`, CONCAT(ISNULL(`cost_value`), ISNULL(`comment`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`server_cost` /*explain checksum table*/ # OobNibbleIterator:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `mysql`.`server_cost` # TableParser:4557 12873 SHOW TABLES FROM `mysql` LIKE 'server\_cost' # TableParser:4572 12873 Table mysql server_cost exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`server_cost` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `cost_name`, `cost_value`, `last_update`, `comment` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`cost_name`) # TableParser:4616 12873 PRIMARY key cols: `cost_name` # TableParser:4638 12873 This key is the clustered key # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`server_cost` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 6 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `mysql` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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('#', `cost_name`, `cost_value`, UNIX_TIMESTAMP(`last_update`), `comment`, CONCAT(ISNULL(`cost_value`), ISNULL(`comment`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`server_cost` /*checksum table*/ params: # pt_table_checksum:11401 12873 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `cost_name`, `cost_value`, UNIX_TIMESTAMP(`last_update`), `comment`, CONCAT(ISNULL(`cost_value`), ISNULL(`comment`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`server_cost` /*explain checksum table*/ params: # pt_table_checksum:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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('#', `cost_name`, `cost_value`, UNIX_TIMESTAMP(`last_update`), `comment`, 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:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.0181849002838135 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # pt_table_checksum:10367 12873 Total avg rate: 29939 # WeightedAvgRate:8766 12873 Master op time: 6 n / 0.0181849002838135 s # WeightedAvgRate:8778 12873 Initial avg rate: 329.944069329907 n/s # WeightedAvgRate:8782 12873 Adjust n to 164 # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='server_cost' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`servers` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `server_name`, `host`, `db`, `username`, `password`, `port`, `socket`, `wrapper`, `owner` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`server_name`) # TableParser:4616 12873 PRIMARY key cols: `server_name` # TableParser:4638 12873 This key is the clustered key # SchemaIterator:7481 12873 Next schema object: mysql servers # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `server_name`, `host`, `db`, `username`, `password`, `port`, `socket`, `wrapper`, `owner`)) # RowChecksum:5890 12873 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `server_name`, `host`, `db`, `username`, `password`, `port`, `socket`, `wrapper`, `owner`)) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`servers` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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('#', `server_name`, `host`, `db`, `username`, `password`, `port`, `socket`, `wrapper`, `owner`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`servers` /*checksum table*/ # NibbleIterator:6228 12873 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `server_name`, `host`, `db`, `username`, `password`, `port`, `socket`, `wrapper`, `owner`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`servers` /*explain checksum table*/ # OobNibbleIterator:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `mysql`.`servers` # TableParser:4557 12873 SHOW TABLES FROM `mysql` LIKE 'servers' # TableParser:4572 12873 Table mysql servers exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`servers` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `server_name`, `host`, `db`, `username`, `password`, `port`, `socket`, `wrapper`, `owner` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`server_name`) # TableParser:4616 12873 PRIMARY key cols: `server_name` # TableParser:4638 12873 This key is the clustered key # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`servers` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 1 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `mysql` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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('#', `server_name`, `host`, `db`, `username`, `password`, `port`, `socket`, `wrapper`, `owner`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`servers` /*checksum table*/ params: # pt_table_checksum:11401 12873 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `server_name`, `host`, `db`, `username`, `password`, `port`, `socket`, `wrapper`, `owner`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`servers` /*explain checksum table*/ params: # pt_table_checksum:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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('#', `server_name`, `host`, `db`, `username`, `password`, `port`, `socket`, `wrapper`, `owner`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`servers` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.00362610816955566 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='servers' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`tables_priv` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: MyISAM # TableParser:4428 12873 Table cols: `host`, `db`, `user`, `table_name`, `grantor`, `timestamp`, `table_priv`, `column_priv` # TableParser:4580 12873 Storage engine: MyISAM # TableParser:4596 12873 Parsed key: PRIMARY KEY (`host`,`db`,`user`,`table_name`), # TableParser:4616 12873 PRIMARY key cols: `host`, `db`, `user`, `table_name` # TableParser:4596 12873 Parsed key: KEY `grantor` (`grantor`) # TableParser:4616 12873 grantor key cols: `grantor` # SchemaIterator:7481 12873 Next schema object: mysql tables_priv # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `host`, `db`, `user`, `table_name`, `grantor`, UNIX_TIMESTAMP(`timestamp`), `table_priv`, `column_priv`)) # RowChecksum:5890 12873 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `host`, `db`, `user`, `table_name`, `grantor`, UNIX_TIMESTAMP(`timestamp`), `table_priv`, `column_priv`)) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`tables_priv` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY, grantor # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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('#', `host`, `db`, `user`, `table_name`, `grantor`, UNIX_TIMESTAMP(`timestamp`), `table_priv`, `column_priv`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`tables_priv` /*checksum table*/ # NibbleIterator:6228 12873 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `host`, `db`, `user`, `table_name`, `grantor`, UNIX_TIMESTAMP(`timestamp`), `table_priv`, `column_priv`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`tables_priv` /*explain checksum table*/ # OobNibbleIterator:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `mysql`.`tables_priv` # TableParser:4557 12873 SHOW TABLES FROM `mysql` LIKE 'tables\_priv' # TableParser:4572 12873 Table mysql tables_priv exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`tables_priv` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: MyISAM # TableParser:4428 12873 Table cols: `host`, `db`, `user`, `table_name`, `grantor`, `timestamp`, `table_priv`, `column_priv` # TableParser:4580 12873 Storage engine: MyISAM # TableParser:4596 12873 Parsed key: PRIMARY KEY (`host`,`db`,`user`,`table_name`), # TableParser:4616 12873 PRIMARY key cols: `host`, `db`, `user`, `table_name` # TableParser:4596 12873 Parsed key: KEY `grantor` (`grantor`) # TableParser:4616 12873 grantor key cols: `grantor` # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`tables_priv` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 1 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `mysql` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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('#', `host`, `db`, `user`, `table_name`, `grantor`, UNIX_TIMESTAMP(`timestamp`), `table_priv`, `column_priv`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`tables_priv` /*checksum table*/ params: # pt_table_checksum:11401 12873 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `host`, `db`, `user`, `table_name`, `grantor`, UNIX_TIMESTAMP(`timestamp`), `table_priv`, `column_priv`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`tables_priv` /*explain checksum table*/ params: # pt_table_checksum:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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('#', `host`, `db`, `user`, `table_name`, `grantor`, UNIX_TIMESTAMP(`timestamp`), `table_priv`, `column_priv`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`tables_priv` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.00488400459289551 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # pt_table_checksum:10367 12873 Total avg rate: 28055 # WeightedAvgRate:8766 12873 Master op time: 1 n / 0.00488400459289551 s # WeightedAvgRate:8778 12873 Initial avg rate: 204.750012204052 n/s # WeightedAvgRate:8782 12873 Adjust n to 102 # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='tables_priv' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`time_zone` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `time_zone_id`, `use_leap_seconds` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`time_zone_id`) # TableParser:4616 12873 PRIMARY key cols: `time_zone_id` # TableParser:4638 12873 This key is the clustered key # SchemaIterator:7481 12873 Next schema object: mysql time_zone # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `time_zone_id`, `use_leap_seconds`)) # RowChecksum:5890 12873 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `time_zone_id`, `use_leap_seconds`)) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`time_zone` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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`, `use_leap_seconds`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone` /*checksum table*/ # NibbleIterator:6228 12873 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `time_zone_id`, `use_leap_seconds`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone` /*explain checksum table*/ # OobNibbleIterator:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `mysql`.`time_zone` # TableParser:4557 12873 SHOW TABLES FROM `mysql` LIKE 'time\_zone' # TableParser:4572 12873 Table mysql time_zone exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`time_zone` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `time_zone_id`, `use_leap_seconds` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`time_zone_id`) # TableParser:4616 12873 PRIMARY key cols: `time_zone_id` # TableParser:4638 12873 This key is the clustered key # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`time_zone` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 1 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `mysql` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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`, `use_leap_seconds`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone` /*checksum table*/ params: # pt_table_checksum:11401 12873 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `time_zone_id`, `use_leap_seconds`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone` /*explain checksum table*/ params: # pt_table_checksum:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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`, `use_leap_seconds`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.00317692756652832 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='time_zone' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`time_zone_leap_second` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `transition_time`, `correction` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`transition_time`) # TableParser:4616 12873 PRIMARY key cols: `transition_time` # TableParser:4638 12873 This key is the clustered key # SchemaIterator:7481 12873 Next schema object: mysql time_zone_leap_second # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `transition_time`, `correction`)) # RowChecksum:5890 12873 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:6700 12873 EXPLAIN SELECT * FROM `mysql`.`time_zone_leap_second` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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:6228 12873 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:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `mysql`.`time_zone_leap_second` # TableParser:4557 12873 SHOW TABLES FROM `mysql` LIKE 'time\_zone\_leap\_second' # TableParser:4572 12873 Table mysql time_zone_leap_second exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`time_zone_leap_second` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `transition_time`, `correction` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`transition_time`) # TableParser:4616 12873 PRIMARY key cols: `transition_time` # TableParser:4638 12873 This key is the clustered key # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`time_zone_leap_second` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 1 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `mysql` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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:11401 12873 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:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.00311899185180664 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='time_zone_leap_second' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`time_zone_name` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `name`, `time_zone_id` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`name`) # TableParser:4616 12873 PRIMARY key cols: `name` # TableParser:4638 12873 This key is the clustered key # SchemaIterator:7481 12873 Next schema object: mysql time_zone_name # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `name`, `time_zone_id`)) # RowChecksum:5890 12873 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `name`, `time_zone_id`)) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`time_zone_name` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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('#', `name`, `time_zone_id`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone_name` /*checksum table*/ # NibbleIterator:6228 12873 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `name`, `time_zone_id`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone_name` /*explain checksum table*/ # OobNibbleIterator:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `mysql`.`time_zone_name` # TableParser:4557 12873 SHOW TABLES FROM `mysql` LIKE 'time\_zone\_name' # TableParser:4572 12873 Table mysql time_zone_name exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`time_zone_name` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `name`, `time_zone_id` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`name`) # TableParser:4616 12873 PRIMARY key cols: `name` # TableParser:4638 12873 This key is the clustered key # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`time_zone_name` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 1 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `mysql` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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('#', `name`, `time_zone_id`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone_name` /*checksum table*/ params: # pt_table_checksum:11401 12873 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `name`, `time_zone_id`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone_name` /*explain checksum table*/ params: # pt_table_checksum:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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('#', `name`, `time_zone_id`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone_name` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.00285601615905762 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='time_zone_name' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`time_zone_transition` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `time_zone_id`, `transition_time`, `transition_type_id` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`time_zone_id`,`transition_time`) # TableParser:4616 12873 PRIMARY key cols: `time_zone_id`, `transition_time` # TableParser:4638 12873 This key is the clustered key # SchemaIterator:7481 12873 Next schema object: mysql time_zone_transition # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `time_zone_id`, `transition_time`, `transition_type_id`)) # RowChecksum:5890 12873 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:6700 12873 EXPLAIN SELECT * FROM `mysql`.`time_zone_transition` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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:6228 12873 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:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `mysql`.`time_zone_transition` # TableParser:4557 12873 SHOW TABLES FROM `mysql` LIKE 'time\_zone\_transition' # TableParser:4572 12873 Table mysql time_zone_transition exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`time_zone_transition` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `time_zone_id`, `transition_time`, `transition_type_id` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`time_zone_id`,`transition_time`) # TableParser:4616 12873 PRIMARY key cols: `time_zone_id`, `transition_time` # TableParser:4638 12873 This key is the clustered key # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`time_zone_transition` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 1 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `mysql` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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:11401 12873 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:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.00403189659118652 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='time_zone_transition' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`time_zone_transition_type` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `time_zone_id`, `transition_type_id`, `offset`, `is_dst`, `abbreviation` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`time_zone_id`,`transition_type_id`) # TableParser:4616 12873 PRIMARY key cols: `time_zone_id`, `transition_type_id` # TableParser:4638 12873 This key is the clustered key # SchemaIterator:7481 12873 Next schema object: mysql time_zone_transition_type # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `time_zone_id`, `transition_type_id`, `offset`, `is_dst`, `abbreviation`)) # RowChecksum:5890 12873 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `time_zone_id`, `transition_type_id`, `offset`, `is_dst`, `abbreviation`)) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`time_zone_transition_type` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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`, `abbreviation`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone_transition_type` /*checksum table*/ # NibbleIterator:6228 12873 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`, `abbreviation`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone_transition_type` /*explain checksum table*/ # OobNibbleIterator:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `mysql`.`time_zone_transition_type` # TableParser:4557 12873 SHOW TABLES FROM `mysql` LIKE 'time\_zone\_transition\_type' # TableParser:4572 12873 Table mysql time_zone_transition_type exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`time_zone_transition_type` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `time_zone_id`, `transition_type_id`, `offset`, `is_dst`, `abbreviation` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`time_zone_id`,`transition_type_id`) # TableParser:4616 12873 PRIMARY key cols: `time_zone_id`, `transition_type_id` # TableParser:4638 12873 This key is the clustered key # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`time_zone_transition_type` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 1 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `mysql` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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`, `abbreviation`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone_transition_type` /*checksum table*/ params: # pt_table_checksum:11401 12873 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `time_zone_id`, `transition_type_id`, `offset`, `is_dst`, `abbreviation`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone_transition_type` /*explain checksum table*/ params: # pt_table_checksum:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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`, `abbreviation`)) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`time_zone_transition_type` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.00295901298522949 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='time_zone_transition_type' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`user` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: MyISAM # TableParser:4428 12873 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:4580 12873 Storage engine: MyISAM # TableParser:4596 12873 Parsed key: PRIMARY KEY (`host`,`user`) # TableParser:4616 12873 PRIMARY key cols: `host`, `user` # SchemaIterator:7481 12873 Next schema object: mysql user # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `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`, CRC32(`ssl_cipher`), CRC32(`x509_issuer`), CRC32(`x509_subject`), `max_questions`, `max_updates`, `max_connections`, `max_user_connections`, `plugin`, CRC32(`authentication_string`), `password_expired`, UNIX_TIMESTAMP(`password_last_changed`), `password_lifetime`, `account_locked`, CONCAT(ISNULL(`authentication_string`), ISNULL(`password_last_changed`), ISNULL(`password_lifetime`)))) # RowChecksum:5890 12873 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `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`, CRC32(`ssl_cipher`), CRC32(`x509_issuer`), CRC32(`x509_subject`), `max_questions`, `max_updates`, `max_connections`, `max_user_connections`, `plugin`, CRC32(`authentication_string`), `password_expired`, UNIX_TIMESTAMP(`password_last_changed`), `password_lifetime`, `account_locked`, CONCAT(ISNULL(`authentication_string`), ISNULL(`password_last_changed`), ISNULL(`password_lifetime`)))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`user` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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('#', `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`, CRC32(`ssl_cipher`), CRC32(`x509_issuer`), CRC32(`x509_subject`), `max_questions`, `max_updates`, `max_connections`, `max_user_connections`, `plugin`, CRC32(`authentication_string`), `password_expired`, UNIX_TIMESTAMP(`password_last_changed`), `password_lifetime`, `account_locked`, CONCAT(ISNULL(`authentication_string`), ISNULL(`password_last_changed`), ISNULL(`password_lifetime`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `mysql`.`user` /*checksum table*/ # NibbleIterator:6228 12873 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `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`, CRC32(`ssl_cipher`), CRC32(`x509_issuer`), CRC32(`x509_subject`), `max_questions`, `max_updates`, `max_connections`, `max_user_connections`, `plugin`, CRC32(`authentication_string`), `password_expired`, UNIX_TIMESTAMP(`password_last_changed`), `password_lifetime`, `account_locked`, 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:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `mysql`.`user` # TableParser:4557 12873 SHOW TABLES FROM `mysql` LIKE 'user' # TableParser:4572 12873 Table mysql user exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `mysql` # TableParser:4386 12873 SHOW CREATE TABLE `mysql`.`user` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: MyISAM # TableParser:4428 12873 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:4580 12873 Storage engine: MyISAM # TableParser:4596 12873 Parsed key: PRIMARY KEY (`host`,`user`) # TableParser:4616 12873 PRIMARY key cols: `host`, `user` # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `mysql`.`user` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 12 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `mysql` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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('#', `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`, CRC32(`ssl_cipher`), CRC32(`x509_issuer`), CRC32(`x509_subject`), `max_questions`, `max_updates`, `max_connections`, `max_user_connections`, `plugin`, CRC32(`authentication_string`), `password_expired`, UNIX_TIMESTAMP(`password_last_changed`), `password_lifetime`, `account_locked`, 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:11401 12873 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `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`, CRC32(`ssl_cipher`), CRC32(`x509_issuer`), CRC32(`x509_subject`), `max_questions`, `max_updates`, `max_connections`, `max_user_connections`, `plugin`, CRC32(`authentication_string`), `password_expired`, UNIX_TIMESTAMP(`password_last_changed`), `password_lifetime`, `account_locked`, 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:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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('#', `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`, CRC32(`ssl_cipher`), CRC32(`x509_issuer`), CRC32(`x509_subject`), `max_questions`, `max_updates`, `max_connections`, `max_user_connections`, `plugin`, CRC32(`authentication_string`), `password_expired`, UNIX_TIMESTAMP(`password_last_changed`), `password_lifetime`, `account_locked`, 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:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.0041661262512207 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # pt_table_checksum:10367 12873 Total avg rate: 26764 # WeightedAvgRate:8766 12873 Master op time: 12 n / 0.0041661262512207 s # WeightedAvgRate:8778 12873 Initial avg rate: 2880.37358360993 n/s # WeightedAvgRate:8782 12873 Adjust n to 1440 # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='mysql' AND tbl='user' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # SchemaIterator:7629 12873 No more tables in database mysql # SchemaIterator:7575 12873 Next database: percona # SchemaIterator:7581 12873 SHOW /*!50002 FULL*/ TABLES FROM `percona` # SchemaIterator:7707 12873 Table checksums is in --ignore-tables list # SchemaIterator:7599 12873 Found 0 tables in database percona # SchemaIterator:7629 12873 No more tables in database percona # SchemaIterator:7575 12873 Next database: sakila # SchemaIterator:7581 12873 SHOW /*!50002 FULL*/ TABLES FROM `sakila` # SchemaIterator:7599 12873 Found 17 tables in database sakila # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`actor` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `actor_id`, `first_name`, `last_name`, `last_update` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`actor_id`), # TableParser:4616 12873 PRIMARY key cols: `actor_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: KEY `idx_actor_last_name` (`last_name`) # TableParser:4616 12873 idx_actor_last_name key cols: `last_name` # SchemaIterator:7481 12873 Next schema object: sakila actor # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `actor_id`, `first_name`, `last_name`, UNIX_TIMESTAMP(`last_update`))) # RowChecksum:5890 12873 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `actor_id`, `first_name`, `last_name`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `sakila`.`actor` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY, idx_actor_last_name # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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`, `first_name`, `last_name`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`actor` /*checksum table*/ # NibbleIterator:6228 12873 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `actor_id`, `first_name`, `last_name`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`actor` /*explain checksum table*/ # OobNibbleIterator:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `sakila`.`actor` # TableParser:4557 12873 SHOW TABLES FROM `sakila` LIKE 'actor' # TableParser:4572 12873 Table sakila actor exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`actor` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `actor_id`, `first_name`, `last_name`, `last_update` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`actor_id`), # TableParser:4616 12873 PRIMARY key cols: `actor_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: KEY `idx_actor_last_name` (`last_name`) # TableParser:4616 12873 idx_actor_last_name key cols: `last_name` # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `sakila`.`actor` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 200 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `sakila` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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`, `first_name`, `last_name`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`actor` /*checksum table*/ params: # pt_table_checksum:11401 12873 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `actor_id`, `first_name`, `last_name`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`actor` /*explain checksum table*/ params: # pt_table_checksum:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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`, `first_name`, `last_name`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`actor` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.0030369758605957 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # pt_table_checksum:10367 12873 Total avg rate: 28173 # WeightedAvgRate:8766 12873 Master op time: 200 n / 0.0030369758605957 s # WeightedAvgRate:8778 12873 Initial avg rate: 65854.9850840006 n/s # WeightedAvgRate:8782 12873 Adjust n to 32927 # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='actor' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`address` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `address_id`, `address`, `address2`, `district`, `city_id`, `postal_code`, `phone`, `last_update` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`address_id`), # TableParser:4616 12873 PRIMARY key cols: `address_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: KEY `idx_fk_city_id` (`city_id`), # TableParser:4616 12873 idx_fk_city_id key cols: `city_id` # SchemaIterator:7481 12873 Next schema object: sakila address # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `address_id`, `address`, `address2`, `district`, `city_id`, `postal_code`, `phone`, UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`address2`), ISNULL(`postal_code`)))) # RowChecksum:5890 12873 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `address_id`, `address`, `address2`, `district`, `city_id`, `postal_code`, `phone`, UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`address2`), ISNULL(`postal_code`)))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `sakila`.`address` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY, idx_fk_city_id # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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`, `address`, `address2`, `district`, `city_id`, `postal_code`, `phone`, UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`address2`), ISNULL(`postal_code`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`address` /*checksum table*/ # NibbleIterator:6228 12873 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `address_id`, `address`, `address2`, `district`, `city_id`, `postal_code`, `phone`, UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`address2`), ISNULL(`postal_code`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`address` /*explain checksum table*/ # OobNibbleIterator:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `sakila`.`address` # TableParser:4557 12873 SHOW TABLES FROM `sakila` LIKE 'address' # TableParser:4572 12873 Table sakila address exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`address` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `address_id`, `address`, `address2`, `district`, `city_id`, `postal_code`, `phone`, `last_update` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`address_id`), # TableParser:4616 12873 PRIMARY key cols: `address_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: KEY `idx_fk_city_id` (`city_id`), # TableParser:4616 12873 idx_fk_city_id key cols: `city_id` # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `sakila`.`address` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 603 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `sakila` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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`, `address`, `address2`, `district`, `city_id`, `postal_code`, `phone`, 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:11401 12873 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `address_id`, `address`, `address2`, `district`, `city_id`, `postal_code`, `phone`, 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:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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`, `address`, `address2`, `district`, `city_id`, `postal_code`, `phone`, 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:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.00509214401245117 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # pt_table_checksum:10367 12873 Total avg rate: 33315 # WeightedAvgRate:8766 12873 Master op time: 603 n / 0.00509214401245117 s # WeightedAvgRate:8778 12873 Initial avg rate: 118417.703530293 n/s # WeightedAvgRate:8782 12873 Adjust n to 59208 # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='address' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`category` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `category_id`, `name`, `last_update` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`category_id`) # TableParser:4616 12873 PRIMARY key cols: `category_id` # TableParser:4638 12873 This key is the clustered key # SchemaIterator:7481 12873 Next schema object: sakila category # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `category_id`, `name`, UNIX_TIMESTAMP(`last_update`))) # RowChecksum:5890 12873 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `category_id`, `name`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `sakila`.`category` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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`, `name`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`category` /*checksum table*/ # NibbleIterator:6228 12873 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `category_id`, `name`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`category` /*explain checksum table*/ # OobNibbleIterator:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `sakila`.`category` # TableParser:4557 12873 SHOW TABLES FROM `sakila` LIKE 'category' # TableParser:4572 12873 Table sakila category exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`category` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `category_id`, `name`, `last_update` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`category_id`) # TableParser:4616 12873 PRIMARY key cols: `category_id` # TableParser:4638 12873 This key is the clustered key # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `sakila`.`category` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 16 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `sakila` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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`, `name`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`category` /*checksum table*/ params: # pt_table_checksum:11401 12873 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `category_id`, `name`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`category` /*explain checksum table*/ params: # pt_table_checksum:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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`, `name`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`category` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.00252795219421387 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # pt_table_checksum:10367 12873 Total avg rate: 32573 # WeightedAvgRate:8766 12873 Master op time: 16 n / 0.00252795219421387 s # WeightedAvgRate:8778 12873 Initial avg rate: 6329.23361312836 n/s # WeightedAvgRate:8782 12873 Adjust n to 3164 # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='category' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`city` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `city_id`, `city`, `country_id`, `last_update` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`city_id`), # TableParser:4616 12873 PRIMARY key cols: `city_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: KEY `idx_fk_country_id` (`country_id`), # TableParser:4616 12873 idx_fk_country_id key cols: `country_id` # SchemaIterator:7481 12873 Next schema object: sakila city # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `city_id`, `city`, `country_id`, UNIX_TIMESTAMP(`last_update`))) # RowChecksum:5890 12873 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `city_id`, `city`, `country_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `sakila`.`city` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY, idx_fk_country_id # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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`, `city`, `country_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`city` /*checksum table*/ # NibbleIterator:6228 12873 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `city_id`, `city`, `country_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`city` /*explain checksum table*/ # OobNibbleIterator:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `sakila`.`city` # TableParser:4557 12873 SHOW TABLES FROM `sakila` LIKE 'city' # TableParser:4572 12873 Table sakila city exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`city` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `city_id`, `city`, `country_id`, `last_update` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`city_id`), # TableParser:4616 12873 PRIMARY key cols: `city_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: KEY `idx_fk_country_id` (`country_id`), # TableParser:4616 12873 idx_fk_country_id key cols: `country_id` # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `sakila`.`city` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 600 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `sakila` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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`, `city`, `country_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`city` /*checksum table*/ params: # pt_table_checksum:11401 12873 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `city_id`, `city`, `country_id`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`city` /*explain checksum table*/ params: # pt_table_checksum:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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`, `city`, `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:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.00520777702331543 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # pt_table_checksum:10367 12873 Total avg rate: 37005 # WeightedAvgRate:8766 12873 Master op time: 600 n / 0.00520777702331543 s # WeightedAvgRate:8778 12873 Initial avg rate: 115212.306001923 n/s # WeightedAvgRate:8782 12873 Adjust n to 57606 # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='city' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`country` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `country_id`, `country`, `last_update` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`country_id`) # TableParser:4616 12873 PRIMARY key cols: `country_id` # TableParser:4638 12873 This key is the clustered key # SchemaIterator:7481 12873 Next schema object: sakila country # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `country_id`, `country`, UNIX_TIMESTAMP(`last_update`))) # RowChecksum:5890 12873 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `country_id`, `country`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `sakila`.`country` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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`, `country`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`country` /*checksum table*/ # NibbleIterator:6228 12873 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `country_id`, `country`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`country` /*explain checksum table*/ # OobNibbleIterator:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `sakila`.`country` # TableParser:4557 12873 SHOW TABLES FROM `sakila` LIKE 'country' # TableParser:4572 12873 Table sakila country exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`country` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `country_id`, `country`, `last_update` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`country_id`) # TableParser:4616 12873 PRIMARY key cols: `country_id` # TableParser:4638 12873 This key is the clustered key # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `sakila`.`country` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 109 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `sakila` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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`, `country`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`country` /*checksum table*/ params: # pt_table_checksum:11401 12873 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `country_id`, `country`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`country` /*explain checksum table*/ params: # pt_table_checksum:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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`, `country`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`country` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.00339794158935547 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # pt_table_checksum:10367 12873 Total avg rate: 36839 # WeightedAvgRate:8766 12873 Master op time: 109 n / 0.00339794158935547 s # WeightedAvgRate:8778 12873 Initial avg rate: 32078.244176256 n/s # WeightedAvgRate:8782 12873 Adjust n to 16039 # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='country' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`customer` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `customer_id`, `store_id`, `first_name`, `last_name`, `email`, `address_id`, `active`, `create_date`, `last_update` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`customer_id`), # TableParser:4616 12873 PRIMARY key cols: `customer_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: KEY `idx_fk_store_id` (`store_id`), # TableParser:4616 12873 idx_fk_store_id key cols: `store_id` # TableParser:4596 12873 Parsed key: KEY `idx_fk_address_id` (`address_id`), # TableParser:4616 12873 idx_fk_address_id key cols: `address_id` # TableParser:4596 12873 Parsed key: KEY `idx_last_name` (`last_name`), # TableParser:4616 12873 idx_last_name key cols: `last_name` # SchemaIterator:7481 12873 Next schema object: sakila customer # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `customer_id`, `store_id`, `first_name`, `last_name`, `email`, `address_id`, `active`, `create_date`, UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`email`)))) # RowChecksum:5890 12873 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `customer_id`, `store_id`, `first_name`, `last_name`, `email`, `address_id`, `active`, `create_date`, UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`email`)))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `sakila`.`customer` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY, idx_fk_address_id, idx_fk_store_id, idx_last_name # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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`, `first_name`, `last_name`, `email`, `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:6228 12873 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `customer_id`, `store_id`, `first_name`, `last_name`, `email`, `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:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `sakila`.`customer` # TableParser:4557 12873 SHOW TABLES FROM `sakila` LIKE 'customer' # TableParser:4572 12873 Table sakila customer exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`customer` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `customer_id`, `store_id`, `first_name`, `last_name`, `email`, `address_id`, `active`, `create_date`, `last_update` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`customer_id`), # TableParser:4616 12873 PRIMARY key cols: `customer_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: KEY `idx_fk_store_id` (`store_id`), # TableParser:4616 12873 idx_fk_store_id key cols: `store_id` # TableParser:4596 12873 Parsed key: KEY `idx_fk_address_id` (`address_id`), # TableParser:4616 12873 idx_fk_address_id key cols: `address_id` # TableParser:4596 12873 Parsed key: KEY `idx_last_name` (`last_name`), # TableParser:4616 12873 idx_last_name key cols: `last_name` # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `sakila`.`customer` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 599 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `sakila` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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`, `first_name`, `last_name`, `email`, `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:11401 12873 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `customer_id`, `store_id`, `first_name`, `last_name`, `email`, `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:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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`, `first_name`, `last_name`, `email`, `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:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.00508689880371094 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # pt_table_checksum:10367 12873 Total avg rate: 40737 # WeightedAvgRate:8766 12873 Master op time: 599 n / 0.00508689880371094 s # WeightedAvgRate:8778 12873 Initial avg rate: 117753.472815898 n/s # WeightedAvgRate:8782 12873 Adjust n to 58876 # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='customer' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`film` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 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:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`film_id`), # TableParser:4616 12873 PRIMARY key cols: `film_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: KEY `idx_title` (`title`), # TableParser:4616 12873 idx_title key cols: `title` # TableParser:4596 12873 Parsed key: KEY `idx_fk_language_id` (`language_id`), # TableParser:4616 12873 idx_fk_language_id key cols: `language_id` # TableParser:4596 12873 Parsed key: KEY `idx_fk_original_language_id` (`original_language_id`), # TableParser:4616 12873 idx_fk_original_language_id key cols: `original_language_id` # SchemaIterator:7481 12873 Next schema object: sakila film # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `film_id`, `title`, CRC32(`description`), `release_year`, `language_id`, `original_language_id`, `rental_duration`, `rental_rate`, `length`, `replacement_cost`, `rating`, `special_features`, UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`description`), ISNULL(`release_year`), ISNULL(`original_language_id`), ISNULL(`length`), ISNULL(`rating`), ISNULL(`special_features`)))) # RowChecksum:5890 12873 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `film_id`, `title`, CRC32(`description`), `release_year`, `language_id`, `original_language_id`, `rental_duration`, `rental_rate`, `length`, `replacement_cost`, `rating`, `special_features`, 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:6700 12873 EXPLAIN SELECT * FROM `sakila`.`film` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY, idx_fk_language_id, idx_title, idx_fk_original_language_id # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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`, `title`, CRC32(`description`), `release_year`, `language_id`, `original_language_id`, `rental_duration`, `rental_rate`, `length`, `replacement_cost`, `rating`, `special_features`, 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:6228 12873 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `film_id`, `title`, CRC32(`description`), `release_year`, `language_id`, `original_language_id`, `rental_duration`, `rental_rate`, `length`, `replacement_cost`, `rating`, `special_features`, 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:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `sakila`.`film` # TableParser:4557 12873 SHOW TABLES FROM `sakila` LIKE 'film' # TableParser:4572 12873 Table sakila film exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`film` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 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:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`film_id`), # TableParser:4616 12873 PRIMARY key cols: `film_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: KEY `idx_title` (`title`), # TableParser:4616 12873 idx_title key cols: `title` # TableParser:4596 12873 Parsed key: KEY `idx_fk_language_id` (`language_id`), # TableParser:4616 12873 idx_fk_language_id key cols: `language_id` # TableParser:4596 12873 Parsed key: KEY `idx_fk_original_language_id` (`original_language_id`), # TableParser:4616 12873 idx_fk_original_language_id key cols: `original_language_id` # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `sakila`.`film` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 1000 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `sakila` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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`, `title`, CRC32(`description`), `release_year`, `language_id`, `original_language_id`, `rental_duration`, `rental_rate`, `length`, `replacement_cost`, `rating`, `special_features`, 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:11401 12873 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `film_id`, `title`, CRC32(`description`), `release_year`, `language_id`, `original_language_id`, `rental_duration`, `rental_rate`, `length`, `replacement_cost`, `rating`, `special_features`, 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:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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`, `title`, CRC32(`description`), `release_year`, `language_id`, `original_language_id`, `rental_duration`, `rental_rate`, `length`, `replacement_cost`, `rating`, `special_features`, 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:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.0105710029602051 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # pt_table_checksum:10367 12873 Total avg rate: 45639 # WeightedAvgRate:8766 12873 Master op time: 1000 n / 0.0105710029602051 s # WeightedAvgRate:8778 12873 Initial avg rate: 94598.4031756056 n/s # WeightedAvgRate:8782 12873 Adjust n to 47299 # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='film' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`film_actor` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `actor_id`, `film_id`, `last_update` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`actor_id`,`film_id`), # TableParser:4616 12873 PRIMARY key cols: `actor_id`, `film_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: KEY `idx_fk_film_id` (`film_id`), # TableParser:4616 12873 idx_fk_film_id key cols: `film_id` # SchemaIterator:7481 12873 Next schema object: sakila film_actor # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `actor_id`, `film_id`, UNIX_TIMESTAMP(`last_update`))) # RowChecksum:5890 12873 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:6700 12873 EXPLAIN SELECT * FROM `sakila`.`film_actor` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY, idx_fk_film_id # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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:6228 12873 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:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `sakila`.`film_actor` # TableParser:4557 12873 SHOW TABLES FROM `sakila` LIKE 'film\_actor' # TableParser:4572 12873 Table sakila film_actor exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`film_actor` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `actor_id`, `film_id`, `last_update` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`actor_id`,`film_id`), # TableParser:4616 12873 PRIMARY key cols: `actor_id`, `film_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: KEY `idx_fk_film_id` (`film_id`), # TableParser:4616 12873 idx_fk_film_id key cols: `film_id` # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `sakila`.`film_actor` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 5437 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `sakila` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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:11401 12873 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:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.0130770206451416 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # pt_table_checksum:10367 12873 Total avg rate: 83249 # WeightedAvgRate:8766 12873 Master op time: 5457 n / 0.0130770206451416 s # WeightedAvgRate:8778 12873 Initial avg rate: 417296.886506591 n/s # WeightedAvgRate:8782 12873 Adjust n to 208648 # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='film_actor' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 1 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`film_category` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `film_id`, `category_id`, `last_update` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`film_id`,`category_id`), # TableParser:4616 12873 PRIMARY key cols: `film_id`, `category_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: KEY `fk_film_category_category` (`category_id`), # TableParser:4616 12873 fk_film_category_category key cols: `category_id` # SchemaIterator:7481 12873 Next schema object: sakila film_category # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `film_id`, `category_id`, UNIX_TIMESTAMP(`last_update`))) # RowChecksum:5890 12873 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:6700 12873 EXPLAIN SELECT * FROM `sakila`.`film_category` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY, fk_film_category_category # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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:6228 12873 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:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `sakila`.`film_category` # TableParser:4557 12873 SHOW TABLES FROM `sakila` LIKE 'film\_category' # TableParser:4572 12873 Table sakila film_category exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`film_category` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `film_id`, `category_id`, `last_update` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`film_id`,`category_id`), # TableParser:4616 12873 PRIMARY key cols: `film_id`, `category_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: KEY `fk_film_category_category` (`category_id`), # TableParser:4616 12873 fk_film_category_category key cols: `category_id` # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `sakila`.`film_category` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 1000 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `sakila` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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:11401 12873 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:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.0377359390258789 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # pt_table_checksum:10367 12873 Total avg rate: 70423 # WeightedAvgRate:8766 12873 Master op time: 1000 n / 0.0377359390258789 s # WeightedAvgRate:8778 12873 Initial avg rate: 26499.9368192272 n/s # WeightedAvgRate:8782 12873 Adjust n to 13249 # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='film_category' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`film_text` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `film_id`, `title`, `description` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`film_id`), # TableParser:4616 12873 PRIMARY key cols: `film_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: FULLTEXT KEY `idx_title_description` (`title`,`description`) # TableParser:4616 12873 idx_title_description key cols: `title`, `description` # SchemaIterator:7481 12873 Next schema object: sakila film_text # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `film_id`, `title`, CRC32(`description`), CONCAT(ISNULL(`description`)))) # RowChecksum:5890 12873 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `film_id`, `title`, CRC32(`description`), CONCAT(ISNULL(`description`)))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `sakila`.`film_text` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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`, `title`, CRC32(`description`), CONCAT(ISNULL(`description`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`film_text` /*checksum table*/ # NibbleIterator:6228 12873 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `film_id`, `title`, CRC32(`description`), CONCAT(ISNULL(`description`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`film_text` /*explain checksum table*/ # OobNibbleIterator:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `sakila`.`film_text` # TableParser:4557 12873 SHOW TABLES FROM `sakila` LIKE 'film\_text' # TableParser:4572 12873 Table sakila film_text exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`film_text` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `film_id`, `title`, `description` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`film_id`), # TableParser:4616 12873 PRIMARY key cols: `film_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: FULLTEXT KEY `idx_title_description` (`title`,`description`) # TableParser:4616 12873 idx_title_description key cols: `title`, `description` # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `sakila`.`film_text` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 1000 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `sakila` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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`, `title`, CRC32(`description`), CONCAT(ISNULL(`description`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`film_text` /*checksum table*/ params: # pt_table_checksum:11401 12873 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `film_id`, `title`, CRC32(`description`), CONCAT(ISNULL(`description`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`film_text` /*explain checksum table*/ params: # pt_table_checksum:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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`, `title`, 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:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.00713896751403809 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # pt_table_checksum:10367 12873 Total avg rate: 73279 # WeightedAvgRate:8766 12873 Master op time: 1000 n / 0.00713896751403809 s # WeightedAvgRate:8778 12873 Initial avg rate: 140076.278262031 n/s # WeightedAvgRate:8782 12873 Adjust n to 70038 # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='film_text' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`inventory` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `inventory_id`, `film_id`, `store_id`, `last_update` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`inventory_id`), # TableParser:4616 12873 PRIMARY key cols: `inventory_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: KEY `idx_fk_film_id` (`film_id`), # TableParser:4616 12873 idx_fk_film_id key cols: `film_id` # TableParser:4596 12873 Parsed key: KEY `idx_store_id_film_id` (`store_id`,`film_id`), # TableParser:4616 12873 idx_store_id_film_id key cols: `store_id`, `film_id` # SchemaIterator:7481 12873 Next schema object: sakila inventory # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `inventory_id`, `film_id`, `store_id`, UNIX_TIMESTAMP(`last_update`))) # RowChecksum:5890 12873 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:6700 12873 EXPLAIN SELECT * FROM `sakila`.`inventory` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY, idx_fk_film_id, idx_store_id_film_id # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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:6228 12873 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:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `sakila`.`inventory` # TableParser:4557 12873 SHOW TABLES FROM `sakila` LIKE 'inventory' # TableParser:4572 12873 Table sakila inventory exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`inventory` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `inventory_id`, `film_id`, `store_id`, `last_update` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`inventory_id`), # TableParser:4616 12873 PRIMARY key cols: `inventory_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: KEY `idx_fk_film_id` (`film_id`), # TableParser:4616 12873 idx_fk_film_id key cols: `film_id` # TableParser:4596 12873 Parsed key: KEY `idx_store_id_film_id` (`store_id`,`film_id`), # TableParser:4616 12873 idx_store_id_film_id key cols: `store_id`, `film_id` # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `sakila`.`inventory` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 4581 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `sakila` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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:11401 12873 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:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.0491650104522705 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # pt_table_checksum:10367 12873 Total avg rate: 77660 # WeightedAvgRate:8766 12873 Master op time: 4581 n / 0.0491650104522705 s # WeightedAvgRate:8778 12873 Initial avg rate: 93176.0200569314 n/s # WeightedAvgRate:8782 12873 Adjust n to 46588 # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='inventory' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`language` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `language_id`, `name`, `last_update` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`language_id`) # TableParser:4616 12873 PRIMARY key cols: `language_id` # TableParser:4638 12873 This key is the clustered key # SchemaIterator:7481 12873 Next schema object: sakila language # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `language_id`, `name`, UNIX_TIMESTAMP(`last_update`))) # RowChecksum:5890 12873 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `language_id`, `name`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `sakila`.`language` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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`, `name`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`language` /*checksum table*/ # NibbleIterator:6228 12873 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `language_id`, `name`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`language` /*explain checksum table*/ # OobNibbleIterator:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `sakila`.`language` # TableParser:4557 12873 SHOW TABLES FROM `sakila` LIKE 'language' # TableParser:4572 12873 Table sakila language exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`language` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `language_id`, `name`, `last_update` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`language_id`) # TableParser:4616 12873 PRIMARY key cols: `language_id` # TableParser:4638 12873 This key is the clustered key # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `sakila`.`language` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 6 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `sakila` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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`, `name`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`language` /*checksum table*/ params: # pt_table_checksum:11401 12873 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `language_id`, `name`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`language` /*explain checksum table*/ params: # pt_table_checksum:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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`, `name`, UNIX_TIMESTAMP(`last_update`))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`language` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.0034630298614502 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # pt_table_checksum:10367 12873 Total avg rate: 76501 # WeightedAvgRate:8766 12873 Master op time: 6 n / 0.0034630298614502 s # WeightedAvgRate:8778 12873 Initial avg rate: 1732.58685025818 n/s # WeightedAvgRate:8782 12873 Adjust n to 866 # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='language' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`payment` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `payment_id`, `customer_id`, `staff_id`, `rental_id`, `amount`, `payment_date`, `last_update` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`payment_id`), # TableParser:4616 12873 PRIMARY key cols: `payment_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: KEY `idx_fk_staff_id` (`staff_id`), # TableParser:4616 12873 idx_fk_staff_id key cols: `staff_id` # TableParser:4596 12873 Parsed key: KEY `idx_fk_customer_id` (`customer_id`), # TableParser:4616 12873 idx_fk_customer_id key cols: `customer_id` # TableParser:4596 12873 Parsed key: KEY `fk_payment_rental` (`rental_id`), # TableParser:4616 12873 fk_payment_rental key cols: `rental_id` # SchemaIterator:7481 12873 Next schema object: sakila payment # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 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:5890 12873 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:6700 12873 EXPLAIN SELECT * FROM `sakila`.`payment` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY, idx_fk_customer_id, idx_fk_staff_id, fk_payment_rental # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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:6228 12873 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:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `sakila`.`payment` # TableParser:4557 12873 SHOW TABLES FROM `sakila` LIKE 'payment' # TableParser:4572 12873 Table sakila payment exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`payment` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `payment_id`, `customer_id`, `staff_id`, `rental_id`, `amount`, `payment_date`, `last_update` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`payment_id`), # TableParser:4616 12873 PRIMARY key cols: `payment_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: KEY `idx_fk_staff_id` (`staff_id`), # TableParser:4616 12873 idx_fk_staff_id key cols: `staff_id` # TableParser:4596 12873 Parsed key: KEY `idx_fk_customer_id` (`customer_id`), # TableParser:4616 12873 idx_fk_customer_id key cols: `customer_id` # TableParser:4596 12873 Parsed key: KEY `fk_payment_rental` (`rental_id`), # TableParser:4616 12873 fk_payment_rental key cols: `rental_id` # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `sakila`.`payment` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 16086 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `sakila` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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:11401 12873 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:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.0566408634185791 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # pt_table_checksum:10367 12873 Total avg rate: 117846 # WeightedAvgRate:8766 12873 Master op time: 16049 n / 0.0566408634185791 s # WeightedAvgRate:8778 12873 Initial avg rate: 283346.669371846 n/s # WeightedAvgRate:8782 12873 Adjust n to 141673 # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='payment' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: undef # pt_table_checksum:11569 12873 Sleep 0.25 waiting for chunks # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`ple` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `id`, `name` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`id`) # TableParser:4616 12873 PRIMARY key cols: `id` # TableParser:4638 12873 This key is the clustered key # SchemaIterator:7481 12873 Next schema object: sakila ple # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `id`, `name`, CONCAT(ISNULL(`name`)))) # RowChecksum:5890 12873 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `id`, `name`, CONCAT(ISNULL(`name`)))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `sakila`.`ple` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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`, `name`, CONCAT(ISNULL(`name`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`ple` /*checksum table*/ # NibbleIterator:6228 12873 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `id`, `name`, CONCAT(ISNULL(`name`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`ple` /*explain checksum table*/ # OobNibbleIterator:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `sakila`.`ple` # TableParser:4557 12873 SHOW TABLES FROM `sakila` LIKE 'ple' # TableParser:4572 12873 Table sakila ple exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`ple` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `id`, `name` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`id`) # TableParser:4616 12873 PRIMARY key cols: `id` # TableParser:4638 12873 This key is the clustered key # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `sakila`.`ple` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 1 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `sakila` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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`, `name`, CONCAT(ISNULL(`name`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`ple` /*checksum table*/ params: # pt_table_checksum:11401 12873 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `id`, `name`, CONCAT(ISNULL(`name`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`ple` /*explain checksum table*/ params: # pt_table_checksum:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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`, `name`, CONCAT(ISNULL(`name`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`ple` /*checksum table*/ lower boundary: upper boundary: # pt_table_checksum:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.00453495979309082 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='ple' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`rental` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `rental_id`, `rental_date`, `inventory_id`, `customer_id`, `return_date`, `staff_id`, `last_update` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`rental_id`), # TableParser:4616 12873 PRIMARY key cols: `rental_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: UNIQUE KEY `rental_date` (`rental_date`,`inventory_id`,`customer_id`), # TableParser:4616 12873 rental_date key cols: `rental_date`, `inventory_id`, `customer_id` # TableParser:4596 12873 Parsed key: KEY `idx_fk_inventory_id` (`inventory_id`), # TableParser:4616 12873 idx_fk_inventory_id key cols: `inventory_id` # TableParser:4596 12873 Parsed key: KEY `idx_fk_customer_id` (`customer_id`), # TableParser:4616 12873 idx_fk_customer_id key cols: `customer_id` # TableParser:4596 12873 Parsed key: KEY `idx_fk_staff_id` (`staff_id`), # TableParser:4616 12873 idx_fk_staff_id key cols: `staff_id` # SchemaIterator:7481 12873 Next schema object: sakila rental # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 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:5890 12873 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:6700 12873 EXPLAIN SELECT * FROM `sakila`.`rental` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY, rental_date, idx_fk_customer_id, idx_fk_inventory_id, idx_fk_staff_id # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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:6228 12873 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:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `sakila`.`rental` # TableParser:4557 12873 SHOW TABLES FROM `sakila` LIKE 'rental' # TableParser:4572 12873 Table sakila rental exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`rental` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `rental_id`, `rental_date`, `inventory_id`, `customer_id`, `return_date`, `staff_id`, `last_update` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`rental_id`), # TableParser:4616 12873 PRIMARY key cols: `rental_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: UNIQUE KEY `rental_date` (`rental_date`,`inventory_id`,`customer_id`), # TableParser:4616 12873 rental_date key cols: `rental_date`, `inventory_id`, `customer_id` # TableParser:4596 12873 Parsed key: KEY `idx_fk_inventory_id` (`inventory_id`), # TableParser:4616 12873 idx_fk_inventory_id key cols: `inventory_id` # TableParser:4596 12873 Parsed key: KEY `idx_fk_customer_id` (`customer_id`), # TableParser:4616 12873 idx_fk_customer_id key cols: `customer_id` # TableParser:4596 12873 Parsed key: KEY `idx_fk_staff_id` (`staff_id`), # TableParser:4616 12873 idx_fk_staff_id key cols: `staff_id` # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `sakila`.`rental` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 16005 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `sakila` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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:11401 12873 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:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.159714937210083 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # pt_table_checksum:10367 12873 Total avg rate: 111576 # WeightedAvgRate:8766 12873 Master op time: 16044 n / 0.159714937210083 s # WeightedAvgRate:8778 12873 Initial avg rate: 100453.973061369 n/s # WeightedAvgRate:8782 12873 Adjust n to 50226 # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='rental' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: undef # pt_table_checksum:11569 12873 Sleep 0.25 waiting for chunks # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`staff` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `staff_id`, `first_name`, `last_name`, `address_id`, `picture`, `email`, `store_id`, `active`, `username`, `password`, `last_update` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`staff_id`), # TableParser:4616 12873 PRIMARY key cols: `staff_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: KEY `idx_fk_store_id` (`store_id`), # TableParser:4616 12873 idx_fk_store_id key cols: `store_id` # TableParser:4596 12873 Parsed key: KEY `idx_fk_address_id` (`address_id`), # TableParser:4616 12873 idx_fk_address_id key cols: `address_id` # SchemaIterator:7481 12873 Next schema object: sakila staff # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `staff_id`, `first_name`, `last_name`, `address_id`, CRC32(`picture`), `email`, `store_id`, `active`, `username`, `password`, UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`picture`), ISNULL(`email`), ISNULL(`password`)))) # RowChecksum:5890 12873 Chunk checksum: COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `staff_id`, `first_name`, `last_name`, `address_id`, CRC32(`picture`), `email`, `store_id`, `active`, `username`, `password`, UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`picture`), ISNULL(`email`), ISNULL(`password`)))) AS UNSIGNED)), 10, 16)), 0) AS crc # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `sakila`.`staff` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY, idx_fk_address_id, idx_fk_store_id # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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`, `first_name`, `last_name`, `address_id`, CRC32(`picture`), `email`, `store_id`, `active`, `username`, `password`, UNIX_TIMESTAMP(`last_update`), CONCAT(ISNULL(`picture`), ISNULL(`email`), ISNULL(`password`)))) AS UNSIGNED)), 10, 16)), 0) AS crc FROM `sakila`.`staff` /*checksum table*/ # NibbleIterator:6228 12873 Explain one nibble statement: EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `staff_id`, `first_name`, `last_name`, `address_id`, CRC32(`picture`), `email`, `store_id`, `active`, `username`, `password`, 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:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `sakila`.`staff` # TableParser:4557 12873 SHOW TABLES FROM `sakila` LIKE 'staff' # TableParser:4572 12873 Table sakila staff exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`staff` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `staff_id`, `first_name`, `last_name`, `address_id`, `picture`, `email`, `store_id`, `active`, `username`, `password`, `last_update` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`staff_id`), # TableParser:4616 12873 PRIMARY key cols: `staff_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: KEY `idx_fk_store_id` (`store_id`), # TableParser:4616 12873 idx_fk_store_id key cols: `store_id` # TableParser:4596 12873 Parsed key: KEY `idx_fk_address_id` (`address_id`), # TableParser:4616 12873 idx_fk_address_id key cols: `address_id` # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `sakila`.`staff` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 2 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `sakila` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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`, `first_name`, `last_name`, `address_id`, CRC32(`picture`), `email`, `store_id`, `active`, `username`, `password`, 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:11401 12873 EXPLAIN SELECT COUNT(*) AS cnt, COALESCE(LOWER(CONV(BIT_XOR(CAST(CRC32(CONCAT_WS('#', `staff_id`, `first_name`, `last_name`, `address_id`, CRC32(`picture`), `email`, `store_id`, `active`, `username`, `password`, 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:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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`, `first_name`, `last_name`, `address_id`, CRC32(`picture`), `email`, `store_id`, `active`, `username`, `password`, 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:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.00394201278686523 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # pt_table_checksum:10367 12873 Total avg rate: 110597 # WeightedAvgRate:8766 12873 Master op time: 2 n / 0.00394201278686523 s # WeightedAvgRate:8778 12873 Initial avg rate: 507.355026007016 n/s # WeightedAvgRate:8782 12873 Adjust n to 253 # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='staff' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fd47a8) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`store` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `store_id`, `manager_staff_id`, `address_id`, `last_update` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`store_id`), # TableParser:4616 12873 PRIMARY key cols: `store_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: UNIQUE KEY `idx_unique_manager` (`manager_staff_id`), # TableParser:4616 12873 idx_unique_manager key cols: `manager_staff_id` # TableParser:4596 12873 Parsed key: KEY `idx_fk_address_id` (`address_id`), # TableParser:4616 12873 idx_fk_address_id key cols: `address_id` # SchemaIterator:7481 12873 Next schema object: sakila store # RowChecksum:5869 12873 Checksum strat: $VAR1 = { # crc_type => 'int', # crc_width => 16, # func => 'CRC32', # opt_slice => undef # }; # # RowChecksum:5851 12873 Row checksum: CRC32(CONCAT_WS('#', `store_id`, `manager_staff_id`, `address_id`, UNIX_TIMESTAMP(`last_update`))) # RowChecksum:5890 12873 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:6700 12873 EXPLAIN SELECT * FROM `sakila`.`store` WHERE 1=1 # NibbleIterator:6702 12873 $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:6570 12873 One nibble: yes # NibbleIterator:6632 12873 Auto-selecting best index # TableParser:4492 12873 Indexes sorted best-first: PRIMARY, idx_unique_manager, idx_fk_address_id # NibbleIterator:6665 12873 Best index: PRIMARY # NibbleIterator:6218 12873 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:6228 12873 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:7012 12873 Preparing out-of-bound statement handles # NibbleIterator:6712 12873 Preparing statement handles # TableParser:4551 12873 Checking `sakila`.`store` # TableParser:4557 12873 SHOW TABLES FROM `sakila` LIKE 'store' # TableParser:4572 12873 Table sakila store exists # TableParser:4377 12873 /*!40101 SET @OLD_SQL_MODE := @@SQL_MODE, @@SQL_MODE := '', @OLD_QUOTE := @@SQL_QUOTE_SHOW_CREATE, @@SQL_QUOTE_SHOW_CREATE := 1 */ # TableParser:4382 12873 DBI::db=HASH(0x1fe0180) USE `sakila` # TableParser:4386 12873 SHOW CREATE TABLE `sakila`.`store` # TableParser:4396 12873 /*!40101 SET @@SQL_MODE := @OLD_SQL_MODE, @@SQL_QUOTE_SHOW_CREATE := @OLD_QUOTE */ # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4428 12873 Table cols: `store_id`, `manager_staff_id`, `address_id`, `last_update` # TableParser:4580 12873 Storage engine: InnoDB # TableParser:4596 12873 Parsed key: PRIMARY KEY (`store_id`), # TableParser:4616 12873 PRIMARY key cols: `store_id` # TableParser:4638 12873 This key is the clustered key # TableParser:4596 12873 Parsed key: UNIQUE KEY `idx_unique_manager` (`manager_staff_id`), # TableParser:4616 12873 idx_unique_manager key cols: `manager_staff_id` # TableParser:4596 12873 Parsed key: KEY `idx_fk_address_id` (`address_id`), # TableParser:4616 12873 idx_fk_address_id key cols: `address_id` # pt_table_checksum:10086 12873 Getting table row estimate on slave # NibbleIterator:6700 12873 EXPLAIN SELECT * FROM `sakila`.`store` WHERE 1=1 # NibbleIterator:6702 12873 $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:10122 12873 Table on slave has 2 rows # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `percona` # pt_table_checksum:10188 12873 DELETE FROM `percona`.`checksums` WHERE db = ? AND tbl = ? # pt_table_checksum:11315 12873 use_repl_db # pt_table_checksum:11336 12873 USE `sakila` # NibbleIterator:6386 12873 init callback returned 1 # NibbleIterator:6422 12873 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:11401 12873 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:11411 12873 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:4065 12873 Serializing $VAR1 = []; # # Quoter:4065 12873 Serializing $VAR1 = []; # # Retry:7861 12873 Try 1 of 2 # pt_table_checksum:10781 12873 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:10802 12873 SHOW WARNINGS # pt_table_checksum:10808 12873 Ignoring warning: 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. REPLACE... SELECT is unsafe because the order in which rows are retrieved by the SELECT determines which (if any) rows are replaced. This order cannot be predicted and may differ on master and the slave. # Retry:7878 12873 Try code succeeded # pt_table_checksum:10303 12873 Nibble time: 0.00331616401672363 # NibbleIterator:6430 12873 0 rows in nibble 1 # NibbleIterator:6442 12873 No rows in nibble or nibble skipped # pt_table_checksum:10367 12873 Total avg rate: 109787 # WeightedAvgRate:8766 12873 Master op time: 2 n / 0.00331616401672363 s # WeightedAvgRate:8778 12873 Initial avg rate: 603.106477820116 n/s # WeightedAvgRate:8782 12873 Adjust n to 301 # ReplicaLagWaiter:8477 12873 Checking slave lag # MasterSlave:5362 12873 DBI::db=HASH(0x1fe0180) SHOW SLAVE STATUS # ReplicaLagWaiter:8480 12873 slave slave lag: 0 # ReplicaLagWaiter:8513 12873 All slaves caught up # MySQLStatusWaiter:8655 12873 Checking status variables # pt_table_checksum:9872 12873 SHOW GLOBAL STATUS LIKE ? Threads_running # MySQLStatusWaiter:8658 12873 Threads_running = 2 # MySQLStatusWaiter:8685 12873 All var vals are low enough # OobNibbleIterator:7053 12873 Done nibbling past boundaries # NibbleIterator:6451 12873 Done nibbling # pt_table_checksum:10426 12873 Checking slave diffs # pt_table_checksum:11495 12873 SELECT MAX(chunk) FROM `percona`.`checksums` WHERE db='sakila' AND tbl='store' AND master_crc IS NOT NULL # pt_table_checksum:11513 12873 Getting last checksum on slave # pt_table_checksum:11516 12873 slave max chunk: 1 # RowChecksum:6134 12873 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:10458 12873 0 checksum diffs on slave # OobNibbleIterator:7061 12873 Finish nibble_sth # OobNibbleIterator:7061 12873 Finish explain_nibble_sth # SchemaIterator:7558 12873 Getting next schema object from dbh DBI::db=HASH(0x1fd47a8) # SchemaIterator:7629 12873 No more tables in database sakila # SchemaIterator:7575 12873 Next database: sys # SchemaIterator:7581 12873 SHOW /*!50002 FULL*/ TABLES FROM `sys` # SchemaIterator:7599 12873 Found 0 tables in database sys # SchemaIterator:7629 12873 No more tables in database sys # SchemaIterator:7634 12873 No more databases # pt_table_checksum:10653 12873 Exit status 16 oktorun 1 have time 1 # Cxn:3748 12873 Destroying cxn # Cxn:3757 12873 DBI::db=HASH(0x1fe0180) Disconnecting dbh on slave h=192.168.70.2 # Cxn:3748 12873 Destroying cxn # Cxn:3757 12873 DBI::db=HASH(0x1fd47a8) Disconnecting dbh on master h=localhost TS ERRORS DIFFS ROWS CHUNKS SKIPPED TIME TABLE 09-21T12:46:31 0 0 0 1 0 0.088 mysql.columns_priv 09-21T12:46:31 0 0 4 1 0 0.043 mysql.db 09-21T12:46:31 0 0 2 1 0 0.115 mysql.engine_cost 09-21T12:46:31 0 0 0 1 0 0.108 mysql.event 09-21T12:46:31 0 0 0 1 0 0.043 mysql.func 09-21T12:46:32 0 0 0 1 0 0.042 mysql.gtid_executed 09-21T12:46:32 0 0 40 1 0 0.041 mysql.help_category 09-21T12:46:32 0 0 485 1 0 0.039 mysql.help_keyword 09-21T12:46:32 0 0 1090 1 0 0.041 mysql.help_relation 09-21T12:46:32 0 0 533 1 0 0.029 mysql.help_topic 09-21T12:46:32 0 0 0 1 0 0.027 mysql.ndb_binlog_index 09-21T12:46:32 0 0 0 1 0 0.043 mysql.procs_priv 09-21T12:46:32 0 0 1 1 0 0.040 mysql.proxies_priv 09-21T12:46:32 0 0 6 1 0 0.042 mysql.server_cost 09-21T12:46:32 0 0 0 1 0 0.041 mysql.servers 09-21T12:46:32 0 0 1 1 0 0.043 mysql.tables_priv 09-21T12:46:32 0 0 0 1 0 0.027 mysql.time_zone 09-21T12:46:32 0 0 0 1 0 0.059 mysql.time_zone_leap_second 09-21T12:46:32 0 0 0 1 0 0.103 mysql.time_zone_name 09-21T12:46:32 0 0 0 1 0 0.083 mysql.time_zone_transition 09-21T12:46:32 0 0 0 1 0 0.083 mysql.time_zone_transition_type 09-21T12:46:32 0 0 12 1 0 0.029 mysql.user 09-21T12:46:32 0 0 200 1 0 0.071 sakila.actor 09-21T12:46:33 0 0 603 1 0 0.074 sakila.address 09-21T12:46:33 0 0 16 1 0 0.104 sakila.category 09-21T12:46:33 0 0 600 1 0 0.041 sakila.city 09-21T12:46:33 0 0 109 1 0 0.045 sakila.country 09-21T12:46:33 0 0 599 1 0 0.029 sakila.customer 09-21T12:46:33 0 0 1000 1 0 0.054 sakila.film 09-21T12:46:33 0 1 5457 1 0 0.061 sakila.film_actor 09-21T12:46:33 0 0 1000 1 0 0.186 sakila.film_category 09-21T12:46:33 0 0 1000 1 0 0.046 sakila.film_text 09-21T12:46:33 0 0 4581 1 0 0.152 sakila.inventory 09-21T12:46:33 0 0 6 1 0 0.041 sakila.language 09-21T12:46:34 0 0 16049 1 0 0.394 sakila.payment 09-21T12:46:34 0 0 0 1 0 0.149 sakila.ple 09-21T12:46:34 0 0 16044 1 0 0.469 sakila.rental 09-21T12:46:34 0 0 2 1 0 0.043 sakila.staff 09-21T12:46:34 0 0 2 1 0 0.041 sakila.store