Repository navigation
Docs: fix the "Permissions for queries" page (HTTP readonly default, lightweight UPDATE and DELETE, mutations, RBAC) - #118184
Conversation
The page is what an operator reads to learn which statements each value of `readonly` and `allow_ddl` permits, and it was both incomplete and wrong. It was written when those two settings were the whole story and was never re-derived as the code grew: every permission decision now runs through `ContextAccess::checkAccessImplHelper` (`ContextAccess.cpp:690-886`), whose flag sets the page's taxonomy predates. On a permissions page a false sentence is worse than a gap, because a "locked-down" session gets built on it. Corrected, each against the enforcing line and measured on a running server as a real user: - lightweight `DELETE` and `UPDATE` and `ALTER TABLE ... DELETE`/`UPDATE` were missing from "Write data queries", and there was no access management category at all. - The HTTP paragraph said the `GET` method sets `readonly = 1`. It is `2` (`setReadOnlyIfHTTPMethodIdempotent.cpp:34-35`), the trigger is any method other than `POST`, and it applies only when the effective value is 0, so a profile that already pins a stricter value keeps it. - The refusal list is now enumerated rather than quantified. Both `not_readonly_flags` (`:828`) and its complement are open sets, so "all DDL queries" was falsifiable as written; `CREATE_TEMPORARY_TABLE` is in neither `table_ddl` nor `ddl_flags`, and temporary tables are exempt above both gates (`:733-741`). - The `<Tip>` calling `EXISTS`, `DESCRIBE`, `EXPLAIN` and `SHOW PROCESSLIST` "equivalent to `SELECT`" is removed. They are authorized with `SHOW_*` and `SHOW_COLUMNS`, not `SELECT`, and `EXPLAIN PIPELINE INSERT` reaches the `INSERT` check, which `readonly` refuses. - `allow_ddl = 0` now names the privileges it blocks. It blocks neither `CREATE TEMPORARY TABLE`, named collection management and `ALTER DATABASE ... MODIFY SETTING`, nor granting: `:871` exempts the grant-option path. - `KILL QUERY` is qualified on both dimensions. Killing your own query consults no privilege (`InterpreterKillQueryQuery.cpp:112-125`), while another user's query and any `ON CLUSTER` form require `KILL QUERY`, which is in `not_readonly_flags`. The `ON CLUSTER` path has no ownership branch at all (`:209-214` to `:473-479`). - A new section covers `allow_introspection_functions`, the third setting inside the permission decision (`ContextAccessParams.cpp:203-205` names exactly three), and `allow_non_metadata_alters`. `readonly` was documented in three places, worded inconsistently. The `DECLARE` in `src/Core/Settings.cpp` keeps the value semantics and is left untouched, since its "changing explicitly allowed settings" already covers both mechanisms in `SettingsConstraints::getChecker`. This page keeps the query-class semantics and loses its duplicated `Possible values:` block. `constraints-on-settings#read-only` keeps only the disambiguation between the `readonly` setting and the `readonly` constraint type, which exists nowhere else, and links on. One copy per aspect. `table-functions/index.mdx` asserted the opposite of this page, that table functions need `allow_ddl`. They need `CREATE_TEMPORARY_TABLE` (`ITableFunction.cpp:78-80`), which is not in `ddl_flags`, so it is `readonly = 1` that blocks them. No test is added: `00305_http_and_readonly.sh` with its reference already asserts the HTTP value, and `00716_allow_ddl.sql:6-7` already pins that `allow_ddl = 0` refuses `ALTER ... DELETE` and `RENAME`. That last one also settles a point in the report: the `ALTER` mutations write data, but their privileges are `ALTER DELETE` and `ALTER UPDATE` inside the `ALTER TABLE` group, so `allow_ddl` does refuse them, and the page states the measured behaviour.
Follow-up to the previous commit on this branch. Four sentences it shipped are false against the code they describe, and one link lost its checker coverage. Each correction below is measured on a running server as a real user, since `Context.cpp:2455` sets `full_access = !user_id` and a no-user context passes every check. - The HTTP paragraph contradicted itself and was wrong twice. A `readonly` parameter in the query string is not applied and clamped: `SettingsConstraints` refuses any change to `readonly` while the current value exceeds 1 (`:620-621`), testing only the current value, so a *stricter* `?readonly=1` is refused as well. Only a value equal to the one already in force survives, because an unchanged value is dropped before the checker runs (`:362-364`, `:390-398`). An explicitly configured `readonly = 0` is not kept either: the bump tests `== 0` (`setReadOnlyIfHTTPMethodIdempotent.cpp:34-35`) and cannot tell an explicit 0 from the default, so only stricter values survive. And the opening "any method other than `POST` implies read-only" plus the closing "use `POST` to modify data" both denied the paragraph's own `PUT`/`DELETE` parenthetical, which `04306_create_handler_http.sh:117-124` shows is the true half. - `allow_ddl = 0` does not block `ALTER TABLE ... ATTACH PARTITION`. It requires only `INSERT` (`InterpreterAlterQuery.cpp:833-837`), and `ddl_flags` (`ContextAccess.cpp:831`) contains no `INSERT`, though `not_readonly_flags` (`:828`) does, so `readonly` blocks it while `allow_ddl` does not. The error was in the permissive direction: an operator relying on `allow_ddl = 0` to stop data being attached to a table was misled. The sibling `DETACH PARTITION` reaches `ALTER_DELETE` and is blocked, so the asymmetry sits inside the pair the sentence names, and both `ATTACH` spellings map to the same command type (`ParserAlterQuery.cpp:657,689`). - Killing your own query does need a privilege. It does not need `KILL QUERY`, but `InterpreterKillQueryQuery.cpp:221` reads `system.processes` before the same-user exemption at `:114-121`, that table is absent from `always_accessible_tables` (`ContextAccess.cpp:200-235`), and `select_from_system_db_requires_grant` defaults to true (`AccessControl.cpp:300`). Revoking that one grant turns the kill into `ACCESS_DENIED` naming it, and the target query survives. - The `readonly` section said nothing about `GRANT`, which `readonly` refuses (`ContextAccess.cpp:855-856`, on every grant-option check regardless of flags), while the `allow_ddl` note volunteers that it does not restrict access management. Read together the two sections implied neither setting restricts granting. `REVOKE` (`InterpreterGrantQuery.cpp:194-195`) and `GRANT CURRENT GRANTS` (`:506-507`) genuinely are not gated, so the page now gives the split rather than either half. `readonly` is backticked in the `table-functions` note, and a blank line follows each `<Note>`: without it CommonMark treats the first paragraph as a raw HTML block, so `lychee` never extracts the link and the blocking internal-links check gives it no coverage. Verified both ways, and this restores coverage the previous commit would otherwise have removed from the `[HTTP interface]` link. Role grants and `SET ROLE` stay undocumented on purpose while their behaviour is still under discussion. Co-Authored-By: Claude Opus 5 <[email protected]>
Three claims on the page named a statement spelling that stands for a family of forms whose privileges differ, so each was true of some forms and false of others. ALTER DATABASE is restricted by neither setting. ALTER_DATABASE_SETTINGS and ALTER_MODIFY_DATABASE_COMMENT sit in the ALTER_DATABASE group, a sibling of ALTER_TABLE, and ContextAccess.cpp names neither of them, so the bare ALTER in the refusal list is narrowed to ALTER TABLE and ALTER VIEW and the allow_ddl note now carries both settings for that statement. The allow_ddl carve-out for ATTACH PARTITION was wrong in both directions. ATTACH PARTITION ... FROM parses to REPLACE_PARTITION, which needs ALTER DELETE in the same access element, so allow_ddl = 0 does block that spelling; ATTACH PART needs only INSERT and was not named. REVOKE ... ON CLUSTER is refused by readonly. The on-cluster branch sets grant_option on revoked elements and checks them before the local fast path is reached, so only the local form is ungated. A systematic pass over the two sentences that name statement spellings rather than privileges found one more instance of the same defect: named collection management is in neither flag set, because NAMED_COLLECTION_ADMIN descends from ALL rather than from ACCESS_MANAGEMENT, so readonly does not restrict it. Every claim was measured against a running server as real users, with each arm sharing one session with its own controls, and with an ordering proof wherever a statement was observed to succeed. Also removes the readonly default value restated on this page, since the section already delegates the values and the default to the settings reference, and says "Some" rather than "A few" for the table functions allowed in read-only mode, since 24 of them set allow_readonly.
The `readonly` DDL enumeration said `TRUNCATE`, which reads as a claim about every statement spelled with that word. It now says `TRUNCATE TABLE`, the statement whose privilege the setting refuses, so the entry is true of every form it names. The DDL taxonomy at the top of the page and the `allow_ddl` privilege list keep the bare word on purpose: the first classifies the statement, the second is attributed to privileges rather than to statements. The table-function note said "you can't use them", which is broader than the gate it describes. The `CREATE TEMPORARY TABLE` check runs in `ITableFunction::execute`, so the note now names the verbs that reach it, a `SELECT` or an `INSERT` that executes the function. That is also the wording the permissions page already uses for the same rule. Co-Authored-By: Claude Opus 5 <[email protected]>
Two sentences added earlier in this PR named a statement family whose members differ, so each was true of some members and false of others. Both erred in the unsafe direction: they promised a restriction that does not exist, so an operator hardening a session would have been misled. The blocked-privileges bullet and the `ATTACH PARTITION` carve-out were unscoped. `ContextAccess::checkAccessImplHelper` returns `access_granted()` when the target is in the temporary database (`src/Access/ContextAccess.cpp:739`, inside `if (parameter_type == AccessFlags::NONE)` at `:732`), and that early return sits above both the `readonly` gate (`:853-869`) and the `allow_ddl` gate (`:871-876`). Every table-level privilege on an existing temporary table therefore escapes both settings, not just the `INSERT` and `DROP TABLE` the page named. Measured as a real user: `ALTER TABLE <temporary> MODIFY COLUMN` succeeds at `allow_ddl = 0` and at `readonly = 2` and the column type does change, while the same statement on a persistent table in the same session returns `QUERY_IS_PROHIBITED` and `READONLY` and the type does not move. `ATTACH PARTITION` on a temporary `MergeTree` also succeeds at `readonly = 2`, since it needs `INSERT` alone (`InterpreterAlterQuery.cpp:833-836`), against a persistent control refused with `READONLY`. The exemption sentence keeps its "a session that may create one" precondition, because creating a temporary table is not exempt: `CREATE_TEMPORARY_TABLE` is `not_readonly_1_flags` (`ContextAccess.cpp:829`), so `readonly = 1` refuses it. It stays a verb list rather than a universal quantifier, because the early return is guarded by `parameter_type == AccessFlags::NONE` and a privilege carrying a parameter type does not take it. "Access management queries are unaffected by `allow_ddl`" was true of the statement and false of an embedded `SETTINGS` clause. `CREATE` and `ALTER` of a user, a role or a settings profile run that clause through the session's own settings constraints (`InterpreterCreateUserQuery.cpp:318`, `InterpreterCreateRoleQuery.cpp:66`, `InterpreterCreateSettingsProfileQuery.cpp:71`), and `SettingsConstraints::getChecker`'s first branch refuses `allow_ddl` when the session already has it disabled (`SettingsConstraints.cpp:610-611`). The qualifier "when it changes the value" is measured rather than inferred: an unchanged value never reaches `getChecker`, because `getNewValueToCheck` returns an empty `Field` on the `!ignore_unchanged_settings` branch (`SettingsConstraints.cpp:361-362`) and `checkImpl` returns on `new_value.isNull()` (`:435-436`). So `SETTINGS allow_ddl = 1` is refused while `SETTINGS allow_ddl = 0` in a session already at 0 is accepted. All six `CREATE`/`ALTER` by user/role/settings-profile combinations were measured, and `SETTINGS allow_introspection_functions = 1` was measured accepted, which confines the new sentence to `allow_ddl`. The `readonly` section gets no symmetric sentence. Under any `readonly > 0` the access-management statement is already refused by the access gate, because `write_dcl_access` is inside `not_readonly_flags` (`ContextAccess.cpp:826,828`), so no embedded-setting case is reachable there. Also adds the blank line after the `allow_ddl` `<Note>` opening tag, so its first paragraph is parsed as Markdown like the other two Notes on the page. Co-Authored-By: Claude Opus 5 <[email protected]>
Each of the three narrowed sentences was added earlier in this PR to fix a finding, and each replacement carried a new imprecision in the same unsafe direction: it promised a restriction, or an exemption, wider than the one the enforcement code implements. `REVOKE ... ON CLUSTER` is refused only for privileges. A role revocation and a privilege revocation take different authorization paths. For `REVOKE <role> FROM <user> ON CLUSTER` there are no privilege elements, so `getRequiredAccessForExecutingOnCluster` returns an empty `AccessRightsElements` and its `element.grant_option = true` stamping has nothing to stamp (`src/Interpreters/Access/InterpreterGrantQuery.cpp:269-275`). Authorization runs instead through `checkAdminOptionForExecutingOnCluster` (`:281-314`), and because `ROLE_ADMIN` sits inside `write_dcl_access` and therefore inside `not_readonly_flags` (`src/Access/ContextAccess.cpp:828`), `isGranted(AccessType::ROLE_ADMIN)` is false in a read-only session and the code falls to the per-role `checkAdminOption`. That path has no `readonly` gate: the only `readonly` sites in that file are `:493`, `:828-829` and `:853-867`. `executeDDLQueryOnCluster.cpp:187` then checks the empty list and passes. Measured in one `readonly = 1` session as a real user holding the role with admin option: `REVOKE <role> FROM <user> ON CLUSTER` succeeds and the grant disappears from `SHOW GRANTS`, while `REVOKE SELECT ON <table> FROM <role> ON CLUSTER` in that same session returns `Cannot change grants in readonly mode` and the privilege survives. The page stays silent about role grants, which ClickHouse#115691 contests. The embedded `allow_ddl` clause is keyed on the session, not on the change. "Refused when it changes the value" has no stated antecedent, and read as target-relative it is false in both directions. `SettingsConstraints.cpp:611-612` returns the Checker on `!current_settings[Setting::allow_ddl]` alone, with no reference to the target entity's stored value, and `getNewValueToCheck` (`:362-363`) drops a change whose value equals the session's current value before the checker is consulted. So `SETTINGS allow_ddl = 1` is refused while the session has 0, and `SETTINGS allow_ddl = 0` is accepted, which is what the measurements in this PR already showed. A `PUT` or `DELETE` at a SQL-defined handler can modify data only while the effective `readonly` is 0. `setReadOnlyIfHTTPMethodIdempotent` can only raise the value from 0 to 2: when the method is mutating the whole forcing block is skipped, and the forcing itself is guarded by `if (context->getSettingsRef()[Setting::readonly] == 0)` (`src/Server/HTTP/setReadOnlyIfHTTPMethodIdempotent.cpp:23-36`). It never lowers a value, so a user whose profile pins `readonly = 1` carries that value into the request and a modifying query is still refused. The unconditional clause contradicted the paragraph's own preceding sentence about a stricter profile value being kept. Measured against a handler declared `METHODS (PUT)`: the handler's query sees `readonly` 1 for a user whose profile pins 1 and 0 for an unrestricted user, and an `INSERT` through it is refused for the former with `Cannot execute query in readonly mode` while inserting a row for the latter. The same sentence stops naming `CREATE HANDLER` as the only origin, since `ALTER HANDLER ... METHODS (...)` can also supply the accepted method set (`src/Common/SQLDefinedHandlers/SQLDefinedHandlerFromAST.cpp:574-575`), and now links the statement. `UNDROP TABLE` joins the list of statements neither setting restricts. `AccessType.h:273` declares it with parent `ALL`, so the flag is in neither `ddl_flags` (`ContextAccess.cpp:831`) nor `not_readonly_flags` (`:828`), and `InterpreterUndropQuery.cpp:33` checks only `AccessType::UNDROP_TABLE`. Measured as OK at `allow_ddl = 0` and at `readonly = 1`, in each case against a `CREATE TABLE` control refused in the same session, and against a `DROP TABLE` of the same table refused by both settings. Co-Authored-By: Claude Opus 5 <[email protected]>
Internal second-model reviewEvery sentence on these pages was re-derived from the enforcing source and then measured on a running
💡 One residual, disclosed and not raised: with the The 8 localized copies of each page are deliberately untouched; the translation workflow generates them. |
|
cc @pufit, could you review this? It re-derives the "Permissions for queries" page from the three gate blocks in |
|
Workflow [PR], commit [79ed43c] Summary: ✅ AI ReviewSummaryThis PR substantially improves the Findings
Final Verdict
|
…adata_alters` rule Two claims on the page were narrower than the code enforces. `readonly = 2` was documented as adding only `SET` and `CREATE TEMPORARY TABLE`. `src/Backups/BackupsWorker.cpp:986` refuses `RESTORE` at `readonly == 1` only, and `src/Backups/RestorerFromBackup.cpp:378-381` tests `AccessRights::contains` directly and returns before `context->checkAccess`, so the readonly gate in `checkAccessImplHelper` is never reached for a session that already holds the required rights. Measured on a running server: at `readonly = 2` a `RESTORE TABLE ... AS <new table>` creates the table and loads its rows, while the same statement at `readonly = 1` gives `Cannot execute RESTORE in readonly mode`; an `INSERT` in that same `readonly = 2` session is still refused with `Code: 164`. An HTTP `GET` request, which runs at `readonly = 2`, restores as well. Every read of `Setting::readonly` in `src/` was enumerated, and exactly three sites discriminate 1 from 2: `src/Access/SettingsConstraints.cpp:631` (`SET`), `src/Access/ContextAccess.cpp:858` (`CREATE TEMPORARY TABLE`) and the `RESTORE` site above. The list is therefore complete, which is why it stays an enumeration rather than becoming open-ended. `allow_non_metadata_alters` was documented as refusing an `ALTER` that changes metadata and would also rewrite data. `src/Storages/MergeTree/MergeTreeData.cpp:5040-5049` keys on whether the command yields mutation commands, not on whether metadata changes, so `CLEAR COLUMN`, `CLEAR INDEX` and `CLEAR PROJECTION` are refused too. Measured: `CLEAR COLUMN` gives `Code: 524` when the setting is disabled, and when it is enabled it leaves `create_table_query` byte-identical while blanking the column's values. The refused forms are now given by example rather than as a universal, because the standalone mutations `ALTER ... DELETE`, `ALTER ... UPDATE` and the whole `MATERIALIZE` family are permitted when the setting is disabled, so a "requires a mutation" rule would be false for them. Both claims were raised by the automated reviewer on this pull request. Co-Authored-By: Claude Opus 5 <[email protected]>
…mands The previous wording said "a command that changes the columns, indexes, projections or TTL", which does not separate a definition change from a data change: `ALTER ... UPDATE` changes column values and `MATERIALIZE INDEX` builds index data, so both read as covered by that phrase while `src/Storages/MergeTree/MergeTreeData.cpp:5040-5049` never sees them. `MergeTreeData::checkAlterIsPossible` runs only on the `AlterCommands` segments of a statement; commands that parse into `MutationCommands` go straight to `mutate`. Measured with the setting disabled: `ALTER ... DELETE`, `ALTER ... UPDATE`, lightweight `DELETE FROM`, and `MATERIALIZE INDEX`, `MATERIALIZE PROJECTION`, `MATERIALIZE COLUMN` and `MATERIALIZE TTL` all succeed, the last two against fixtures that arm them (a column with a `DEFAULT` expression and a table with a `TTL`); `DROP COLUMN`, `RENAME COLUMN`, a `MODIFY COLUMN` type change, `MODIFY TTL`, `CLEAR COLUMN`, `CLEAR INDEX` and `CLEAR PROJECTION` all give `Code: 524`. Co-Authored-By: Claude Opus 5 <[email protected]>
The readonly section lists RESTORE as a value-2-only capability and says nothing about BACKUP, which invites the reader to assume BACKUP follows the same rule. It does not: BACKUP is not readonly-gated at all. src/Backups/BackupsWorker.cpp:986 is the only read of Setting::readonly under src/Backups/, and it sits in RestoreStarter's constructor, so the backup path has none. BackupUtils::getRequiredAccessToBackup emplaces AccessType::BACKUP only (src/Backups/BackupUtils.cpp:65-98), and AccessType::BACKUP is in neither not_readonly_flags nor not_readonly_1_flags (src/Access/ContextAccess.cpp:828-829, where write_table_access is INSERT | OPTIMIZE and not_readonly_1_flags is CREATE_TEMPORARY_TABLE alone). Measured on a running server as a non-default user over HTTP with a session_id, because Context sets full_access = !user_id and a no-user context would pass every check. A user granted BACKUP on the table plus READ, WRITE ON DISK gets BACKUP_CREATED at readonly 0, 1 and 2 and over a plain HTTP GET, while in the same sessions INSERT is refused with code 164 and RESTORE with code 497. The backup written at readonly = 1 restores to a table holding the source rows [1,2,3], so it is a real backup rather than an empty no-op. A user without the BACKUP privilege is refused, which is what makes those results non-vacuous. Co-Authored-By: Claude Opus 5 <[email protected]>
| a privilege it holds with grant option and propagate its own grants to another user. | ||
| Revoking a privilege `ON CLUSTER` is refused. | ||
|
|
||
| Temporary tables are exempt from both settings: a session that may create one may also `ALTER` it, |
There was a problem hiding this comment.
CREATE TEMPORARY VIEW is another public DDL surface that sits outside both gates, so documenting temporary tables as the only exception here is still too narrow. InterpreterCreateQuery::getRequiredAccess checks AccessType::CREATE_TEMPORARY_VIEW for that syntax, and ContextAccess does not include that flag in either not_readonly_flags / not_readonly_1_flags or ddl_flags. As written, readers will still assume readonly and allow_ddl fence off temporary views when they do not. Please mention temporary views alongside temporary tables here (and in the allow_ddl note below).
| <Note> | ||
| You can't use table functions if the [allow_ddl](/reference/settings/session-settings/allow#allow_ddl) setting is disabled. | ||
|
|
||
| Most table functions need the `CREATE TEMPORARY TABLE` privilege to run, so a `SELECT` or `INSERT` |
There was a problem hiding this comment.
SELECT and INSERT INTO FUNCTION do not follow the same readonly rule. In ITableFunction::execute, is_insert_query forces the CREATE TEMPORARY TABLE check unconditionally, so even functions registered with allow_readonly = true are still refused at readonly = 1 when used as INSERT INTO FUNCTION (for example null). The current "Most table functions..." wording makes it sound like the readonly-safe exceptions also carry over to inserts. Could you split those cases and say that INSERT INTO FUNCTION is refused at readonly = 1 for all table functions?
Closes: #115699
Related: #115697
Related: #115287
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
Corrected and completed the "Permissions for queries" documentation page.
Description
permissions-for-queries:DELETE/UPDATEandALTER TABLE ... DELETE/UPDATEadded to "Write data queries",plus an "Access management queries" category linking to the RBAC docs;
readonly: over HTTP, any method other thanPOSTruns with 2, not 1, and only from an effective0, so a stricter profile value survives but an explicit 0 does not;
PUT/DELETEat a SQL-definedhandler skip the bump but still obey the effective value; a query-string
readonlyis refused, notclamped;
GRANTis refused, while a localREVOKEandGRANT CURRENT GRANTSare not gated;<Tip>callingEXISTS/DESCRIBE/EXPLAIN/SHOW PROCESSLIST"equivalent toSELECT";allow_ddl = 0lists the privileges it blocks; it blocks neitherCREATE TEMPORARY TABLE, granting,nor
ATTACH PARTITION/ATTACH PART, which need onlyINSERT; the... FROMform is blocked.Neither setting restricts
ALTER DATABASE,UNDROP TABLEor named collection management;KILL QUERY: your own needs noKILL QUERYprivilege but does needSELECTonsystem.processes;another user's, and any
ON CLUSTER, need the privilege, whichreadonlyrefuses;allow_introspection_functionsandallow_non_metadata_alters.table-functions/index.mdxsaid the opposite: they needCREATE TEMPORARY TABLE, soreadonly = 1blocks them, notallow_ddl.Duplicate
readonlydocs: of three copies, theDECLAREkeeps the value semantics,permissions-for-queries#readonlyowns the query classes (losingPossible values:), andconstraints-on-settings#read-onlykeeps only the constraint-type disambiguation.#115697: the wrong HTTP default is fixed here and
00305_http_and_readonly.shalready asserts it,so no test is added. The
readonly = 2transition table is deferred to #115695, per @ ringerc.Left undocumented on purpose:
readonlyversusSET ROLEand role grants (#115691 contests it), andthe
BACKUP/RESTOREand SQL-defined handler policies themselves; whatreadonlydoes to each isstated. The autogenerated
DECLAREsummary still calls values 1 and 2 read-only (fix belongs insrc/Core/Settings.cpp).Workflow [PR]
Sync PR [sync-upstream/pr/118184]
Version info
26.9.1.1358(included in26.9and later)