We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9fbb80d commit bb837c3Copy full SHA for bb837c3
lib/ecto/adapters/myxql.ex
@@ -591,10 +591,10 @@ defmodule Ecto.Adapters.MyXQL do
591
# Trap exits in case mysql dies in the middle of execution so that we can surface the error
592
old_trap_exit = Process.flag(:trap_exit, true)
593
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")
+ exit_signal = ";SELECT '__ECTO_EOF__';\n"
+ Port.command(port, [contents, exit_signal])
598
result = collect_output(port, "")
599
Process.flag(:trap_exit, old_trap_exit)
600
result
0 commit comments