hugowan / maatkit

Automatically exported from code.google.com/p/maatkit
0 stars 0 forks source link

Enhance mk-table-checksum, add a --ignorecols option #94

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We have several tables with triggers that update a 'created_at' datetime
column and an 'updated_at' datetime column.  I would like to be able to
pass an ignorecols option with those two values because it's much easier to
do that than construct a commandline with (x-2) columns to check (For
example, in one table there are 38 columns counting the two auto updated
fields).  Even a regex of some sort could be useful for limiting columns,
though that's not what I in particular need.

Since replication can lag by whole seconds, the row checksum is different
unless you can ignore those columns.  This option would just make command
generation and scripting a lot easier.

mk-table-checksum  Ver 1.1.29 Distrib 2325 Changeset 2317

>What is your MySQL, Perl, DBI, and DBD::mysql version?
CentOS52[root@db02 ~]# rpm -q mysql perl
mysql-5.0.54-1.el4.centos
perl-5.8.8-10iv.2.1 (redhat latest release plus 4 patches to fix the bless
problem)
DBI-1.58.tar.gz
DBD-mysql-4.005.tar.gz

>What is your operating system/distribution?
CentOS 5.2

Thanks for a fantastic product!

Original issue reported on code.google.com by mrballcb on 6 Oct 2008 at 2:48

GoogleCodeExporter commented 9 years ago
It's a useful request.  However I suspect you could also do the checksums a 
different
way and avoid any issues with replication lagging: use --replicate and run the
checksums on the master.

Still I think this one is useful.

Original comment by baron.schwartz on 6 Oct 2008 at 3:14

GoogleCodeExporter commented 9 years ago
I'm working on this.

Original comment by dan...@percona.com on 7 Oct 2008 at 2:10

GoogleCodeExporter commented 9 years ago
This has been implemented as of r2404.

Original comment by dan...@percona.com on 7 Oct 2008 at 4:19