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
{{ message }}
Repository navigation
Commit 93a0575
Browse filesBrowse the repository at this point in the historyBrowse files
fix(sqlite): bound REGEXP cache and tighten error handling
- REGEXP UDF: cap pattern length at 512 chars and FIFO-evict the
delimited-pattern cache at 256 entries. Switch the delimiter to
chr(1) so user-supplied forward slashes / backslashes aren't
re-escaped. Long-lived adapters can no longer be grown without
bound by distinct user patterns.
- resolveFulltextTableById: narrow the blanket Throwable catch to
NotFoundException so genuine PDO errors don't fall through to
the single-candidate FTS5 drop and tear down the wrong table.
- setTenant / setNamespace / setSharedTables: invalidate the FTS
table cache after the parent setter so a thrown validation
doesn't leave us with a cleared cache against the prior value.
- getSQLIndexType: throw on Database::INDEX_FULLTEXT instead of
silently returning 'INDEX' — the FTS5 path goes through
createFulltextIndex; reaching that case is a programmer error
that should surface, not be papered over.
// Metadata not yet seeded (collection drop during bootstrap).
1062
+
// Anything else surfaces — masking PDO errors here would silently
1063
+
// fall through to the single-candidate drop path and tear down
1064
+
// the wrong table.
1020
1065
returnnull;
1021
1066
}
1022
1067
@@ -1674,11 +1719,10 @@ protected function getSQLIndexType(string $type): string
1674
1719
return'UNIQUE INDEX';
1675
1720
1676
1721
case Database::INDEX_FULLTEXT:
1677
-
// Fulltext is handled via FTS5 virtual tables, not regular
1678
-
// CREATE INDEX, so this branch should never reach SQL
1679
-
// generation. Returning a placeholder keeps the contract
1680
-
// satisfied for any introspection callers.
1681
-
return'INDEX';
1722
+
// Fulltext is handled via FTS5 virtual tables in
1723
+
// createFulltextIndex; reaching this codepath means a
1724
+
// caller bypassed that route and would emit invalid SQL.
1725
+
thrownewDatabaseException('Fulltext indexes use createFulltextIndex(), not getSQLIndexType');
1682
1726
1683
1727
default:
1684
1728
thrownewDatabaseException('Unknown index type: ' . $type . '. Must be one of ' . Database::INDEX_KEY . ', ' . Database::INDEX_UNIQUE . ', ' . Database::INDEX_FULLTEXT);
0 commit comments