Closed rbishop closed 7 years ago
Yes, if someone wants to send a pull request, it is welcome. That's what we do for Postgres: https://github.com/elixir-ecto/ecto/blob/master/lib/ecto/adapters/postgres.ex#L189-L223
I'll take a stab at it. I just wanted to confirm this wasn't the preferred behavior first.
@rbishop this would be helpful for me when working on Ecto. If you could find some time to pick this up I would be very grateful.
@fishcakez We just stopped using MySQL since Postgres is HIPAA certified on AWS RDS now, but I'll try and take care of this anyway. I will try my best in the coming weeks!
Environment
Current behavior
When running tasks such as
ecto.create
andecto.migrate
an exception occurs. Following the stacktrace leads toEcto.Adapters.MySQL.storage_up/1
andEcto.Adapters.MySQL.storage_down/2
, which are delegating toEcto.Adapters.MySQL.run_with_mysql/2
.Ecto.Adapters.MySQL.run_with_mysql/2
shells out to themysql
client binary. The problem is that in production environments you typically won't have the MySQL client binary installed on your servers that Ecto will be running tasks from. The common case is that you will have the MySQL client development headers installed (this doesn't matter for us because Mariaex is an Elixir implementation of the MySQL protocol).Expected behavior
I would expect Ecto to use the Mariaex adapter to run these queries rather than shelling out to the
mysql
binary.