Problem/Motivation
In some SQL implementations (NuoDB in our case) "next" is a keyword, which causes errors when executing the db_select in job_scheduler_cron().
Proposed resolution
Change driver to escape keywords.
Remaining tasks
Escape potential keywords
User interface changes
API changes
Data model changes
Original report by xenophyle
In some SQL implementations (NuoDB in our case) "next" is a keyword, which causes errors when executing the db_select in job_scheduler_cron().
PDOException: SQLSTATE[42000]: Syntax error or access violation: -1 syntax error on line 4 WHERE (scheduled = ?) AND (next <= ?) ^ expected VALUE got < : SELECT job_schedule.* FROM {job_schedule} job_schedule WHERE (scheduled = :db_condition_placeholder_0) AND (next <= :db_condition_placeholder_1) ORDER BY next ASC OFFSET 0 FETCH 200; Array ( [:db_condition_placeholder_0] => 0 [:db_condition_placeholder_1] => 1444398681 ) in job_scheduler_cron() (line 65 of sites/all/modules/contrib/job_scheduler/job_scheduler.module)
Comments
Comment #2
intrafusionPlease follow the Issue Summary Template standards
Comment #3
mmjvb CreditAttribution: mmjvb as a volunteer commentedWould expect the driver to escape keywords. Or do it yourself in the query. Even for NuoDB keywords can be escaped by backticks.
Comment #4
intrafusionI think the correct way to deal with this would be to rename the fields using reserved keywords as the module already uses dB_select, etc. and you cannot escape keywords in these functions.
Comment #5
mmjvb CreditAttribution: mmjvb as a volunteer commentedhttps://cgit.drupalcode.org/d7_nuodb_driver/tree/nuodb/database.inc
Checked the driver itself and found:
Looks like it has already been taken care of.
Comment #6
intrafusion