mysql2 breakage
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- javascript, node.js
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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);
- Vorherrschende Sprache
- HTML
- Sterne
- 11
- Forks
- 4
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus scripting/feedlandInstall
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 55/100
scripting/feedlandInstall#79 · 1 Kommentar · 1 Reaktion ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 55/100
scripting/feedlandInstall#77 · 3 Kommentare ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 35/100
scripting/feedlandInstall#76 · 3 Kommentare ·
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 20/100
scripting/feedlandInstall#74 · 3 Kommentare ·
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 20/100
scripting/feedlandInstall#73 · 1 Kommentar ·
Alle Issues in scripting/feedlandInstall
Ähnliche Issues
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 90/100
decentralized-identity/didwebvh-ts#203 ·
Maintainer antworten meist innerhalb von 1 Tag
-
kind/bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag
-
area/map-site bug layer/core size/S
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 88/100
marola-dev/marola-app#60 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Telegram webhook: line breaks lost since switch to rich messagesEvtl. vergeben @Kshot3000 hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
Maintainer antworten meist innerhalb von 1 Tag
-
get_seat_availability: 'GNWL/AVAILABLE'-style statuses are reported as available with no seat countOffenbug good first issue tools
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100