SQL syntax error
Closed this issue · 6 comments
Running Navvy::Worker.start
After it runs my task, it calls count_all and raises this issue:
Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '== '4' OR parent_id
== '4') AND failed_at
IS NOT NULL)' at line 1: SELECT count(*) AS count_all FROM jobs
WHERE ((id
== '4' OR parent_id
== '4') AND failed_at
IS NOT NULL).
The problem is it should be id
= '4' OR parent_id
= '4' (and not double '==')
Issue was fixed in my fork:
http://github.com/anlek/navvy/commit/ebcb1192bd5cad4925cea0a8aedbc62f55fc683d
My fixed seems to have caused a stack level too deep error
Never mind, my code had the stack level too deep, not the navvy code...
Hi Anlek,
Thanks a lot for creating the issue and fixing it. I pulled it in and pushed it to master. Also, the gem has been updated. Just re-install the gem and you'll be fine.
I have been testing Navvy on sqlite only -- and sqlite passes on this -- so I'll probably try to run its tests with MySQL sometime.
Thanks! :)
- Jeff
Glad I could help out (first project I got my code pulled ;)
However, the gem doesn't seem to be updated.
It was a great fix. ;) The gem has been updated, sorry for that. :)