mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Escape database name in MySQL adapter when creating and dropping databases. Closes #3409.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3403 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
f1a01c80db
commit
1e2b3d8b5a
2 changed files with 4 additions and 2 deletions
|
@ -1,5 +1,7 @@
|
||||||
*SVN*
|
*SVN*
|
||||||
|
|
||||||
|
* Escape database name in MySQL adapter when creating and dropping databases. #3409 [anna@wota.jp]
|
||||||
|
|
||||||
* Disambiguate table names for columns in validates_uniquness_of's WHERE clause. #3423 [alex.borovsky@gmail.com]
|
* Disambiguate table names for columns in validates_uniquness_of's WHERE clause. #3423 [alex.borovsky@gmail.com]
|
||||||
|
|
||||||
* .with_scope imposed create parameters now bypass attr_protected [Tobias Luetke]
|
* .with_scope imposed create parameters now bypass attr_protected [Tobias Luetke]
|
||||||
|
|
|
@ -243,11 +243,11 @@ module ActiveRecord
|
||||||
end
|
end
|
||||||
|
|
||||||
def create_database(name) #:nodoc:
|
def create_database(name) #:nodoc:
|
||||||
execute "CREATE DATABASE #{name}"
|
execute "CREATE DATABASE `#{name}`"
|
||||||
end
|
end
|
||||||
|
|
||||||
def drop_database(name) #:nodoc:
|
def drop_database(name) #:nodoc:
|
||||||
execute "DROP DATABASE IF EXISTS #{name}"
|
execute "DROP DATABASE IF EXISTS `#{name}`"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue