Sophie

Sophie

distrib > Mageia > 3 > i586 > media > core-release-src > by-pkgid > c05d78206daa5de0b42ebaa78271fb20 > files > 9

mariadb-5.5.28-13.mga3.src.rpm

--- 5.5_orig/scripts/mysqlhotcopy.sh	2011-12-16 21:41:45.752226257 +0100
+++ 5.5/scripts/mysqlhotcopy.sh	2011-12-16 21:47:05.283055770 +0100
@@ -849,7 +849,24 @@
         } || [];
     warn "Unable to retrieve list of tables in $db: $@" if $@;
 
-    return (map { $_->[0] } @$tables);
+    my @ignore_tables = ();
+
+    # Ignore tables for the mysql database
+    if ($db eq 'mysql') {
+        @ignore_tables = qw(general_log slow_log schema apply_status);
+    }
+
+    my @res = ();
+    if ($#ignore_tables > 1) {
+       my @tmp = (map { $_->[0] } @$tables);
+       for my $t (@tmp) {
+           push(@res, $t) if not exists { map { $_=>1 } @ignore_tables }->{$t};
+       }
+    } else {
+       @res = (map { $_->[0] } @$tables);
+    }
+
+    return @res;
 }
 
 sub get_list_of_views {