Description:
## Synopsis
Error 3569 "Table appears in multiple locking clauses" when using HIGH_PRIORITY SELECT with GROUP BY and FOR UPDATE on a view containing an internal alias
## Description
When executing a SELECT query with HIGH_PRIORITY, GROUP BY, and FOR UPDATE on a view that uses an alias in its definition, MySQL incorrectly reports error 3569, claiming the table "appears in multiple locking clauses" even though only one FOR UPDATE clause exists.
FOR UPDATE;
```
**Error output:**
```
ERROR 3569 (HY000): Table t11 appears in multiple locking clauses.
```
mysql> SELECT VERSION();
+--------------+
| VERSION() |
+--------------+
| 8.0.45-debug |
+--------------+
How to repeat:
```sql
DROP DATABASE IF EXISTS test_bug_3569;
CREATE DATABASE test_bug_3569;
USE test_bug_3569;
CREATE TABLE tmp_parent (
col_int INT,
col_varchar VARCHAR(2000),
col_date DATE,
col_timestamp TIMESTAMP,
col_numeric NUMERIC
) ENGINE=InnoDB;
INSERT INTO tmp_parent VALUES
(10, 'test1', '2026-01-01', NOW(), 100),
(20, 'test2', '2026-01-02', NOW(), 200),
(30, 'test3', '2026-01-03', NOW(), 300);
CREATE VIEW view2chqin AS
SELECT t1.* FROM tmp_parent t1
WHERE t1.col_int > 0;
-- This query triggers ERROR 3569
SELECT HIGH_PRIORITY * FROM view2chqin t11
GROUP BY 1,2,3,4,5
ORDER BY 1 LIMIT 1
FOR UPDATE;
```
Description: ## Synopsis Error 3569 "Table appears in multiple locking clauses" when using HIGH_PRIORITY SELECT with GROUP BY and FOR UPDATE on a view containing an internal alias ## Description When executing a SELECT query with HIGH_PRIORITY, GROUP BY, and FOR UPDATE on a view that uses an alias in its definition, MySQL incorrectly reports error 3569, claiming the table "appears in multiple locking clauses" even though only one FOR UPDATE clause exists. FOR UPDATE; ``` **Error output:** ``` ERROR 3569 (HY000): Table t11 appears in multiple locking clauses. ``` mysql> SELECT VERSION(); +--------------+ | VERSION() | +--------------+ | 8.0.45-debug | +--------------+ How to repeat: ```sql DROP DATABASE IF EXISTS test_bug_3569; CREATE DATABASE test_bug_3569; USE test_bug_3569; CREATE TABLE tmp_parent ( col_int INT, col_varchar VARCHAR(2000), col_date DATE, col_timestamp TIMESTAMP, col_numeric NUMERIC ) ENGINE=InnoDB; INSERT INTO tmp_parent VALUES (10, 'test1', '2026-01-01', NOW(), 100), (20, 'test2', '2026-01-02', NOW(), 200), (30, 'test3', '2026-01-03', NOW(), 300); CREATE VIEW view2chqin AS SELECT t1.* FROM tmp_parent t1 WHERE t1.col_int > 0; -- This query triggers ERROR 3569 SELECT HIGH_PRIORITY * FROM view2chqin t11 GROUP BY 1,2,3,4,5 ORDER BY 1 LIMIT 1 FOR UPDATE; ```