unrecognised keyword 'CASE'
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
Direzione di ricerca
Inizia riproducendo la query con l’entry point lint-query e verifica come il parser SQL gestisce i token CASE, WHEN, THEN, ELSE ed END. Aggiungi la copertura per questa query e conferma che le espressioni CASE valide di MySQL non producano più gli errori segnalati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
$ ./lint-query --query 'SELECT * FROM `Caracteristiques` WHERE CASE `an` WHEN 86400 THEN 4 WHEN 604800 THEN 5 WHEN 2419200 THEN 6 WHEN 31536000 THEN 7 ELSE -1 END < 0;'
#1: Unrecognised keyword. (near "CASE" at position 39)
#2: Unexpected token. (near "`an`" at position 44)
#3: Unrecognised keyword. (near "WHEN" at position 49)
#4: Unexpected token. (near "86400" at position 54)
#5: Unrecognised keyword. (near "THEN" at position 60)
#6: Unexpected token. (near "4" at position 65)
#7: Unrecognised keyword. (near "WHEN" at position 67)
#8: Unexpected token. (near "604800" at position 72)
#9: Unrecognised keyword. (near "THEN" at position 79)
#10: Unexpected token. (near "5" at position 84)
#11: Unrecognised keyword. (near "WHEN" at position 86)
#12: Unexpected token. (near "2419200" at position 91)
#13: Unrecognised keyword. (near "THEN" at position 99)
#14: Unexpected token. (near "6" at position 104)
#15: Unrecognised keyword. (near "WHEN" at position 106)
#16: Unexpected token. (near "31536000" at position 111)
#17: Unrecognised keyword. (near "THEN" at position 120)
#18: Unexpected token. (near "7" at position 125)
#19: Unrecognised keyword. (near "ELSE" at position 127)
#20: Unexpected token. (near "-1" at position 132)
#21: Unrecognised keyword. (near "END" at position 135)
#22: Unexpected token. (near "<" at position 139)
#23: Unexpected token. (near "0" at position 141)
I am using the version shipped with phpMyAdmin 4.9.1. The query works.
SELECT VERSION();
5.7.27-30-57-log
- Lingua principale
- PHP
- Stelle
- 485
- Fork
- 119
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Apri la guida per i contributori
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 phpmyadmin/sql-parser
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
phpmyadmin/sql-parser#655 · 1 reazione ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
phpmyadmin/sql-parser#666 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
phpmyadmin/sql-parser#662 · 2 reazioni ·
-
MariaDB and MySQL contexts Apertakind/support
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
phpmyadmin/sql-parser#653 · 1 reazione ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 70/100
phpmyadmin/sql-parser#649 ·
Tutte le issue di phpmyadmin/sql-parser
Issue simili
-
Admissions heading updates Apertaa11y admissions.uiowa.edu needs grooming SiteImprove best practice
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
Save States Menu Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
pluginsGLPI/datainjection#673 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
octobercms/october#6130 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
getgrav/grav-plugin-form#656 ·