| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | |
| | | |
| | | |
| | | | |
Oops, I should had run the tests
|
| | | |
| | | |
| | | |
| | | | |
This is not valid anymore after 08477a651648ba4417ded128aa37b9ae0dcbc9ce
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
When the adapter is with prepared statement disabled and the binds array
is not empty the connection adapter will try to set the binds values and
will fail. Now we are checking if the adapter has the prepared statement
disabled.
Fixes #12023
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This reverts commit 71ff7d9c6592b93e2c810a1f464943dd7bd02c7f.
Reason: I need to check with @jeremy if we can do this.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The visitor have to consume the bind parameters to make the statements
work when the prepared statement option is disabled.
Fixes #12023
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
Remove extra case.
|
| | |/ /
| |/| | |
|
| | | |
| | | |
| | | |
| | | | |
Closes #11899.
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
SQL doesn't have a string type, and interpreting 'string' as text is
contrary to at least SQLite3's behavior:
"Note that a declared type of 'STRING' has an affinity of NUMERIC, not TEXT."
http://www.sqlite.org/datatype3.html
|
| | | |
| | | |
| | | |
| | | | |
In order that set attribute should not be bang method
|
|\ \ \ \
| | | | |
| | | | | |
drop extra variable
|
| |/ / / |
|
|/ / / |
|
| | | |
|
|\ \ \
| | | |
| | | | |
Set field encoding to client_encoding for mysql adapter.
|
| | | | |
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
Remove conditional, results are always an instance of `ActiveRecord::Result`
|
| | | |
| | | |
| | | |
| | | | |
`ActiveRecord::Result`
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | | |
This change was breaking the Railties tests. See
https://travis-ci.org/rails/rails/jobs/9865969
|
|\ \ \ \
| | | | |
| | | | | |
Free result_metadata directly instead of freeing 2nd, redundant call.
|
| | | | |
| | | | |
| | | | | |
`result_metadata` returns a new object each time it is called, so calling `result_metadata.free` is essentially a noop. Instead call `free` directly on the metadata when we're done with it.
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
If the `db/` directory is not present on a remote machine it will blow up in unexpected ways with error messages that do not indicate there is a missing directory:
```
SQLite3::CantOpenException: unable to open database file
```
This PR checks to see if a directory exists for the sqlite3 file and if not creates it for you.
This PR is an alternative to #11692 as suggested by @josevalim
|
|\ \ \ \
| | | | |
| | | | | |
Define enable_extension method to prevent undefined method error
|
| | |/ /
| |/| |
| | | |
| | | |
| | | |
| | | |
| | | | |
When mixing postgresql and another adapter like sqlite3 (for dev and test
respectively), the task `db:test:prepare` will fail due to the `enable_extension`
method not being defined in the abstract adapter. This patch simply adds an
empty definition to prevent it.
|
| | | |
| | | |
| | | |
| | | | |
Closes: #11706
|
| | | |
| | | |
| | | |
| | | |
| | | | |
* Constantize parse token
* Remove extra param passed to `parse_data`
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
The select_all method always returns ActiveRecord::Result instance,
and the ActiveRecord::Result includes Enumerable mixin.
If #empty?, #first method returns nil. Thus we can simplify this method.
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Fixes #11497
As `ActiveRecord::ConnectionAdapters::ConnectionManagement` middleware does not rescue from Exception (but only from StandardError),
the Connection Pool quickly runs out of connections when multiple erroneous Requests come in right after each other.
Recueing from all exceptions and not just StandardError, fixes this behaviour.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
This reverts commit cb1d07e43926bcec95cb8b4a663ca9889173395a, reversing
changes made to 754a373e301d2df0b12a11083405252722bc8366.
|
| | | |
| | | |
| | | |
| | | | |
ActiveRecord::ConnectionAdapters::QueryCache module.
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Using the mysql2 adapter, boolean values were sometimes being incorrectly cast
to 't' or 'f'. This changes the cast to match the mysql adapter behavior, ie 1 and 0.
|
|/ / / |
|
|\ \ \
| |/ /
|/| | |
Stop sending column info to `substitute_at` as it doesn't get utilized.
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
in favor of `begin_transaction`
with `:joinable` option.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
frodsan/remove_deprecated_clear_stale_cached_connections_method
Remove AR::Connection#clear_stale_cached_connections! deprecated method
|