Parser fails for updates that include subqueries for source tables
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu bằng cách chạy truy vấn UPDATE được cung cấp qua trình phân tích cú pháp SQL và so sánh đầu ra của nó với cấu trúc table, subquery, SET và WHERE dự kiến được nêu trong issue. Theo dõi cách các tham chiếu bảng UPDATE chứa một subquery được token hóa và phân tích cú pháp, sau đó thêm hoặc cập nhật một bài kiểm thử hồi quy cho truy vấn này và xác minh cấu trúc đã được phân tích.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
The SQL Parser fails to parse the following query:
update `table1` as e, (select * from table2) e2
set
e.`id` = e2.id,
where e.id=e2.id
It returns the output below. This appears to always be an issue when using subqueries in the table references.
[
{
"tables": [
{
"database": null,
"table": "table1",
"column": null,
"expr": "`table1`",
"alias": "e",
"function": null,
"subquery": null
}
],
"set": null,
"where": null,
"order": null,
"limit": null,
"options": {
"options": []
},
"first": 0,
"last": 10
},
{
"expr": [
{
"database": null,
"table": null,
"column": null,
"expr": "*",
"alias": null,
"function": null,
"subquery": null
}
],
"from": [
{
"database": null,
"table": "table2",
"column": null,
"expr": "table2",
"alias": null,
"function": null,
"subquery": null
}
],
"index_hints": null,
"partition": null,
"where": null,
"group": null,
"having": null,
"order": null,
"limit": null,
"procedure": null,
"into": null,
"join": null,
"union": [],
"end_options": null,
"options": {
"options": []
},
"first": 11,
"last": 21
},
{
"options": {
"options": []
},
"end_options": null,
"set": [
{
"column": "e.`id`",
"value": "e2.id"
}
],
"first": 22,
"last": 44,
"where": [
{
"identifiers": [
"e",
"id",
"e2"
],
"isOperator": false,
"expr": "e.id=e2.id"
}
]
}
]
- Ngôn ngữ chính
- PHP
- Star
- 485
- Fork
- 119
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của phpmyadmin/sql-parser
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
phpmyadmin/sql-parser#655 · 1 reaction ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
phpmyadmin/sql-parser#666 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 65/100
phpmyadmin/sql-parser#662 · 2 reaction ·
-
MariaDB and MySQL contexts Đang mởkind/support
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
phpmyadmin/sql-parser#653 · 1 reaction ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 70/100
phpmyadmin/sql-parser#649 ·
Tất cả issue của phpmyadmin/sql-parser
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
-
Admissions heading updates Đang mởa11y admissions.uiowa.edu needs grooming SiteImprove best practice
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Save States Menu Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Error on exporting the error log Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
pluginsGLPI/datainjection#673 ·