diff options
author | Rune Schjellerup Philosof <rp@centic.dk> | 2017-04-06 14:05:49 +0200 |
---|---|---|
committer | Rune Schjellerup Philosof <rp@centic.dk> | 2017-04-20 10:14:07 +0200 |
commit | 2d699e24ff10158c0831cf6b7f5e5b12ac41903a (patch) | |
tree | b45ebf13161a312298b019da50ff467e3909abab /activerecord/test | |
parent | fd097cff79c62fedabffae4e9f0fb53c2ec8bcbe (diff) | |
download | rails-2d699e24ff10158c0831cf6b7f5e5b12ac41903a.tar.gz rails-2d699e24ff10158c0831cf6b7f5e5b12ac41903a.tar.bz2 rails-2d699e24ff10158c0831cf6b7f5e5b12ac41903a.zip |
Fix quoting in db:create grant all statement.
The database name used in the test would have actually shown this if it
had tried to execute on a real Mysql instead of being stubbed out
(dashes in database names needs quotes).
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/tasks/mysql_rake_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/tasks/mysql_rake_test.rb b/activerecord/test/cases/tasks/mysql_rake_test.rb index f30e0958c3..b85d303a91 100644 --- a/activerecord/test/cases/tasks/mysql_rake_test.rb +++ b/activerecord/test/cases/tasks/mysql_rake_test.rb @@ -167,7 +167,7 @@ if current_adapter?(:Mysql2Adapter) def assert_permissions_granted_for(db_user) db_name = @configuration["database"] db_password = @configuration["password"] - @connection.expects(:execute).with("GRANT ALL PRIVILEGES ON #{db_name}.* TO '#{db_user}'@'localhost' IDENTIFIED BY '#{db_password}' WITH GRANT OPTION;") + @connection.expects(:execute).with("GRANT ALL PRIVILEGES ON `#{db_name}`.* TO '#{db_user}'@'localhost' IDENTIFIED BY '#{db_password}' WITH GRANT OPTION;") end end |