aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2017-04-20 18:08:08 -0400
committerRafael Mendonça França <rafaelmfranca@gmail.com>2017-04-20 18:08:08 -0400
commit972df059bbedfe60d29caa8a561f5aff76883e63 (patch)
tree60d9000e2709e688250abef2ed4e0460a268c0bf /activerecord/lib/active_record
parente88636f733ad81c10dffde2e084e77034bc920fe (diff)
parent2d699e24ff10158c0831cf6b7f5e5b12ac41903a (diff)
downloadrails-972df059bbedfe60d29caa8a561f5aff76883e63.tar.gz
rails-972df059bbedfe60d29caa8a561f5aff76883e63.tar.bz2
rails-972df059bbedfe60d29caa8a561f5aff76883e63.zip
Merge pull request #28681 from runephilosof/fix-mysql-grant
Fix quoting in db:create grant all statement.
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/tasks/mysql_database_tasks.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/tasks/mysql_database_tasks.rb b/activerecord/lib/active_record/tasks/mysql_database_tasks.rb
index 920830b9cf..c05f0a8fbb 100644
--- a/activerecord/lib/active_record/tasks/mysql_database_tasks.rb
+++ b/activerecord/lib/active_record/tasks/mysql_database_tasks.rb
@@ -104,7 +104,7 @@ module ActiveRecord
def grant_statement
<<-SQL
-GRANT ALL PRIVILEGES ON #{configuration['database']}.*
+GRANT ALL PRIVILEGES ON `#{configuration['database']}`.*
TO '#{configuration['username']}'@'localhost'
IDENTIFIED BY '#{configuration['password']}' WITH GRANT OPTION;
SQL