Repository navigation
Apply result limits to queries without FROM - #129418
PedroTadim merged 4 commits into
Conversation
|
Workflow [PR], commit [ba6a002] Summary: ✅
AI ReviewSummaryReviewed head Final VerdictStatus: ✅ Approve |
Build profile diff (arm_release)Comparing ✅ No significant changes. Binary sizes
The official master build is compiled with Compile time of recompiled translation units8 translation units recompiled, 39 s compile time in total, 8 of them have a recent master baseline. |
|
🕵️ I compared the CI release build of One case to add to the test: Nit: the comment at |
|
Thanks for checking. I added the |
…opped exempting `system.one` from result limits #129418 made a single read of `system.one` ignore only quotas, not result limits. The query plan cache follows normal execution, so both the miss and the hit now reject the result with `TOO_MANY_ROWS_OR_BYTES`. CI report: https://s3.amazonaws.com/clickhouse-test-reports/praktika.html?PR=107125&sha=ac33f9a13fab50100f873f73b406f0ded58d6e32&name_0=PR&name_1=Stateless%20tests%20%28amd_debug%2C%20sequential%29 PR: #107125 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Closes: #129393
max_result_rowsandmax_result_bytesdid nothing for a query without FROM, or withFROM system.one. Such a query readssystem.one, which is in the list of system tables that skip quota and limits, soexecuteQuerynever added the result limits. The same happened to a whole UNION when one of its branches had no FROM, likeSELECT number FROM numbers(1000) UNION ALL SELECT 1. The same happened withsystem.quotas,system.quota_limits,system.quota_usageandsystem.quotas_usage. Now these tables only skip the quota, so you can still check an exhausted quota, but the limits always apply.InterpreterSelectQuerygets the same change, for backports to versions that still use it.The new test fails on the current master macOS build. I did not build the patched server locally, so CI has to confirm it.
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
max_result_rowsandmax_result_bytesare now applied to queries withoutFROMand to queries that read fromsystem.oneor the quota system tables.Workflow [PR]
Sync PR [sync-upstream/pr/129418]
Version info
26.11.1.1533-master(included in26.11and later)