Bug Report
pdo_mysql driver
Summary
Double quotes parameters in LIMIT and OFFSET
Current behavior
MySQL query like the following:
$query = "
SELECT *
FROM my_table
LIMIT :limit OFFSET :offset";
$qb->executeQuery($query, ['limit' => 10, 'offset' => 2]);
Throws an exception. It appears the SQL is being run as:
SELECT *
FROM my_table
LIMIT ''10'' OFFSET ''2''
My temporary fix was not to use parameters in the limit or offset, but shouldn't this be supported?
Expected behavior
The parameters passed in to the executeQuery functions are int parameters. I wouldn't expect them to be treated as strings.
SELECT *
FROM my_table
LIMIT 10 OFFSET 2
This is what I'd expect the SQL to be.