Permalink
Commits on Aug 18, 2017
  1. Fix MSSQL specs to not check for specific SQL

    jeremyevans committed Aug 18, 2017
    Adapter and integration specs should check for expected behavior,
    not for specific SQL, unless there is no feasible way to check
    for expected behavior.
Commits on Aug 16, 2017
  1. Use must_equal instead of must_match/must_include in core specs

    jeremyevans committed Aug 16, 2017
    Most of the must_match/must_include usage was required on
    ruby 1.8 due to unordered hashes.
Commits on Aug 15, 2017
  1. Make bin/sequel -M option always use base 10

    jeremyevans committed Aug 15, 2017
    Previously, if you prefixed with a 0, it would use base 8, which
    is not desired behavior, and an easy mistake to make since many
    users will copy and paste the number from the front of the
    filename, which often starts with 0 for integer migrations.
Commits on Aug 10, 2017
  1. Don't use savepoints when creating indexes inside a transaction on da…

    jeremyevans committed Aug 10, 2017
    …tabases that don't support transactional schema modifications (Fixes #1407)
    
    If the database doesn't support transactional schema
    modifications, you shouldn't be modifying schema inside a
    transaction, but if you are, it doesn't make sense to
    force the use of a savepoint.
Commits on Aug 7, 2017
  1. Small spec tweak and update CHANGELOG

    jeremyevans committed Aug 7, 2017
    Seems like a good idea to test that adding an index fails if you
    don't use :if_not_exists.
Commits on Aug 4, 2017
  1. Use identifier_mangling extension always if identifier mangling was set

    jeremyevans committed Aug 4, 2017
    Previously, if spec/spec_config.rb defined the DB constant directly,
    the extension wouldn't be added.
Commits on Aug 1, 2017
  1. Shorten pool timeout in one spec

    jeremyevans committed Aug 1, 2017
    This spec overrides assign_connection to return nil when it would
    normally return an available connection.  It's only used for
    testing the fallback code.  However, due to race conditions, it
    can result in the spec blocking until the timeout expires (still
    works correctly, just takes longer).
    
    Shortening the pool timeout from 5 seconds to 0.25 seconds makes
    losing the race not as painful.
  2. Bump version to 5.0

    jeremyevans committed Jul 31, 2017
    This is being done early instead of right before release, because
    most of the Sequel 5 changes have already been made.
  3. Don't use a placeholder literalizer inside Dataset#empty? in row_numb…

    jeremyevans committed Jul 28, 2017
    …er offset emulation
    
    The problem with the previous approach is it uses a placeholder
    literalizer and that messes up the column name when determining
    the columns, resulting in broken SQL when actually checking
    for an empty dataset.
  4. Replace Sequel.require with require_relative

    jeremyevans committed Jul 28, 2017
    Sequel.require was added because require_relative didn't exist
    in ruby 1.8.  It's better to use require_relative since that's
    the standard ruby way.
  5. Update bin specs

    jeremyevans committed Jul 28, 2017
    Put correct directory on the load path.
    
    Use :test=>false when connecting so that we don't make a connection
    and then delete the file.
    
    Change -L spec to not load all connection pools, fixing warning
    for setting USE_WAITER constant twice, since -L uses load and
    not require.
  6. Use Sequel.require in the connection pools

    jeremyevans committed Jul 28, 2017
    Now that external connection pools are not directly supported,
    Sequel.require should be used to ensure the correct code is
    loaded.
  7. Fix handling of invalid :pool_class symbols

    jeremyevans committed Jul 24, 2017
    Previously you couldn't hit the error, because the require
    would raise a LoadError.  It doesn't make sense to allow requiring
    random files if there is no way to register the entries.  In
    Sequel 5, non default pool classes need to be specified by having
    the :pool_class be a class instead of a non-default symbol.
  8. Make threaded connection pools not block while connections are being …

    jeremyevans committed Jul 24, 2017
    …made
    
    Previously, ConnectionPool#make_new was called with the pool mutex
    being held, which meant that if it takes a while to establish a
    connection, all other connection pool activity stops while the
    connection is being made.
    
    This refactors the connection pool so that make_new is called
    without the connection pool mutex, so only the thread that needs
    the new connection will block while the connection is being
    made.
    
    This also makes sure the connection pool condition variables
    correctly signal on disconnection, which previously could have
    led to to waiting for the pool timeout in low traffic situations
    (still returning a connection, but only after the timeout).
    
    This also fixes the threaded connection pool specs to use mutexes
    appropriately around arrays/hashes used in the specs, which should
    fix some occassional spec failures on JRuby.
    
    This modifies the ConnectionPool private API, so anyone calling
    private connection pool methods may need to update their code.
  9. SQL::Expression#clone and #dup now return self, since all expressions…

    jeremyevans committed Jul 24, 2017
    … should be frozen value objects
    
    This requires minor modifications to string_agg, which used
    dup.  Now it creates a new instance.
  10. Don't create empty arrays for unused association callbacks

    jeremyevans committed Jul 24, 2017
    Most associations don't use callbacks, and creating 7 extra arrays
    per association makes extra work for GC, plus it is faster to
    check if the entry exists before calling each as opposed to
    calling each every time (again, since most associations don't
    use callbacks).
  11. Access association methods using hash lookup instead of calling separ…

    jeremyevans committed Jul 24, 2017
    …ate method
    
    This saves a method call.
  12. Cache association method name symbols instead of recomputing them eve…

    jeremyevans committed Jul 24, 2017
    …rytime
    
    Looking up a symbol in a hash is significantly faster than building
    a symbol using interpolation.
  13. Don't keep track of input transformer order separately

    jeremyevans committed Jul 21, 2017
    This was necessary in 1.8, but in ruby 1.9 hashes are ordered.
  14. Bring back support for arrays of expressions in check/constraint sche…

    jeremyevans committed Jul 21, 2017
    …ma methods
    
    This was deprecated and then removed previously, but it probably
    should still be supported so that old migrations that rely on it
    do not break.
  15. Raise an exception if attempting to create a prepared statement using…

    jeremyevans committed Jul 21, 2017
    … a dataset with a delayed evaluation
    
    Preparing a dataset with a delayed evaluation makes no sense,
    since once the SQL is prepared, it the delayed evaluation will
    be ignored.
    
    Still allow the use of delayed evaluations when using bound
    variables without prepared statements.
  16. Make ConnectionPool#size thread safe by using the pool mutex

    jeremyevans committed Jul 21, 2017
    This introduces #_size for internal use and changes callers to
    use it.