aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/generators
diff options
context:
space:
mode:
authorSean Griffin <sean@seantheprogrammer.com>2015-12-14 08:34:14 -0700
committerDavid Heinemeier Hansson <david@loudthinking.com>2015-12-15 10:15:24 +0100
commitaf3dc42ee357a8f70148c9dc9572276a9824aeec (patch)
tree71e4a043ffe26af38effac2881ca1909987d17a7 /railties/test/generators
parente12c2a6d11a9ebc28b85f34230b11fb654503726 (diff)
downloadrails-af3dc42ee357a8f70148c9dc9572276a9824aeec.tar.gz
rails-af3dc42ee357a8f70148c9dc9572276a9824aeec.tar.bz2
rails-af3dc42ee357a8f70148c9dc9572276a9824aeec.zip
Use a bind param for `LIMIT` and `OFFSET`
We currently generate an unbounded number of prepared statements when `limit` or `offset` are called with a dynamic argument. This changes `LIMIT` and `OFFSET` to use bind params, eliminating the problem. `Type::Value#hash` needed to be implemented, as it turns out we busted the query cache if the type object used wasn't exactly the same object. This drops support for passing an `Arel::Nodes::SqlLiteral` to `limit`. Doing this relied on AR internals, and was never officially supported usage. Fixes #22250.
Diffstat (limited to 'railties/test/generators')
0 files changed, 0 insertions, 0 deletions