hugowan / maatkit

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

mk-table-checksum fails on SHOW CREATE TABLE #117

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I'm trying to use mk-table-checksum for the first time to check consistency
between our core database and a new slave.  I'm running this command:

mk-table-checksum --chunksize=100000 --replicate=cs_core.checksum localhost

mk-table-checksum get's through examining the schema of many of the tables,
but dies on our user table.  Our user table is a bit ridiculous, with 135
columns and ~30 keys.  I set  $dbh->{TraceLevel} = 2;
right before line 1563 in get_create_table right before the
selectrow_hashref, and got this error:

---> parse_params with statement SHOW CREATE TABLE `cs_core`.`user` num
params 0
mysql_st_internal_execute
Got packet bigger than 'max_allowed_packet' bytes error 2020 recorded: Got
packet bigger than 'max_allowed_packet' bytes
    <- dbd_st_execute returning imp_sth->row_num 18446744073709551615
    !! ERROR: 2020 'Got packet bigger than 'max_allowed_packet' bytes' (err#0)
    <- execute= -1 at DBI.pm line 1569

mk-table-checksum then goes on to report
DBD::mysql::db selectrow_hashref failed: fetch() without execute() at
/usr/bin/mk-table-checksum line 1564.

I can run the 'SHOW CREATE TABLE `cs_core`.`user`' manually with no
problem.  Why would the script be crapping out?  I've attached the full
output with MKDEBUG=1 and with $dbh->{TraceLevel} = 2;  You can skip to the
bottom of this file to see the error.

What information do you get from mk-<toolname>--version?
# mk-table-checksum --version
mk-table-checksum  Ver 1.2.0 Distrib 2442 Changeset 2436

What is your MySQL, Perl, DBI, and DBD::mysql version?
# mysql --version
mysql  Ver 14.12 Distrib 5.0.67, for redhat-linux-gnu (x86_64) using
readline 5.1

# perl --version
This is perl, v5.8.8 built for x86_64-linux-thread-multi

Name   : perl-DBI
Arch   : x86_64
Version: 1.52
Release: 1.fc6

ame   : perl-DBD-MySQL
Arch   : x86_64
Version: 3.0007
Release: 1.fc6

What is your operating system/distribution?
# cat /etc/issue
CentOS release 5 (Final)
# uname -r
2.6.18-53.1.21.el5
# uname -m
x86_64

If you think it'll be useful, please run the tool with MKDEBUG=1 and
capture the full output in a file, then attach the file.  For example,
MKDEBUG=1 mk-<toolname> [options] > debug.txt.  Is there anything in this
file that you think we should pay special attention to?  Please gzip the
file if it's large.  

File attached.  Skip to line 9498 to see the error(s).

Original issue reported on code.google.com by aco...@gmail.com on 28 Oct 2008 at 7:05

Attachments:

GoogleCodeExporter commented 9 years ago
Hi acotto,

with the attached patch (devs: see
http://code.google.com/p/maatkit/issues/detail?id=99#c1) you should be able to 
ignore
the user-table so you can at least sync the other ones.

Regards
Pascal

Original comment by m...@pascalhofmann.de on 30 Oct 2008 at 1:35

Attachments:

GoogleCodeExporter commented 9 years ago
s/sync/checksum/ :)

Original comment by m...@pascalhofmann.de on 30 Oct 2008 at 1:36

GoogleCodeExporter commented 9 years ago
acotto,

mk-table-checksum has recently undergone some work. Could you please download 
the
newest rev and tell me if this problem still happens? (I bet it still will, but 
it's
best to check.)
And what is max_allowed_packet set to on your server?
And if possible, could you provide the full SHOW CREATE TABLE cs_core.user (you 
could
email it to my Google Code username by changing the .n@ part to .nichter@)?

Thanks.

Original comment by dan...@percona.com on 12 Nov 2008 at 4:04

GoogleCodeExporter commented 9 years ago
Target these for release end of January 2009.

Original comment by baron.schwartz on 4 Jan 2009 at 5:04

GoogleCodeExporter commented 9 years ago
acotto, can you create a trivial Perl program that just connects and runs the
command, and see if it breaks?  Something like

perl -MDBI -MData::Dumper -e'$dbh=DBI->connect(....); print Dumper
$dbh->selectall_arrayref("show create table....")'

Original comment by baron.schwartz on 10 Jan 2009 at 9:22

GoogleCodeExporter commented 9 years ago
K, I ran this:

perl -MDBI -MData::Dumper -e'$dbh = DBI->connect(...); print Dumper; 
@result = $dbh->selectall_arrayref("show create table user"); print 
$result[0][0][1];'

And it finished just fine and printed out the user table schema.

Original comment by aco...@gmail.com on 10 Jan 2009 at 10:14

GoogleCodeExporter commented 9 years ago
Is this still an issue?  I'm at a loss for how to reproduce that kind of dbi 
error.

Original comment by dan...@percona.com on 5 Jun 2009 at 2:51

GoogleCodeExporter commented 9 years ago

Original comment by dan...@percona.com on 11 Jun 2009 at 8:43

GoogleCodeExporter commented 9 years ago
I'm going to close this issue for now since there hasn't been an 
update/response in
quite awhile.  Please respond and help me reproduce this error if this is still 
an issue.

Original comment by dan...@percona.com on 8 Jul 2009 at 9:44

GoogleCodeExporter commented 9 years ago
Sorry for not replying in so long, I hadn't had a chance to try this again.  
Another sysadmin on my team ran a 
checksum on just our user table, and had no problems.  The problem might have 
fixed itself, or it might have 
something to do with our database + user table + maatkit.  We have not upgraded 
maatkit since I first submitted 
that bug, so I cannot confirm if any changes will have fixed the problem.

In summary, all is well.  If we have any further related problems I will update 
this bug report.  Thanks guys!

Original comment by aco...@gmail.com on 8 Jul 2009 at 9:50

GoogleCodeExporter commented 9 years ago
No problem; thanks for replying.  Glad to hear it's now working. :-)

Original comment by dan...@percona.com on 8 Jul 2009 at 9:56