Permalink
Browse files

SQLServer: quote table name in indexes query. Closes #2928.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6014 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 06afb8c commit fee8856ff1bae12395a09b6effc1e5f751ad0e72 @jeremy jeremy committed Jan 23, 2007
View
@@ -1,5 +1,7 @@
*SVN*
+* SQLServer: quote table name in indexes query. #2928 [keithm@infused.org]
+
* Subclasses of an abstract class work with single-table inheritance. #5704, #7284 [BertG, nick+rails@ag.arizona.edu]
* Make sure sqlite3 driver closes open connections on disconnect [Rob Rasmussen]
@@ -430,7 +430,7 @@ def tables(name = nil)
def indexes(table_name, name = nil)
ActiveRecord::Base.connection.instance_variable_get("@connection")["AutoCommit"] = false
indexes = []
- execute("EXEC sp_helpindex #{table_name}", name) do |sth|
+ execute("EXEC sp_helpindex '#{table_name}'", name) do |sth|
sth.each do |index|
unique = index[1] =~ /unique/
primary = index[1] =~ /primary key/

0 comments on commit fee8856

Please sign in to comment.