You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[…] but it comes from ORM and it should be far from the Sqlite limits
No. This query is actually hitting the YYSTACKDEPTH limit of 100 (maybe SQLITE_MAX_EXPR_DEPTH would need to be increased as well). Doing so lets the query run (with pdo_sqlite and sqlite3). So this is nothing we can fix (except for the Windows builds, but I don't think it would make sense to deviate from the defaults in this case).
UPDATE - sqlite issue - https://sqlite.org/forum/forumpost/8652dfdbbe
UPDATE2 - fixed as of Sqlite 3.46.0 - sqlite/sqlite@7659ce22c5
https://pastebin.com/MQKYuSYG simplest repro
https://github.com/sqlite/sqlite/blob/version-3.44.0/src/parse.y#L1090 expr parenthesis consuming stack
https://github.com/sqlite/sqlite/blob/version-3.44.0/src/parse.y#L917 where kw consuming stack
Description
Given the following DB structure:
PDO Sqlite fails to execute the following query:
It may seems to be complex query, but it comes from ORM and it should be far from the Sqlite limits
(according to the Sqlite doc the default expr depth limit is 1000 - https://www.sqlite.org/limits.html#max_expr_depth)
PHP thows:
PDOException: SQLSTATE[HY000]: General error: 1 parser stack overflow
The query is failing with Sqlite only, with MySQL or MSSQL it can complete (but of course the SQL needs different identifier/literal escapes)
PHP Version
any
Operating System
any
The text was updated successfully, but these errors were encountered: