mysql2 breakage
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
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- javascript, node.js
Hướng nghiên cứu
Start by tracing database.setUserPrefs, database.getUserPrefs, and database.getReadingListsInfo in feedlanddatabase, then inspect the mysql2 setup in davesql's start function. Reproduce the affected JSON preference queries with mysql and mysql2, and verify that the affected operations work without failing when mysql2 returns JSON values as objects.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Background: I usually won't swap out one NPM package for another, because it's virtually impossible to find all the problems even if the developers placed a premium on no breakage. I made this optional change because it was required by Automattic for the server system we are using, but I was afraid something like what happened would happen.
A breaking change in mysql2
- There's a breaking change in mysql2, when transitioning from mysql.
- If you use the JSON type, when a query returns such a value, in mysql it is a string, in mysql2 it's a JavaScript object.
- The FeedLand code is expecting a string, and fails when we try to run the object through
JSON.parse, which of course is correct.
Where this breaks FeedLand
- database.setUserPrefs
- database.getUserPrefs
- database.getUserPrefs
- database.getReadingListsInfo
I just looked in feedlanddatabase.
I've turned off using mysql2 on the test server I am working on. Not sure what the fix is going to be for servers that want to or have to use mysql2.
I tried adding jsonAsObject set false to the connection record in the start function in the davesql package, but that doesn't seem to have done anything.
console.log ("davesql.start: using " + ((config.flUseMySql2) ? "mysql2" : "mysql") + "."); //4/12/24 by DW
mysql = (config.flUseMySql2) ? require ("mysql2") : require ("mysql"); //4/12/24 by DW
if (config.flUseMySql2) { //6/27/24 by DW
options.jsonAsObject = false;
}
theSqlConnectionPool = mysql.createPool (options);
- Ngôn ngữ chính
- HTML
- Star
- 11
- Fork
- 4
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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 scripting/feedlandInstall
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
scripting/feedlandInstall#79 · 1 bình luận · 1 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
scripting/feedlandInstall#77 · 3 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
scripting/feedlandInstall#76 · 3 bình luận ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 20/100
scripting/feedlandInstall#74 · 3 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
scripting/feedlandInstall#73 · 1 bình luận ·
Tất cả issue của scripting/feedlandInstall
Issue tương tự
-
bug llm translation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
jellyfin/jellyfin-mpv-shim#800 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Michigan 2025 senior interest, dividends and capital gains deduction limits are uprated, not the published amountsCó thể đã có người làm @PavelMakarchuk đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
PolicyEngine/policyengine-us#9826 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
P4: low query
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
jeffknupp/association#336 ·