Variables

$checksum_table_data

my $checksum_table_data

$fetch_sth

my $fetch_sth

$update_sth

my $update_sth

$savesince_sth

my $savesince_sth

$crc_wid

my $crc_wid

$md5sum_fmt

my $md5sum_fmt

$already_checksummed

my $already_checksummed

%tables_to_checksum

my %tables_to_checksum

Functions

main

sub main

get_all_tbls_info

sub get_all_tbls_info

is_oversize_chunk

Determine if the chunk is oversize.

Parameters

%argsArguments

Required Arguments

  • dbh - dbh
  • db - db name, not quoted
  • tbl - tbl name, not quoted
  • chunk_size - chunk size in number of rows
  • chunk - chunk, e.g.  “`a` > 10”
  • limit - oversize if rows > factor * chunk_size
  • Quoter - Quoter object

Optional Arguments

  • where - Arrayref of WHERE clauses added to chunk
  • index_hint - FORCE INDEX clause

Returns

True if EXPLAIN rows is >= chunk_size * limit, else false

is_chunkable_table

Determine if the table is chunkable.

Parameters

%argsArguments

Required Arguments

  • dbh - dbh
  • db - db name, not quoted
  • tbl - tbl name, not quoted
  • chunk_size - chunk size in number of rows
  • Quoter - Quoter object

Optional Arguments

  • where - Arrayref of WHERE clauses added to chunk
  • index_hint - FORCE INDEX clause

Returns

True if EXPLAIN rows is <= chunk_size, else false

_explain

EXPLAIN a chunk or table.

Parameters

%argsArguments

Required Arguments

  • dbh - dbh
  • db - db name, not quoted
  • tbl - tbl name, not quoted
  • Quoter - Quoter object

Optional Arguments

  • where - Arrayref of WHERE clauses added to chunk
  • index_hint - FORCE INDEX clause

Returns

Hashref of first EXPLAIN row

my $checksum_table_data
my $fetch_sth
my $update_sth
my $savesince_sth
my $crc_wid
my $md5sum_fmt
my $already_checksummed
my %tables_to_checksum
sub main
sub get_all_tbls_info
Quoter handles value quoting, unquoting, escaping, etc.
Close