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

fix bug for statistic with delete statement: #2450

Conversation

kenlee1988
Copy link
Contributor

test case:

delete from tb1;
delete tb1 from tb1;

delete tb1 from tb1, tb2 where tb1.f1 = tb2.f1;
delete tb1 from tb1, tb2 where tb1.f1 = tb2.f1;
delete tb1, tb2 from tb1, tb2 where tb1.f1 = tb2.f1;

delete tb1 from tb1 left join tb2 on tb1.f1 = tb2.f1;
delete tb2 from tb1 left join tb2 on tb1.f1 = tb2.f1;
delete tb1, tb2 from tb1 left join tb2 on tb1.f1 = tb2.f1;

delete t1 from tb1 as t1, tb2 as t2 where t1.f1 = t2.f1;
delete t2 from tb1 as t1, tb2 as t2 where t1.f1 = t2.f1;
delete t1, t2 from tb1 as t1, tb2 as t2 where t1.f1 = t2.f1;

delete t1 from tb1 as t1 left join tb2 as t2 on t1.f1 = t2.f1;
delete t2 from tb1 as t1 left join tb2 as t2 on t1.f1 = t2.f1;
delete t1, t2 from tb1 as t1 left join tb2 as t2 on t1.f1 = t2.f1;

test case:
	delete from tb1;
	delete tb1 from tb1;

	delete tb1 from tb1, tb2 where tb1.f1 = tb2.f1;
	delete tb1 from tb1, tb2 where tb1.f1 = tb2.f1;
	delete tb1, tb2 from tb1, tb2 where tb1.f1 = tb2.f1;

	delete tb1 from tb1 left join tb2 on tb1.f1 = tb2.f1;
	delete tb2 from tb1 left join tb2 on tb1.f1 = tb2.f1;
	delete tb1, tb2 from tb1 left join tb2 on tb1.f1 = tb2.f1;

	delete t1 from tb1 as t1, tb2 as t2 where t1.f1 = t2.f1;
	delete t2 from tb1 as t1, tb2 as t2 where t1.f1 = t2.f1;
	delete t1, t2 from tb1 as t1, tb2 as t2 where t1.f1 = t2.f1;

	delete t1 from tb1 as t1 left join tb2 as t2 on t1.f1 = t2.f1;
	delete t2 from tb1 as t1 left join tb2 as t2 on t1.f1 = t2.f1;
	delete t1, t2 from tb1 as t1 left join tb2 as t2 on t1.f1 = t2.f1;
@junwen12221 junwen12221 merged commit d4548a1 into MyCATApache:Mycat-server-1.6.7.5-test Apr 6, 2020
@junwen12221 junwen12221 mentioned this pull request Dec 31, 2020
@kenlee1988 kenlee1988 deleted the fix-statistic-delete-with-join branch January 4, 2021 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants