Permalink
Switch branches/tags
Commits on Jul 17, 2012
  1. Merge pull request #7076 from kennyj/fix_class_eval

    tenderlove committed Jul 17, 2012
    Fix class_eval without __FILE__ and __LINE__.
  2. Merge pull request #7072 from beerlington/fix_validations_with_scope

    jonleighton committed Jul 17, 2012
    Use database value for uniqueness validation scope
  3. Fixes "Cannot visit ..." with validates_uniqueness_of

    beerlington committed Jul 17, 2012
    Fixes issue with overrding ActiveRecord reader methods with a
    composed object and using that attribute as the scope of a
    validates_uniqueness_of validation.
Commits on Jul 16, 2012
  1. Merge pull request #7006 from jaredbeck/issue_7005_explain_asset_debug

    drogus committed Jul 16, 2012
    A more informative comment for config.asset.debug
  2. A more informative comment for config.asset.debug

    Jared Beck committed Jul 16, 2012
  3. Merge pull request #7066 from wkang/master

    rafaelfranca committed Jul 16, 2012
    Fix activerecord model to_ary method comment 'see also' link
Commits on Jul 15, 2012
Commits on Jul 14, 2012
  1. adds a missing require [fixes #6896]

    fxn committed Jul 14, 2012
    This file uses Time.zone, which is defined in
    active_support/core_ext/time/zones.rb.
  2. Merge pull request #7057 from kennyj/fix_sql_bypass_problem

    rafaelfranca committed Jul 14, 2012
    Fix SqlBypass.data_column problem.
  3. Fix SqlBypass.data_column= problem. SqlBypass.find_by_session_id meth…

    kennyj committed Jul 14, 2012
    …od didn't use this assignment.
  4. Merge pull request #7056 from kennyj/avoid_twice_call

    rafaelfranca committed Jul 14, 2012
    Avoid to call send(store_attribute) twice.
  5. Merge pull request #7053 from pferdefleisch/activesupport-timely-requ…

    fxn committed Jul 14, 2012
    …ires
    
    Added time related req files to AS core_ext #6896
  6. Added time related req files to AS core_ext #6896

    mraaroncruz committed Jul 14, 2012
    This way you can `require 'active_record/core_ext/time'` for example
    I see these libs are available through `active_record/time` but not
    individually
Commits on Jul 13, 2012
  1. fixing tests to deal with data differences between prepared statement…

    tenderlove committed Jul 13, 2012
    …s and non-prepared statements
    
    Conflicts:
    	activerecord/test/cases/query_cache_test.rb
  2. Fixing texts; down to three failing tests.

    jeremycole committed with tenderlove Jul 13, 2012
    Conflicts:
    	activerecord/lib/active_record/connection_adapters/abstract_mysql_adapter.rb
  3. Only use prepared statements when bind variables are present

    jeremycole committed with tenderlove Jul 13, 2012
    Prepared statements (prepare/execute/close) were being used unnecessarily
    when no bind variables were present, and disabling prepared statement using
    prepared_statements:false was principally broken. While bind variables were
    correctly substituted with prepared_statements:false, the prepared statement
    interface was still used, costing an extra two round trips per query.
    
    In addition to making this behavioral change, I also cleaned up the internals
    of exec_stmt and exec_without_stmt so that they behave the same (calling log
    and constructing the ActiveRecord::Result in the same way).
    
    Moving the check for binds.empty? to exec_query also will mean that several
    code paths explicitly calling exec_without_stmt could be cleaned up to once
    again call exec_query instead. I have also left the check for binds.empty? in
    exec_stmt, since it is not a private method and could be called directly with
    an empty binds array. For the sake of clarity in this patch, I have not made
    those changes.
    
    = The previous behavior =
    
    When issuing a Foo.find(1) with prepared_statements:true, the bind variable
    is present in the prepared query, and execute shows a value passed:
    
        Connect	root@localhost on rails_test
        Query	SET SQL_AUTO_IS_NULL=0
        Statistics
        Query	SHOW FULL FIELDS FROM `foos`
        Query	SHOW TABLES LIKE 'foos'
        Query	SHOW CREATE TABLE `foos`
        Prepare	SELECT  `foos`.* FROM `foos`  WHERE `foos`.`id` = ? LIMIT 1
        Execute	SELECT  `foos`.* FROM `foos`  WHERE `foos`.`id` = 1 LIMIT 1
        Close stmt
        Quit
    
    When issuing a Foo.find(1) with prepared_statements:false, the bind variable
    has already been removed and substituted with the value, but the prepared
    statement interface is used anyway:
    
        Connect	root@localhost on rails_test
        Query	SET SQL_AUTO_IS_NULL=0
        Statistics
        Query	SHOW FULL FIELDS FROM `foos`
        Query	SHOW TABLES LIKE 'foos'
        Query	SHOW CREATE TABLE `foos`
        Prepare	SELECT  `foos`.* FROM `foos`  WHERE `foos`.`id` = 1 LIMIT 1
        Execute	SELECT  `foos`.* FROM `foos`  WHERE `foos`.`id` = 1 LIMIT 1
        Close stmt
        Quit
    
    = With this patch applied =
    
    When issuing a Foo.find(1) with prepared_statements:true, the bind variable
    is present in the prepared query, and execute shows a value passed:
    
        Connect	root@localhost on rails_test
        Query	SET SQL_AUTO_IS_NULL=0
        Statistics
        Query	SHOW FULL FIELDS FROM `foos`
        Query	SHOW TABLES LIKE 'foos'
        Query	SHOW CREATE TABLE `foos`
        Prepare	SELECT  `foos`.* FROM `foos`  WHERE `foos`.`id` = ? LIMIT 1
        Execute	SELECT  `foos`.* FROM `foos`  WHERE `foos`.`id` = 1 LIMIT 1
        Close stmt
        Quit
    
    When issuing a Foo.find(1) with prepared_statements:false, the bind variable
    has been removed and substituted with the value, and the query interface is
    used instead of the prepared statement interface:
    
        Connect	root@localhost on rails_test
        Query	SET SQL_AUTO_IS_NULL=0
        Statistics
        Query	SHOW FULL FIELDS FROM `foos`
        Query	SHOW TABLES LIKE 'foos'
        Query	SHOW CREATE TABLE `foos`
        Query	SELECT  `foos`.* FROM `foos`  WHERE `foos`.`id` = 1 LIMIT 1
        Quit
  4. Merge pull request #7048 from kennyj/tiny_fixes

    rafaelfranca committed Jul 13, 2012
    [tiny fixes] Remove more duplicated code.
  5. Remove instance level quote_value method. This method is private and …

    kennyj committed Jul 9, 2012
    …also exists in class method.
  6. Merge pull request #7045 from kennyj/remove_duplicated_code_20120714

    rafaelfranca committed Jul 13, 2012
    Remove duplicated code in the AR::Store.
  7. Merge pull request #7044 from kytrinyx/documentation-ar-unit-tests

    fxn committed Jul 13, 2012
    Add note about needing mysql superuser for unit tests.
  8. add note about requiring gem dependencies before initialization [ci s…

    Francesco Rodriguez committed Jul 12, 2012
    …kip]