batch on limit statement with table alias execute failed
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
create table test(id int primary key,name varchar(100));
batch on t.id limit 100 update test t set t.name='aa' where t.id >10;
2. What did you expect to see? (Required)
Execution successful
+----------------+---------------+
| number of jobs | job status |
+----------------+---------------+
| 0 | all succeeded |
+----------------+---------------+
3. What did you see instead (Required)
ERROR 1054 (42S22): Unknown column 't.id' in 'where clause'
4. What is your TiDB version? (Required)
Release Version: v7.5.1
Edition: Community
Git Commit Hash: 7d16cc79e81bbf573124df3fd9351c26963f3e70
Git Branch: heads/refs/tags/v7.5.1
UTC Build Time: 2024-02-27 14:21:13
GoVersion: go1.21.6
Race Enabled: false
Check Table Before Drop: false
Store: tikv
Contributor guide
Research direction
Run the supplied CREATE TABLE and BATCH SQL against TiDB v7.5.1 to reproduce the alias failure, then trace the batch-on-limit handling for the aliased table. Done means the statement executes successfully and reports all jobs succeeded without the unknown-column error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- sql
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100