Skip to content

Commit 4eb1cd0

Browse files
fix timeout
1 parent c45c46d commit 4eb1cd0

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/ecto/adapters/myxql.ex

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -539,10 +539,10 @@ defmodule Ecto.Adapters.MyXQL do
539539
{args, cmd_opts}
540540
end
541541

542-
# Largely ported from Elixir System.cmd implementation
543-
# with the intent of using file redirection for passing
544-
# dump files into the mysql client so that users don't
545-
# run into shell limits when dump files are large
542+
# Ported from Elixir System.cmd implementation with the
543+
# intent of using file redirection for passing dumps
544+
# into the mysql client so that users don't run into
545+
# shell limits when files are too large
546546
defp run_with_port(cmd, opts, opt_args, contents, cmd_opts \\ []) do
547547
unless System.find_executable(cmd) do
548548
raise "could not find executable `#{cmd}` in path, " <>
@@ -562,6 +562,7 @@ defmodule Ecto.Adapters.MyXQL do
562562
port_opts = port_opts(cmd_opts, args: args)
563563
port = Port.open({:spawn_executable, cmd}, port_opts)
564564
Port.command(port, contents)
565+
Port.command(port, :eof)
565566

566567
{initial, fun} = Collectable.into("")
567568

0 commit comments

Comments
 (0)