v.23.3Improvement

Fix hyperscan pattern repeat heuristics

Fix heuristics that check hyperscan patterns for problematic repeats. #46819 (Robert Schulze).
Improved heuristics to detect problematic repeating patterns in Hyperscan, reducing errors and improving pattern matching reliability.

Why it matters

This feature addresses issues with the detection of problematic repeating patterns in Hyperscan used by ClickHouse. By fixing the heuristics, it prevents incorrect matches and potential performance degradation, ensuring more accurate and efficient pattern matching for users relying on Hyperscan-based searches.

How to use it

Users benefit from this improvement automatically when upgrading to the new ClickHouse version. No additional configuration is required to enable the fixed heuristics for Hyperscan pattern checking.