php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #79272 Add PDO::ATTR_EMULATE_PREPARES support for SQLite
Submitted: 2020-02-13 19:45 UTC Modified: -
Votes:1
Avg. Score:3.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:0 (0.0%)
From: effulgentsia1 at gmail dot com Assigned:
Status: Open Package: PDO SQLite
PHP Version: Next Minor Version OS: All
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2020-02-13 19:45 UTC] effulgentsia1 at gmail dot com
Description:
------------
MySQL and PostgreSQL have limits of 65535 placeholders for native prepared statements. However, if more are passed, the PDO drivers fallback to emulating prepares, in which case the only limit is whatever the database server has configured for its SQL statement length limit (e.g., max_allowed_packet for MySQL).


However, SQLite has a default limit of 999 placeholders (https://bugs.php.net/bug.php?id=79269), and the PDO driver for it does not fallback to emulating prepares, or support the PDO::ATTR_EMULATE_PREPARES at all.

For Drupal, we use PDO and support MySQL, PostgreSQL, and SQLite. For consistency, it would be helpful if the PDO driver for SQLite also supported emulated prepares.


Test script:
---------------
Same as in https://bugs.php.net/bug.php?id=79269.


Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sat Oct 24 21:01:24 2020 UTC