Commit c69bf73f authored by Leigh Stoller's avatar Leigh Stoller

Changes for mysql 5.7 upgrade we hope to do soon.

parent 2dfeccef
#!/usr/bin/perl -w
#
# Copyright (c) 2000-2010 University of Utah and the Flux Group.
# Copyright (c) 2000-2017 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -45,9 +45,21 @@ my $DBNAME = "@TBDBNAME@";
my $master_schema = "$testbed_srcdir/sql/database-create.sql";
my $schemadiff = "$testbed_srcdir/utils/schemadiff";
my $extraopts = "";
my $isvers5 = system("mysql -V | egrep -q -s 'Distrib 5.'") == 0;
my $extraopts = ($isvers5 ? "--skip-quote-names" : "");
my $mysqlvers = `mysql -V`;
if ($mysqlvers =~ /Distrib (\d\.\d)/) {
my $vers = $1 + 0.0;
if ($vers >= 5.0) {
$extraopts .= "--skip-quote-names ";
}
if ($vers >= 5.7) {
$extraopts .= "--set-gtid-purged=off ";
}
}
else {
fatal("Could not determine mysql version");
}
#
# XXX: Requires that mysqldump be in caller's $PATH - probably an OK
......
......@@ -60,6 +60,12 @@ if [ $major -eq 5 ]; then
if [ $minor -gt 4 ]; then
opts="$opts --secure-file-priv="
fi
# so we can start using innodb tables, maybe with compression.
if [ $minor -gt 5 ]; then
opts="$opts --innodb_file_per_table=1 --innodb_file_format=Barracuda"
# Backwards compatibility.
opts="$opts --lower_case_table_names=0 --log_output=file"
fi
else
safeprog=/usr/local/bin/safe_mysqld
fi
......
#!/usr/bin/perl -w
#
# Copyright (c) 2000-2011 University of Utah and the Flux Group.
# Copyright (c) 2000-2017 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
......@@ -40,8 +40,20 @@ if (@ARGV && $ARGV[0] eq "-i") {
#
my $DBNAME = '@TBDBNAME@';
my $isvers5 = system("mysql -V | egrep -q -s 'Distrib 5.'") == 0;
my $extraopts = ($isvers5 ? "--skip-opt" : "");
my $extraopts = "";
my $mysqlvers = `mysql -V`;
if ($mysqlvers =~ /Distrib (\d\.\d)/) {
my $vers = $1 + 0.0;
if ($vers >= 5.0) {
$extraopts .= "--skip-opt ";
}
if ($vers >= 5.7) {
$extraopts .= "--set-gtid-purged=off ";
}
}
else {
fatal("Could not determine mysql version");
}
my $mysqldump = "mysqldump $extraopts";
#
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment