Skip to content

Commit fc83586

Browse files
try fix
1 parent 9fbb80d commit fc83586

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

lib/ecto/adapters/myxql.ex

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -591,10 +591,7 @@ defmodule Ecto.Adapters.MyXQL do
591591
# Trap exits in case mysql dies in the middle of execution so that we can surface the error
592592
old_trap_exit = Process.flag(:trap_exit, true)
593593
port = Port.open({:spawn_executable, abs_cmd}, port_opts)
594-
Port.command(port, contents)
595-
# Use this as a signal to close the port since we cannot
596-
# send an exit command to mysql in batch mode
597-
Port.command(port, ";SELECT '__ECTO_EOF__';\n")
594+
Port.command(port, [contents, ";SELECT '__ECTO_EOF__';\n"])
598595
result = collect_output(port, "")
599596
Process.flag(:trap_exit, old_trap_exit)
600597
result

0 commit comments

Comments
 (0)