mirror of
https://github.com/percona/percona-toolkit.git
synced 2026-02-27 02:00:57 +08:00
PT-1853 Disabled FK checks in MySQL
This commit is contained in:
@@ -8594,6 +8594,12 @@ sub main {
|
||||
# ########################################################################
|
||||
my $set_on_connect = sub {
|
||||
my ($dbh) = @_;
|
||||
if ($o->get('check-foreign-keys')) {
|
||||
my $sql = "SET foreign_key_checks=0";
|
||||
PTDEBUG && _d($sql);
|
||||
print $sql, "\n" if $o->get('print');
|
||||
$dbh->do($sql);
|
||||
}
|
||||
return;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user