Skip to content

Commit 7f0bc47

Browse files
authored
Fix dumping structure of mysql 8 database (#493)
1 parent 1f18154 commit 7f0bc47

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

integration_test/myxql/storage_test.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ defmodule Ecto.Integration.StorageTest do
166166

167167
assert {output, 0} =
168168
Ecto.Adapters.MyXQL.dump_cmd(
169-
["--no-create-info", "--tables", "schema_migrations"],
169+
[],
170170
[],
171171
PoolRepo.config()
172172
)

lib/ecto/adapters/myxql.ex

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,11 @@ defmodule Ecto.Adapters.MyXQL do
429429

430430
database_args =
431431
if database = opts[:database] do
432-
["--database", database]
432+
if cmd == "mysqldump" do
433+
["--databases", database]
434+
else
435+
["--database", database]
436+
end
433437
else
434438
[]
435439
end

0 commit comments

Comments
 (0)