| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Query cache doesn't type cast bind parameters since it isn't
actually querying the database, so it can't pass those values in. Type
casting in the query cache method would cause the values to be type cast
twice in the case that there is a cache miss (since the methods it calls
will type cast *again*). If logging is disabled, then adding the type
cast code to the query cache method will needlessly typecast the values
(since the only reason those values are type cast is for display in the
logs).
Fixes #26828.
|
| |
| |
| |
| | |
https://bugs.ruby-lang.org/issues/12739
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is fixed in 5.0 as an ancillary part of 574f255629a45cd67babcfb9bb8e163e091a53b8
but here I also add a test for the condition.
I'd previously backported the fix (and added a test) in the below
commit; this brings the fix back up to master.
(cherry picked from commit fce3dbf30241f2a65c777e192a7171b0eea81453)
|
| |
| |
| |
| |
| | |
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
|
| |
| |
| |
| |
| |
| | |
Follow up to #20818.
`retrieve_connection` is passed `spec_name` instead of `klass` since #24844.
|
|/
|
|
|
|
|
|
| |
This method appears to have been partially used in connection pool
caching, but it was introduced without much reasoning or any tests. One
edge case test was added later on, but it was focused on implementation
details. This method is no longer used outside of tests, and as such is
removed.
|
| |
|
|
|
|
|
|
| |
Before we enable query caching we check if the connection is
connected. Before this fix we were always checking against the main
connection, and not the model connection.
|
| |
|
|
|
|
|
|
|
|
| |
Ruby 2.4 unifies Fixnum and Bignum into Integer: https://bugs.ruby-lang.org/issues/12005
* Forward compat with new unified Integer class in Ruby 2.4+.
* Backward compat with separate Fixnum/Bignum in Ruby 2.2 & 2.3.
* Drops needless Fixnum distinction in docs, preferring Integer.
|
|
|
|
|
|
| |
These should allow external code to run blocks of user code to do
"work", at a similar unit size to a web request, without needing to get
intimate with ActionDipatch.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The type map was introduced in aafee23, but wasn't properly filled.
This mainly adjusts many locations, that expected strings instead of
integers or boolean.
add_pg_decoders is moved after setup of the StatementPool, because
execute_and_clear could potentially make use of it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit ff18049ca6f27deb7e7f955478e1464f8d756332.
This broke the AR build for every adapter:
1) Error:
AssociationCallbacksTest#test_dont_add_if_before_callback_raises_exception:
Exception: You can't add a post
2) Failure:
QueryCacheTest#test_query_cache_doesnt_leak_cached_results_of_rolled_back_queries [/Users/senny/Projects/rails/activerecord/test/cases/query_cache_test.rb:235]:
Expected: 1
Actual: 0
I'm reverting to get the build green again.
|
| |
|
| |
|
|
|
|
|
| |
[fixes #14361]
[related #13886]
|
|
|
|
|
|
|
|
|
|
|
|
| |
This solves order dependent issues where the last test
leaked the query cache state. This resulted in the following error:
```
QueryCacheExpiryTest#test_cache_is_expired_by_habtm_delete [test/cases/query_cache_test.rb:275]:
not all expectations were satisfied
unsatisfied expectations:
- expected exactly twice, invoked once: #<ActiveRecord::ConnectionAdapters::SQLite3Adapter:0x7f93e0c65838>.clear_query_cache(any_parameters)
```
|
|
|
|
|
|
| |
already have cache true.
This commit takes into account the last cache_enabled value, before clearing query_cache.
|
| |
|
|
|
|
| |
also DATABASE_URL.
|
| |
|
| |
|
|
|
|
|
|
|
| |
non-prepared statements
Conflicts:
activerecord/test/cases/query_cache_test.rb
|
|
|
|
| |
Fixes #867
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
prepared statement cache
|
| |
|
|
|
|
|
| |
This Sqlite3 should be in if block.
Was giving error because sqlite3 is not loaded
|
|
|
| |
for Sqlite3 in AR-JDBC.It's Jdbc::SQLite3::VERSION
|
| |
|
| |
|
|
|
|
| |
Rack::Sendfile to function properly. See issue #1761.
|
| |
|
|
|
|
| |
RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases.
|
|
|
|
| |
on 951e18abea9c116fc5d6b330ca1dcd2890abe006
|
| |
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: José Valim <jose.valim@gmail.com>
|
| |
|
| |
|
| |
|
| |
|
| |
|