| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
…EATE VIEW (phpmyadmin#655) Signed-off-by: SAY-5 <say.apm35@gmail.com>
|
Bumping this. The builder currently glues SELECT straight onto the UNION body so the rebuilt query comes back malformed, patch just keeps the space. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Fixes #655. CreateStatement::build() reconstructed CREATE VIEW ... AS SELECT ... UNION ... by concatenating $builtStatement = $this->select->build() directly with TokensList::buildFromArray($this->body). Neither side carried a separator, so the rebuilt SQL collided the SELECT's last token with the UNION:
This was reported downstream in phpmyadmin/phpmyadmin#19692 (and earlier as #18515), the syntax-invalid output broke phpMyAdmin's exports.
Change
src/Statements/CreateStatement.php, insert a single space when both sides are non-empty and neither already ends/begins with a space. The existing WITH ... AS ( ... ) SELECT ... path already produces a trailing space on $builtStatement, so the conditional avoids double-spacing it.
Test plan