phpmyadmin / phpmyadmin/sql-parser
UPDATE with SELECT not supported
Nessuno ha ancora preso questa issue.
- Lingua principale
- PHP
- Stelle
- 485
- Fork
- 119
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
Was using the php-sqllint package (says to report errors here) and got these errors on valid MySQL syntax:
Line 1, col 45 at "(": An expression was expected.
Line 1, col 45 at "(": Unexpected token.
Line 1, col 46 at "SELECT": A new statement was found, but no delimiter between it and the previous one.
Line 1, col 106 at ")": Unexpected token.
Line 1, col 108 at "src": Unexpected token.
Line 2, col 5 at "SET": A new statement was found, but no delimiter between it and the previous one.
The SQL to generate these errors is similar to this (table, column names and values are different):
UPDATE table1 t1, (SELECT `id` FROM table2 WHERE `unique_val` = 1) src
SET t1.ref_to_t2 = src.id
WHERE t1.unique_val = 'unique';
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.
Direzione di ricerca
Non è indicato alcun file del repository né alcun test. Riproduci la query segnalata tramite php-sqllint, quindi traccia il parsing di UPDATE attorno al SELECT tra parentesi e verifica che questa sintassi MySQL valida venga accettata senza gli errori segnalati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- mysql, php
- Ambito
- databases
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100