Bug report
When executing large SQL queries with a high number of named parameters (e.g. a
Doctrine IN (...) clause with hundreds of values), the useQuestionMarkPlaceholders()
method in PDOIntegration.php triggers a fatal error due to catastrophic backtracking
in its PCRE regex.
Steps to reproduce
- Execute a SQL query with a large number of named parameters, for example:
SELECT * FROM products WHERE id IN (:id_0, :id_1, ..., :id_500)
- Observe a fatal error after 30 seconds
Error
Fatal error: Maximum execution time of 30 seconds exceeded in
/opt/datadog/dd-library/1.19.0/dd-trace-sources/src/DDTrace/Integrations/PDO/PDOIntegration.php on line 363
PHP version
7.3.31
Tracer or profiler version
1.19.0
Installed extensions
No response
Output of phpinfo()
No response
Upgrading from
1.16.0
Bug report
When executing large SQL queries with a high number of named parameters (e.g. a
Doctrine
IN (...)clause with hundreds of values), theuseQuestionMarkPlaceholders()method in
PDOIntegration.phptriggers a fatal error due to catastrophic backtrackingin its PCRE regex.
Steps to reproduce
SELECT * FROM products WHERE id IN (:id_0, :id_1, ..., :id_500)
Error
Fatal error: Maximum execution time of 30 seconds exceeded in
/opt/datadog/dd-library/1.19.0/dd-trace-sources/src/DDTrace/Integrations/PDO/PDOIntegration.php on line 363
PHP version
7.3.31
Tracer or profiler version
1.19.0
Installed extensions
No response
Output of
phpinfo()No response
Upgrading from
1.16.0