mysql2 breakage
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, node.js
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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);
- Lingua principale
- HTML
- Stelle
- 11
- Fork
- 4
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di scripting/feedlandInstall
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
scripting/feedlandInstall#79 · 1 commento · 1 reazione ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 55/100
scripting/feedlandInstall#77 · 3 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
scripting/feedlandInstall#76 · 3 commenti ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 20/100
scripting/feedlandInstall#74 · 3 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 20/100
scripting/feedlandInstall#73 · 1 commento ·
Tutte le issue di scripting/feedlandInstall
Issue simili
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
decentralized-identity/didwebvh-ts#203 ·
I maintainer di solito rispondono entro 1 giorno
-
kind/bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
area/map-site bug layer/core size/S
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
marola-dev/marola-app#60 ·
I maintainer di solito rispondono entro 1 giorno
-
Telegram webhook: line breaks lost since switch to rich messagesForse già presa @Kshot3000 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
get_seat_availability: 'GNWL/AVAILABLE'-style statuses are reported as available with no seat countApertabug good first issue tools
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100