1. 03 4月, 2014 3 次提交
    • D
      Treat blank UUID values as nil · 1f432c54
      Dmitry Lavrov 提交于
      1f432c54
    • M
      Avoid including DB details in exception messages · ad141538
      Matthew Draper 提交于
      The keys are quite sufficient; we shouldn't be throwing passwords
      around.
      ad141538
    • M
      Avoid a spurious deprecation warning for database URLs · 88e60a48
      Matthew Draper 提交于
      This is all about the case where we have a `DATABASE_URL`, and we have a
      `database.yml` present, but the latter doesn't contain the key we're
      looking for.
      
      If the key is a symbol, we'll always connect to `DATABASE_URL`, per the
      new behaviour in 283a2ede.
      
      If the key is a string, on the other hand, it should always be a URL:
      the ability to specify a name not present in `database.yml` is new in
      this version of Rails, and that ability does not stretch to the
      deprecated use of a string in place of a symbol.
      
      Uncovered by @guilleiguaran while investigating #14495 -- this actually
      may be related to the original report, but we don't have enough info to
      confirm.
      88e60a48
  2. 02 4月, 2014 7 次提交
  3. 01 4月, 2014 2 次提交
    • Y
      PostgreSQL determine `Column#type` through corresponding OID. #7814 · 4d344bb4
      Yves Senn 提交于
      I ran the whole test suite and compared the old to the new types.
      Following is the list of types that did change with this patch:
      
      ```
      DIFFERENT TYPE FOR mood: NEW: enum, BEFORE:
      DIFFERENT TYPE FOR floatrange: NEW: floatrange, BEFORE: float
      ```
      
      The `floatrange` is a custom type. The old type `float` was simply a coincidence
      form the name `floatrange` and our type-guessing.
      4d344bb4
    • E
      fix delete_all to remove records directly · e247f325
      eileencodes 提交于
      When delete_all is run on a CollectionProxy and has a
      dependency of delete_all the SQL that is produced has an IN
      statement. (DELETE FROM `associated_model` where `associated_model`
      .`parent_id` = 1 AND `associated_model`.`id` IN (1, 2, 3...)).
      This only happens if the association is not loaded (both loaded
      and non-loaded delete_all should behave the same. This is a huge
      problem when it comes to deleting many records because the query
      becomes very slow. Instead the SQL produced should be (DELETE FROM
      `assoicated_model` where `associated_model`.`parent_model_id`=1).
      
      I fixed this by making sure the check for loaded and destroy also
      makes sure that the dependent is not delete_all, so the conditional
      goes to the else and deletes the records directly without the IN
      statement.
      e247f325
  4. 31 3月, 2014 6 次提交
  5. 29 3月, 2014 2 次提交
  6. 28 3月, 2014 3 次提交
  7. 27 3月, 2014 7 次提交
  8. 26 3月, 2014 3 次提交
  9. 20 3月, 2014 4 次提交
  10. 18 3月, 2014 3 次提交
    • M
      Reap connections based on owning-thread death · 9e457a86
      Matthew Draper 提交于
      .. not a general timeout.
      
      Now, if a thread checks out a connection then dies, we can immediately
      recover that connection and re-use it.
      
      This should alleviate the pool exhaustion discussed in #12867. More
      importantly, it entirely avoids the potential issues of the reaper
      attempting to check whether connections are still active: as long as the
      owning thread is alive, the connection is its business alone.
      
      As a no-op reap is now trivial (only entails checking a thread status
      per connection), we can also perform one in-line any time we decide to
      sleep for a connection.
      9e457a86
    • M
      Teach PostgreSQLAdapter#reset! to actually reset · cc0d54bc
      Matthew Draper 提交于
      It wasn't doing anything beyond clearing the statement cache.
      cc0d54bc
    • E
      Update documentation on group method to indicate it takes an array · 6c821073
      Earl St Sauver 提交于
      The group method also takes an array, however this isn't immediately
      clear by reading the source since it delegates this method. If you
      trace it back to the AREL building you can see that it does support
      an array.
      
      Shoutout to @betovelandia for pointing this out.
      6c821073