Giter Site home page Giter Site logo

Comments (10)

kellydunn avatar kellydunn commented on July 22, 2024

πŸ‘ I am also getting this on MySQL 5.0.x and MySQL 5.1.x

After some brief investigation, it appears as though that there are a couple of MySQL support issues.

The first of which comes from using LIMIT inside of a subquery that gets constructed here.

The second issue is attempting to update a table of the same name it uses in a subquery here.

Both of which MySQL versions 5.1.x and 5.0.x do not support.
http://dev.mysql.com/doc/refman/5.0/en/subquery-restrictions.html

It would be nice if a core-contributor could chime in as to the purpose of these uses of limiting and updating. From an un-informed perspective, they seem uneeded as the code appears to only be concerned with a single eligible job at any point in time.

from delayed_job_active_record.

sferik avatar sferik commented on July 22, 2024

Those change were introduced in #29.

@scosman, can you work on a patch that works on MySQL as well as Postgres? Otherwise, I will need to revert your changes.

I'm going to work on making the tests run on MySQL, Postgres, and SQLite. Currently, the only run on SQLite. 😦

from delayed_job_active_record.

scosman avatar scosman commented on July 22, 2024

Sorry about that. Revert for now and I'll submit an update later (I don't have a MySQL install handy to test changes on).

What compatibility are you targeting for the project? Postgres, MySQL and SQLite?

from delayed_job_active_record.

kellydunn avatar kellydunn commented on July 22, 2024

In the meantime, using an earlier version of the gem (0.3.3 @f276ec2cb2) seems to be working with my local test suite.

I eagerly await the new changeset 😸

from delayed_job_active_record.

sferik avatar sferik commented on July 22, 2024

What compatibility are you targeting for the project? Postgres, MySQL and SQLite?

Yes, for now. Those are the three most popular open-source databases. This project can’t afford to test against commercial databases (Oracle, Microsoft SQL Server, etc.)

I should have tests running (and failing) under MySQL on Travis CI later today.

@scosman I can help you get MySQL up and running on your local machine. Even though you wrote this code, I don’t hold you responsible for the failure. I reviewed and merged your pull request and should have tested again MySQL. Let’s work on fixing this together. Let me know what time is convenient for you.

from delayed_job_active_record.

scosman avatar scosman commented on July 22, 2024

Unfortunately I don't have time to install MySQL this week, but this "should" fix the issue:
scosman@c9703fa

MySQL supports UPDATE...LIMIT which makes this easy using basic active_record updates. I couldn't test this fix as I don't have MySQL set up, but from reading AR/MySQL documentation it should work.

Anyone have a local environment to test on?

from delayed_job_active_record.

sferik avatar sferik commented on July 22, 2024

If someone can verify this fix, I'll merge it upstream. To do so, make the following change to your Gemfile:

-gem 'delayed_job_active_record'
+gem 'delayed_job_active_record', :git => '[email protected]:scosman/delayed_job_active_record.git'

The run the command

bundle install

from delayed_job_active_record.

jensblond avatar jensblond commented on July 22, 2024

Fixed worked for me. Thanks.

from delayed_job_active_record.

sferik avatar sferik commented on July 22, 2024

I got the tests running on Postgres, MySQL and SQLite on Travis. Then I applied @scosman's patch and everything passes. This ought to prevent database-specific failures in the future.

@scosman Thank you for pushing this patch so quickly!

@jensblond Thank you for testing this patch!

I'll release gem version 0.4.1 shortly.

from delayed_job_active_record.

duritong avatar duritong commented on July 22, 2024

Unfortunately, these changes do not work on PostgreSQL 8.4 which is for example what ships with RHEL6.

from delayed_job_active_record.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.