| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* The database version will get cached in the schema cache file during the
schema cache dump. When the database version check happens, the version will
be pulled from the schema cache and thus avoid querying the database for
the version.
* If the schema cache file doesn't exist, we'll query the database for the
version and cache it on the schema cache object.
* To facilitate this change, all connection adapters now implement
#get_database_version and #database_version. #database_version returns the
value from the schema cache.
* To take advantage of the cached database version, the database version check
will now happen after the schema cache is set on the connection in the
connection pool.
|
| |
|
| |
|
|
|
|
|
| |
This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing
changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
|
| |
|
|
|
|
|
| |
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
|
|
|
|
|
| |
Avoid instanciate `ActiveRecord::Result` and calling
`ActiveRecord::Result#hash_rows` for the performance.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This solves the following issue:
```
$ bin/test
Using sqlite3
/Users/senny/Projects/rails/activerecord/test/cases/adapters/mysql2/sp_test.rb:16:in `<class:Mysql2StoredProcedureTest>': undefined method `version' for #<ActiveRecord::ConnectionAdapters::SQLite3Adapter:0x007f8bab4b5b70> (NoMethodError)
from /Users/senny/Projects/rails/activerecord/test/cases/adapters/mysql2/sp_test.rb:5:in `<top (required)>'
from /Users/senny/Projects/rails/activesupport/lib/active_support/dependencies.rb:302:in `require'
from /Users/senny/Projects/rails/activesupport/lib/active_support/dependencies.rb:302:in `block in require'
from /Users/senny/Projects/rails/activesupport/lib/active_support/dependencies.rb:268:in `load_dependency'
from /Users/senny/Projects/rails/activesupport/lib/active_support/dependencies.rb:302:in `require'
from /Users/senny/Projects/rails/railties/lib/rails/test_unit/test_requirer.rb:11:in `block in require_files'
from /Users/senny/Projects/rails/railties/lib/rails/test_unit/test_requirer.rb:10:in `each'
from /Users/senny/Projects/rails/railties/lib/rails/test_unit/test_requirer.rb:10:in `require_files'
from /Users/senny/Projects/rails/railties/lib/rails/test_unit/minitest_plugin.rb:69:in `plugin_rails_init'
from /Users/senny/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/minitest-5.3.3/lib/minitest.rb:73:in `block in init_plugins'
from /Users/senny/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/minitest-5.3.3/lib/minitest.rb:71:in `each'
from /Users/senny/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/minitest-5.3.3/lib/minitest.rb:71:in `init_plugins'
from /Users/senny/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/minitest-5.3.3/lib/minitest.rb:122:in `run'
from bin/test:19:in `<main>'
```
|
|
|