Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR 1109 when create global binding for delete statement with subquery #56726

Closed
harry1129 opened this issue Oct 18, 2024 · 1 comment · Fixed by #57255
Closed

ERROR 1109 when create global binding for delete statement with subquery #56726

harry1129 opened this issue Oct 18, 2024 · 1 comment · Fixed by #57255
Assignees
Labels
affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-8.5 This bug affects the 8.5.x(LTS) versions. severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.

Comments

@harry1129
Copy link

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

mysql> use test;
Database changed
mysql> create table t1(id int);
Query OK, 0 rows affected (0.09 sec)

mysql> create table t2(id int);
Query OK, 0 rows affected (0.10 sec)

mysql> delete tt1 from t1 tt1,(select max(id) id from t2)tt2 where tt1.id<=tt2.id;
Query OK, 0 rows affected (0.00 sec)

mysql> 
mysql> create global binding for
    -> delete tt1 from t1 tt1,(select max(id) id from t2)tt2 where tt1.id<=tt2.id
    -> using
    -> delete /*+ MAX_EXECUTION_TIME(10)*/ tt1 from t1 tt1,(select max(id) id from t2)tt2 where tt1.id<=tt2.id;
ERROR 1109 (42S02): Unknown table 'tt1' in MULTI DELETE
mysql> 

2. What did you expect to see? (Required)

NO ERROR

3. What did you see instead (Required)

ERROR 1109

4. What is your TiDB version? (Required)

mysql> select tidb_version()\G
*************************** 1. row ***************************
tidb_version(): Release Version: v6.5.11
Edition: Community
Git Commit Hash: 3f2073261bf9f454c3c677d76d120c6ab40ca05c
Git Branch: HEAD
UTC Build Time: 2024-09-18 04:07:03
GoVersion: go1.19.13
Race Enabled: false
TiKV Min Version: 6.2.0-alpha
Check Table Before Drop: false
Store: tikv
1 row in set (0.00 sec)
@harry1129 harry1129 added the type/bug The issue is confirmed as a bug. label Oct 18, 2024
@hawkingrei hawkingrei self-assigned this Oct 21, 2024
@ti-chi-bot ti-chi-bot bot added the affects-8.5 This bug affects the 8.5.x(LTS) versions. label Nov 1, 2024
@qw4990
Copy link
Contributor

qw4990 commented Nov 14, 2024

A minimal reproducible case:

create global binding using delete tt1 from t1 tt1;

@hawkingrei hawkingrei added affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. and removed may-affects-8.1 labels Nov 15, 2024
@hawkingrei hawkingrei added affects-7.1 This bug affects the 7.1.x(LTS) versions. may-affects-7.5 labels Nov 15, 2024
@hawkingrei hawkingrei added affects-6.5 This bug affects the 6.5.x(LTS) versions. may-affects-7.1 labels Nov 15, 2024
@ti-chi-bot ti-chi-bot bot closed this as completed in 4fded5f Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects-6.5 This bug affects the 6.5.x(LTS) versions. affects-7.1 This bug affects the 7.1.x(LTS) versions. affects-7.5 This bug affects the 7.5.x(LTS) versions. affects-8.1 This bug affects the 8.1.x(LTS) versions. affects-8.5 This bug affects the 8.5.x(LTS) versions. severity/major sig/planner SIG: Planner type/bug The issue is confirmed as a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants