Commit Graph

6431 Commits

Author SHA1 Message Date
Aaron Patterson
e1b500ec96 LRU cache in mysql and sqlite are now per-process caches. 2011-09-07 15:26:47 -07:00
Aaron Patterson
e6adeaa2fa fixing file name 2011-09-07 15:26:47 -07:00
Aaron Patterson
834d429e84 LRU should cache per process in postgresql. fixes #1339 2011-09-07 15:26:47 -07:00
Aaron Patterson
b9f66f4db1 fixing view queries 2011-09-07 10:44:51 -07:00
Aaron Patterson
d9a20711da use the supplied bind values 2011-09-07 10:44:51 -07:00
Aaron Patterson
f5ea24b3db Merge commit 'refs/pull/2909/head' of https://github.com/rails/rails into rawr
* https://github.com/rails/rails:
  Postgresql adapter: added current_schema check for table_exists?
  Postgresql adapter: added current_schema check for table_exists?
2011-09-07 10:44:50 -07:00
Yasuo Honda
3937d443d6 Add ROWNUM to test first and last to support Oracle. 2011-09-07 07:40:55 -04:00
Jon Leighton
143769051b Don't include any of includes, preload, joins, eager_load in the through association scope. 2011-09-07 09:27:41 +01:00
Jon Leighton
db8d54ebf5 Merge pull request #2485 from akaspick/exists_fix
fix exists? to return false if passed nil (which may come from a missing
2011-09-07 00:38:51 -07:00
Aaron Patterson
4edf6ea0ea Merge pull request #2897 from rsutphin/ar31-remove_connection
Patch for issue #2820
2011-09-06 17:43:58 -07:00
Aaron Patterson
54b7e783ef Database adapters use a statement pool.
Database adapters use a statement pool for limiting the number of open
prepared statments on the database.  The limit defaults to 1000, but can
be adjusted in your database config by changing 'statement_limit'.
2011-09-06 16:47:34 -07:00
Aaron Patterson
a4fa6eab39 adding a statement pool for mysql and sqlite3 2011-09-06 16:06:27 -07:00
Jon Leighton
9bde73ff72 Nested through associations: preloads from the default scope of a through model should not be included in the association scope. (We're already excluding includes.) Fixes #2834. 2011-09-06 16:34:32 +01:00
Jon Leighton
b24d668859 Ensure we are not comparing a string with a symbol in HasManyAssociation#inverse_updates_counter_cache?. Fixes #2755, where a counter cache could be decremented twice as far as it was supposed to be. 2011-09-06 15:58:07 +01:00
Jon Leighton
9f3e732e65 Make the logic easier to read 2011-09-06 12:59:11 +01:00
Jon Leighton
77ff1ce541 Disable active record marshalling tests on Ruby 1.8.7 on Travis CI, as they have been failing intermittently for a long while due to what appears to be a Ruby bug. If anyone has the skills/expertise/time to debug this, please speak to the Travis guys. 2011-09-06 11:45:08 +01:00
Damien Mathieu
e8d5920b74 #first doesn't take an order in this test 2011-09-06 10:01:33 +02:00
Santiago Pastorino
164382003c Merge pull request #2877 from dmathieu/fix_tests_pg_18
Last orders the records by id
2011-09-05 15:41:59 -07:00
Damien Mathieu
51da1e5c65 first and last orders the records by id 2011-09-06 00:30:40 +02:00
Aaron Patterson
6d93f70c58 Merge pull request #2716 from jbbarth/fix_invert_rename_index
Fix bad options order in AR::Migration::CommandRecorder#invert_rename_index
2011-09-05 14:17:55 -07:00
Georg Friedrich
2175012230 Don't find belongs_to target when the foreign_key is NULL. Fixes #2828 2011-09-05 13:49:29 -07:00
Damien Mathieu
5f5527c726 Use LIMIT sql word in last when it's possible 2011-09-05 14:37:37 +02:00
Damien Mathieu
451cdd62ce use LIMIT SQL word in first - Closes #2783 2011-09-05 13:09:52 +02:00
Arun Agrawal
76e94016a4 Sort here to make sure the order is ok. 2011-09-05 12:49:34 +05:30
Arun Agrawal
9066e34025 We need to recorder here. Need to drop the order from default scope.
Fixes #2832
2011-09-05 00:12:57 +05:30
Jon Leighton
ef7e60f008 Revert "Fixes bug in ActiveRecord::QueryMethods, #1697"
This reverts commit 0df27c98d9.

Reverted due to failing test, see #2845.
2011-09-04 09:56:55 +01:00
Xavier Noria
0a38e2a5ce restores the API docs of AR::Fixtures, made a quick pass over them, revises link in fixture template [closes #2840] 2011-09-03 15:20:30 -07:00
Arun Agrawal
bf4117a8b1 Need to add here to pass the test
As in previous commit it's removed.
2011-09-03 14:33:27 +05:30
Vijay Dev
eeda8403fd Merge branch 'master' of github.com:lifo/docrails 2011-09-02 23:00:59 +05:30
Aaron Patterson
6f3c6992c5 * Psych errors with poor yaml formatting are proxied. Fixes #2645, #2731 2011-09-01 15:08:19 -07:00
Aaron Patterson
8b9ddbd8f9 make sure encoding_aware? is available 2011-09-01 14:07:07 -07:00
Gabe Berke-Williams
de6660b5ec Improve examples: use each instead of for...in 2011-08-31 20:52:35 -04:00
Joshua Wehner
0df27c98d9 Fixes bug in ActiveRecord::QueryMethods, #1697
Replace split on comma with a regexp that will reverse all ASC/DESC specifically
2011-08-31 16:17:28 -04:00
Raimonds Simanovskis
60d8e4ac28 Ensure correct ordering of results in test_update_all_with_joins_and_offset_and_order
Last two asserts in this test assume that all_comments are ordered by posts.id and then by comments.id therefore additional ordering is added. Without it test was failing on Oracle which returned results in different order.
2011-08-30 22:33:49 +01:00
Jon Leighton
bd4bd3f50a Merge pull request #2750 from rsim/fix_test_column_names_are_escaped_for_oracle
Fix test column names are escaped for oracle
2011-08-30 11:04:01 -07:00
Jon Leighton
92619e4f78 Fix test failures on 1.8.7, since Object#initialize_dup is not defined there (and this call to super is no essential, so easiest to simply remove) 2011-08-29 23:05:26 +01:00
Aaron Patterson
cebff6d0f7 Merge pull request #2021 from dasch/more_postgres_utils
Make #extract_schema_and_table an instance method in Utils
2011-08-29 13:38:10 -07:00
Jon Leighton
c59c9bb8bc Move clear_timestamp_attributes into Timestamp module 2011-08-29 17:39:09 +01:00
Jon Leighton
735d985b01 The join_nodes must be passed to the JoinDependency initializer and therefore counted by the alias tracker. This is because the association_joins are aliased on initialization and then the tables are cached, so it is no use to alias the join_nodes later. Fixes #2556. 2011-08-29 15:05:47 +01:00
Jon Leighton
fd22d040fe Move the bulk alter table code into the abstract mysql adapter, hence it is supported for mysql2 as well now. 2011-08-29 12:43:39 +01:00
Jon Leighton
4fcd847c8d Extract simplified_type into the abstract class 2011-08-29 12:43:39 +01:00
Jon Leighton
5766539342 Create an AbstractMysqlAdapter to abstract the common code between MysqlAdapter and Mysql2Adapter. 2011-08-29 12:43:39 +01:00
Aaron Patterson
d63688d9e6 fixing typo 2011-08-28 16:31:13 -07:00
Aaron Patterson
b4ff82a791 clear and disable query cache when an exception is raised from called middleware 2011-08-28 14:16:00 -07:00
jbbarth
24674b3448 Fixed bad options order in ActiveRecord::Migration::CommandRecorder#invert_rename_index 2011-08-28 06:02:15 +02:00
Aaron Patterson
e8b525f169 stop messing with the load path, load path should be adjusted in the test task 2011-08-26 10:15:17 -07:00
Aaron Patterson
42a7979cf1 Force binary data inserted for a string data type to utf-8 and log an
error.  Strings tagged as binary will be stored in sqlite3 as blobs.  It
is an error to insert binary data to a string column, so an error is
emitted in the log file.  People are highly encouraged to track down the
source of the binary strings and make sure that the encoding is set
correctly before inserting to the database.
2011-08-25 16:07:54 -07:00
Aaron Patterson
5345958b3a Merge pull request #2679 from amatsuda/nullify_abstract_class_table_name
do not compute table names for abstract classes
2011-08-24 16:05:24 -07:00
Claudio Poli
098cc186c1 Adding missing autoload 2011-08-24 19:15:49 +02:00
Akira Matsuda
0a0da9d554 do not compute table names for abstract classes 2011-08-24 21:11:15 +09:00