percona-server: avoid overwrite socket files when running test
Signed-off-by: Jaehoon You <teslamint@gmail.com> Closes #13957. Signed-off-by: Alex Dunn <dunn.alex@gmail.com>master
parent
987a2b0e78
commit
03f6d843be
|
@ -184,12 +184,12 @@ class PerconaServer < Formula
|
||||||
# mysql throws error if any file exists in the data directory
|
# mysql throws error if any file exists in the data directory
|
||||||
system "#{bin}/mysqld", "--log-error-verbosity=3", "--initialize-insecure", "--datadir=#{testpath}/mysql", "--user=#{ENV["USER"]}"
|
system "#{bin}/mysqld", "--log-error-verbosity=3", "--initialize-insecure", "--datadir=#{testpath}/mysql", "--user=#{ENV["USER"]}"
|
||||||
pid = fork do
|
pid = fork do
|
||||||
exec "#{opt_bin}/mysqld_safe", "--datadir=#{testpath}/mysql", "--user=#{ENV["USER"]}", "--bind-address=127.0.0.1", "--port=3307"
|
exec "#{opt_bin}/mysqld_safe", "--datadir=#{testpath}/mysql", "--user=#{ENV["USER"]}", "--bind-address=127.0.0.1", "--port=3307", "--socket=#{testpath}/mysql.sock"
|
||||||
end
|
end
|
||||||
sleep 3
|
sleep 3
|
||||||
system "#{bin}/mysql", "--verbose", "--port=3307", "--user=root", "--execute=source #{testpath/"mysql_test.sql"}"
|
system "#{bin}/mysql", "--verbose", "--host=127.0.0.1", "--port=3307", "--user=root", "--execute=source #{testpath/"mysql_test.sql"}"
|
||||||
ensure
|
ensure
|
||||||
system "#{bin}/mysqladmin", "shutdown", "--user=root", "--port=3307"
|
system "#{bin}/mysqladmin", "shutdown", "--user=root", "--host=127.0.0.1", "--port=3307"
|
||||||
Process.wait pid
|
Process.wait pid
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue