Patch from Jim Cromie attached - need to merge
Only in MySQL-Diff-0.33-patched: blib
diff -ru MySQL-Diff-0.33/Database.pm MySQL-Diff-0.33-patched/Database.pm
--- MySQL-Diff-0.33/Database.pm 2002-07-24 12:16:48.000000000 -0600
+++ MySQL-Diff-0.33-patched/Database.pm 2010-06-28 12:35:19.553597546 -0600
@@ -100,6 +100,10 @@
or die "Couldn't read ${db}'s table defs via mysqldump: $!\n";
debug(3, " running mysqldump -d $args $db\n");
my $defs = $self->{_defs} = [ <MYSQLDUMP> ];
+ my $new = $defs;
+ for (@$defs) {
+ s/\`//g;
+ }
close(MYSQLDUMP);
if (grep /mysqldump: Got error: .*: Unknown database/, @$defs) {
Only in MySQL-Diff-0.33-patched: Database.pm~
Only in MySQL-Diff-0.33-patched: Makefile
Only in MySQL-Diff-0.33-patched: pm_to_blib
diff -ru MySQL-Diff-0.33/t/all.t MySQL-Diff-0.33-patched/t/all.t
--- MySQL-Diff-0.33/t/all.t 2003-05-08 16:53:23.000000000 -0600
+++ MySQL-Diff-0.33-patched/t/all.t 2010-06-28 12:37:19.955347609 -0600
@@ -452,13 +452,17 @@
my ($opts, $db1_defs, $db2_defs, $expected) = @$test;
+ # next 2 lines both report /* */ garbage
my $db1 = get_db($db1_defs, 1);
my $db2 = get_db($db2_defs, 2);
+ #$DB::single = 1;
+
my $diffs = diff_dbs($opts, $db1, $db2);
$diffs =~ s/^## mysqldiff [\d.]+/## mysqldiff <VERSION>/m;
$diffs =~ s/^## Run on .*/## Run on <DATE>/m;
$diffs =~ s{/\*!40000 ALTER TABLE .* DISABLE KEYS \*/;\n*}{}m;
+ $diffs =~ s{/\* .* \*/;\n*}{}m;
$diffs =~ s/ *$//gm;
my_ok($diffs, $expected);
Only in MySQL-Diff-0.33-patched/t: all.t~
diff -ru MySQL-Diff-0.33/Table.pm MySQL-Diff-0.33-patched/Table.pm
--- MySQL-Diff-0.33/Table.pm 2002-09-10 08:17:06.000000000 -0600
+++ MySQL-Diff-0.33-patched/Table.pm 2010-06-28 13:22:14.527758142 -0600
@@ -96,9 +96,15 @@
unless defined $self->options;
@lines = grep ! m{^/\*!40000 ALTER TABLE \Q$name\E DISABLE KEYS \*/;},
+ # clean out character-set set,restores
+ grep ! m{^/\*!40101 SET (character_set|\@saved_cs)_client},
+ # clean out SET FOO=@OLD_FOO lines
+ grep ! m{^/\*!4\d{4} SET ([A-Z_]+)=\@OLD_\1 \*/;},
+ grep ! m{^DROP TABLE IF EXISTS },
+ #grep ! m{^\n$},
@lines;
- warn "table `$name' had trailing garbage:\n", join '', @lines
+ warn "table `$name' had trailing garbage:\n(", join('', @lines),")\n"
if @lines;
}
Only in MySQL-Diff-0.33-patched: Table.pm~