Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

we haven't monkey patched the Result class, so use each

  • Loading branch information...
commit a5a0338b9b3f2f24efde0ae6a56e99b938eff7cf 1 parent 4be9dbf
@tenderlove tenderlove authored
View
4 activerecord/lib/active_record/connection_adapters/mysql_adapter.rb
@@ -403,11 +403,13 @@ def collation
end
def tables(name = nil, database = nil) #:nodoc:
+ tables = []
+
sql = "SHOW TABLES "
sql << "IN #{quote_table_name(database)} " if database
result = execute(sql, 'SCHEMA')
- tables = result.collect { |field| field[0] }
+ result.each { |field| tables << field[0] }
result.free
tables
end

3 comments on commit a5a0338

@arunagw
Collaborator

:+1:

@joshaidan

Thanks, was going to make the same change!

@walterdavis

Thanks very much, this is so much better!

Please sign in to comment.
Something went wrong with that request. Please try again.