phpmyadmin / phpmyadmin/sql-parser
Support multiple-table syntax of DELETE statement
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 485
- Forks
- 119
- PR merge metrics
- No merged PRs in 30d
Description
Docs: https://dev.mysql.com/doc/refman/8.0/en/delete.html#idm140219041342912
There are two possible forms of multiple-table delete statement (queries based on this tutorial):
DELETE t1, t2 FROM t1 INNER JOIN t2 ON t2.ref = t1.id WHERE t1.id = 1DELETE FROM t1, t2 USING t1 INNER JOIN t2 ON t2.ref = t1.id WHERE t1.id = 1;
Looks like the former one is supported but the latter one is not – it ends up with two ParseExceptions.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing how the parser handles the two multiple-table DELETE forms shown in the issue, using the linked MySQL documentation to confirm the syntax. Reproduce the two ParseExceptions and verify that the DELETE FROM ... USING form parses successfully without regressing the already supported form.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- mysql, php
- Domain
- databases, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100