Wrong UPDATE sql query for postgresql db #37

merged 1 commit into from Feb 25, 2013


None yet
2 participants

shiroginne commented Feb 25, 2013

there is a typo mistake in lib/delayed/backend/active_record.rb method:

        def self.reserve(worker, max_run_time = Worker.max_run_time)
            quotedTableName = ::ActiveRecord::Base.connection.quote_column_name(self.table_name)

the var name quotedTableName but method is quote_column_name, it generate wrong table_name for query, when postgres makes query with schema, it crashes with table relation error.
The method is big and I can't write test for this, but I think, generate query logic can be moved to separate method and can be tested.

sferik added a commit that referenced this pull request Feb 25, 2013

Merge pull request #37 from shiroginne/master
Wrong UPDATE sql query for postgresql db

@sferik sferik merged commit dcef79a into collectiveidea:master Feb 25, 2013

1 check passed

default The Travis build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment