hugowan / maatkit

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

Use of uninitialized value in substitution (s///) at mk-table-checksum line 2324 #142

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If this is a problem report, what steps will reproduce the problem?
1. I run the following command:
C:\Perl\bin\perl.exe mk-table-checksum --user=root --pass=**** localhost

What is the expected output? What do you see instead?
Expect a checksum, get a perl error

What information do you get from mk-<toolname>--version?
mk-table-checksum  Ver @VERSION@ Distrib @DISTRIB@ Changeset 2482

What is your MySQL, Perl, DBI, and DBD::mysql version?
MySQL 5.1.29, Activestate Perl 5.8.8, DBI 1.58, DBD 3.0002

What is your operating system/distribution?
Windows 2003 x64

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 is attached (password has removed)

Please provide any additional information below.

Thanks for creating maatkit!

Original issue reported on code.google.com by dougdoug...@googlemail.com on 3 Dec 2008 at 11:12

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by dan...@percona.com on 12 Dec 2008 at 4:51

GoogleCodeExporter commented 9 years ago
This happens when it encounters a table with spaces in the name.

 at /usr/bin/mk-table-checksum line 2323
        Quoter::quote('Quoter=HASH(0x24526a0)', 'albumview', undef) called at
/usr/bin/mk-table-checksum line 1754
        MySQLDump::get_create_table('MySQLDump=HASH(0x2210a50)',
'DBI::db=HASH(0x2498bc0)', 'Quoter=HASH(0x24526a0)', 'albumview', undef) called 
at
/usr/bin/mk-table-checksum line 2420
        MySQLFind::find_tables('MySQLFind=HASH(0x2061a08)',
'DBI::db=HASH(0x2498bc0)', 'database', 'albumview') called at
/usr/bin/mk-table-checksum line 3426
        main::get_all_tbls_info('DBI::db=HASH(0x2498bc0)') called at
/usr/bin/mk-table-checksum line 3388
Use of uninitialized value $val in substitution (s///) at 
/usr/bin/mk-table-checksum
line 2325.

The undef is usually the table name.

Original comment by goo...@alia.org.uk on 29 Jan 2009 at 11:52

GoogleCodeExporter commented 9 years ago
>>This happens when it encounters a table with spaces in the name.

Didn't see it happen on my WinXP machine.

1. create table `a table` (c1 int);
2. then run mk-table-checksum --user=root --pass=**** localhost ;
3. No errors seen. It did return a checksum for `a table`
Tested on WinXP 32-bit, Strawberry Perl 5.10, MySQL 5.1.30-community, with DBI 
1.604,
DBD::mysql 4.005, maatkit 3119

I also tested the same thing last night on my Ubuntu box at home. Since the 
original
bug was reported from Windows platform, I didn't take note of the versions on my
Ubuntu last night. But as far as Perl, MySQL, DBI and DBD are concerned, I 
think they
are the same version as I listed above. Will verify that version info tonight.

Original comment by haidong...@gmail.com on 9 Apr 2009 at 3:49

GoogleCodeExporter commented 9 years ago
Checked version info on Ubuntu at home. DBI 1.607, DBD::mysql 4.010, Perl 5.10, 
MySQL
5.1.31.

I should mention that both my Ubuntu and Windows XP are 32-bit.

In addition, I also tested table name with more than one space in it. And I 
didn't
get the error listed above.

Original comment by haidong...@gmail.com on 10 Apr 2009 at 3:12

GoogleCodeExporter commented 9 years ago
I am pretty sure this has been fixed during the course of fixing some other 
bug. 
Unfortunately I can't find where that was done.  We've made quite a few fixes 
to the
code that handles table names etc.

I think we can mark this one as fixed, and if it gets reopened that's OK.  
Opinions?

Original comment by baron.schwartz on 10 Apr 2009 at 4:21

GoogleCodeExporter commented 9 years ago
>>I think we can mark this one as fixed, and if it gets reopened that's OK.

I agree.

Just curious, if I click on the star icon, my understanding is that it just 
adds me
to the email notification list, correct?

Original comment by haidong...@gmail.com on 10 Apr 2009 at 3:27

GoogleCodeExporter commented 9 years ago
Yes, it does appear to have been fixed. Thanks guys! (I'm the bug reporter)

Original comment by dougdoug...@googlemail.com on 10 Apr 2009 at 9:54

GoogleCodeExporter commented 9 years ago
Ah, reporter confirmation!  The holy grail of a bug report.  Thanks!

Original comment by baron.schwartz on 10 Apr 2009 at 10:21

GoogleCodeExporter commented 9 years ago

Original comment by baron.schwartz on 30 Jan 2010 at 5:15