-
Notifications
You must be signed in to change notification settings - Fork 383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.3.6 Breaks ordering on an aggregate in MSSQL #532
Comments
iaddict
added a commit
to iaddict/activerecord-jdbc-adapter
that referenced
this issue
Mar 25, 2014
Ensure that an order clause which contains aggregate functions does not get manipulated. This should fix jruby#532
Sorry, I just now got around to updating to 1.3.7 to test this, but this issue is still present. I had to revert back to 1.3.5 again. |
Same problem with 1.3.9. After downgrading to 1.3.5 it works. |
This was referenced Apr 29, 2015
kares
added a commit
to kares/activerecord-jdbc-adapter
that referenced
this issue
Sep 11, 2015
kares
added a commit
that referenced
this issue
Sep 14, 2015
* 1-3-stable: (152 commits) 1.3.18 is happening :now: warn on mimer and informix adapters as unsupported on 4.2 re-built adapter jar preparing for 1.3.18 fill in change-log as PG's BC test refactoring revealed insert_returning config is failing - pend since arel visitor instances might get re-used we need to avoid the @instance variable [mssql] there are 3 hard problems in it: naming, caching and SQLServer AREL visitors ! [mssql] re-arrange visitor to only fetch PK if really needed handle regression - it's :datetime won't exists on PG :timestamp will ... [postgres] work-around BC time parsing issue (on JRuby 1.7.x) by a patch make sure Postgre's native part does type-cast on timestamp2ruby (for correctness) [mssql] fix broken ordering on an aggregate queries (test for fix #646 closing #532) tune replace limit/offset code (merged from #646) to produce less temporary objects Fix broken limit_helpers deprecate attr writers on column instance handle id updatting with partial updates disabled test on AR >= 4.0 remove FIXME note - type_cast_from_database already goes along + tune doc [mssql] extract default values such as ((-1)) returned from JDBC change typos in test names ... Conflicts: .travis.yml lib/arjdbc/firebird/adapter.rb lib/arjdbc/jdbc/adapter_java.jar lib/arjdbc/mimer.rb lib/arjdbc/mssql/adapter.rb lib/arjdbc/oracle/adapter.rb lib/arjdbc/version.rb rakelib/02-test.rake src/java/arjdbc/jdbc/RubyJdbcConnection.java src/java/arjdbc/mssql/MSSQLRubyJdbcConnection.java src/java/arjdbc/oracle/OracleRubyJdbcConnection.java src/java/arjdbc/postgresql/PostgreSQLRubyJdbcConnection.java test/db/firebird/simple_test.rb test/jndi_callbacks_test.rb test/simple.rb
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I previously added this as a comment to #529, but I think maybe I should have just created a new bug for it, so that's what I'm doing.
This patch appears to have broken something to do with ordering on an aggregate.
I have the following code:
In 1.3.5, this generates the following valid query for MSSQL (it also works for Postgres, Oracle, and SQLite):
In 1.3.6 it generates the following invalid SQL:
Notice the ORDER BY clause has changed from:
to
The text was updated successfully, but these errors were encountered: