diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-07-19 18:10:04 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2017-07-22 08:40:16 +0900 |
commit | a265d4b29cf9c1be84603ec53a6f8b17b53321a9 (patch) | |
tree | 1a6201eaaedb9c03d3c6b388229731268f089998 /activerecord/test/models/minimalistic.rb | |
parent | af08044d6a6aa87d3b389f63c78564be2f60b1ab (diff) | |
download | rails-a265d4b29cf9c1be84603ec53a6f8b17b53321a9.tar.gz rails-a265d4b29cf9c1be84603ec53a6f8b17b53321a9.tar.bz2 rails-a265d4b29cf9c1be84603ec53a6f8b17b53321a9.zip |
Fix `COUNT(DISTINCT ...)` with `ORDER BY` and `LIMIT`
Since #26972, `ORDER BY` is kept if `LIMIT` is presented for
performance. But in most SQL servers (e.g. PostgreSQL, SQL Server, etc),
`ORDER BY` expressions must appear in select list for `SELECT DISTINCT`.
We should not replace existing select list in that case.
Diffstat (limited to 'activerecord/test/models/minimalistic.rb')
0 files changed, 0 insertions, 0 deletions