1 |
--- 5.5_orig/scripts/mysqlhotcopy.sh 2010-12-03 18:58:26.000000000 +0100 |
2 |
+++ 5.5/scripts/mysqlhotcopy.sh 2010-12-27 13:42:50.919921524 +0100 |
3 |
@@ -790,7 +790,24 @@ sub get_list_of_tables { |
4 |
} || []; |
5 |
warn "Unable to retrieve list of tables in $db: $@" if $@; |
6 |
|
7 |
- return (map { $_->[0] } @$tables); |
8 |
+ my @ignore_tables = (); |
9 |
+ |
10 |
+ # Ignore tables for the mysql database |
11 |
+ if ($db eq 'mysql') { |
12 |
+ @ignore_tables = qw(general_log slow_log schema apply_status); |
13 |
+ } |
14 |
+ |
15 |
+ my @res = (); |
16 |
+ if ($#ignore_tables > 1) { |
17 |
+ my @tmp = (map { $_->[0] } @$tables); |
18 |
+ for my $t (@tmp) { |
19 |
+ push(@res, $t) if not exists { map { $_=>1 } @ignore_tables }->{$t}; |
20 |
+ } |
21 |
+ } else { |
22 |
+ @res = (map { $_->[0] } @$tables); |
23 |
+ } |
24 |
+ |
25 |
+ return @res; |
26 |
} |
27 |
|
28 |
sub quote_names { |