summaryrefslogtreecommitdiffstats
path: root/tests/Parser
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'QA'William Desportes2019-12-311-0/+26
|\ | | | | | | Signed-off-by: William Desportes <williamdes@wdes.fr>
| * fix #259: Add support for DROP USER statementDeven Bansod2019-12-311-0/+26
| |
* | Merge branch 'QA'William Desportes2019-12-312-0/+5
|\ \ | |/ | | | | Signed-off-by: William Desportes <williamdes@wdes.fr>
| * Merge #277 - allow SCHEMA to be used in CREATE Database statementWilliam Desportes2019-12-311-1/+5
| |\ | | | | | | | | | | | | | | | | | | Pull-request: #277 Fixes: #231 Signed-off-by: William Desportes <williamdes@wdes.fr>
| | * fix #231: allow SCHEMA to be used in CREATE Database statementDeven Bansod2019-12-291-1/+5
| | |
| * | 275: Prevent overwrite of offset in Limit clause by parenthesisDeven Bansod2019-12-301-1/+2
| |/
* | Remove useless comments and annotationsMaurício Meneghini Fauth2019-12-1417-34/+34
| | | | | | | | Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
* | Merge branch 'QA'William Desportes2019-11-131-0/+3
|\ \ | |/ | | | | Signed-off-by: William Desportes <williamdes@wdes.fr>
| * fixes #267 - ALTER TABLE ... PRIMARY/UNIQUE KEY "Missing comma" errorMisterCoder2019-11-131-1/+4
| |
| * Revert "Enable strict mode on PHP files"William Desportes2019-05-2817-17/+0
| | | | | | | | | | This reverts commit 17da8a34b81442524a8e01fead7b5968fa1cc39d. Signed-off-by: William Desportes <williamdes@wdes.fr>
| * revert of new array syntaxWilliam Desportes2019-05-2817-241/+241
| | | | | | | | | | See: 86c5baebda24c1721fb6881df8671a3c7df60e8b Signed-off-by: William Desportes <williamdes@wdes.fr>
* | Fix deprecated annotations William Desportes2019-09-251-5/+3
|/ | | | | | Ref: #261 Signed-off-by: William Desportes <williamdes@wdes.fr>
* Fix errors detected by PHPStan at level 0Maurício Meneghini Fauth2019-05-081-0/+0
| | | | Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
* Fix risky testsMaurício Meneghini Fauth2019-01-1617-34/+34
| | | | | | | - Rename test providers - Mark tests as incomplete Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
* Enable strict mode on PHP filesMaurício Meneghini Fauth2019-01-1617-0/+17
| | | | Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
* Apply phpmyadmin/coding-standardMaurício Meneghini Fauth2019-01-1617-241/+241
| | | | Signed-off-by: Maurício Meneghini Fauth <mauriciofauth@gmail.com>
* Fix incorrect error on DEFAULT keyword in ALTER operationDeven Bansod2019-01-031-0/+1
| | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* Merge pull request #203 from mostertb/case-aliasIsaac Bennetch2018-12-241-0/+10
|\ | | | | Add support for Aliases on CASE expressions
| * Add tests for parsing of CASE expressions with aliasesBrad Mostert2018-10-131-0/+10
| |
* | Merge pull request #216 from devenbansod/fix/199Deven Bansod2018-12-231-0/+6
|\ \ | | | | | | Add support for INDEX hints in SELECT statement
| * | Add support for INDEX hints in SELECT statementDeven Bansod2018-12-231-0/+6
| | | | | | | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* | | Merge pull request #215 from devenbansod/fix/180Deven Bansod2018-12-221-0/+41
|\ \ \ | |/ / | | | Add support for LOCK and UNLOCK Statements
| * | Add support for LOCK and UNLOCK StatementsDeven Bansod2018-12-221-0/+41
| | | | | | | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* | | Merge pull request #214 from devenbansod/fix/160Deven Bansod2018-12-221-0/+1
|\ \ \ | |/ / |/| | Throw a parser error on extraneous comma in UPDATE statement
| * | Throw a parser error on extraneous comma in UPDATE statementDeven Bansod2018-12-221-0/+1
| | | | | | | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* | | Throw a parse error if a comma missing between two alter operationsDeven Bansod2018-12-211-0/+3
|/ / | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* | Add support for PURGE statementsDeven Bansod2018-12-201-0/+31
|/ | | | | | Fix #207 Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* Add tests for partition definitions with engineMichal Čihař2017-10-101-0/+1
| | | | | | | | This seems to work just fine. Issue #174 Signed-off-by: Michal Čihař <michal@cihar.com>
* Actually run new testMichal Čihař2017-07-121-0/+1
| | | | Signed-off-by: Michal Čihař <michal@cihar.com>
* Correctly handle incomplete statementsMichal Čihař2017-07-121-0/+1
| | | | | | Fixes https://github.com/phpmyadmin/phpmyadmin/issues/13485 Signed-off-by: Michal Čihař <michal@cihar.com>
* Properly handle lowercase begin statementMichal Čihař2017-05-051-0/+1
| | | | | | | | Actually all statements where main token is used as an option. Fixes https://github.com/phpmyadmin/phpmyadmin/issues/13240 Signed-off-by: Michal Čihař <michal@cihar.com>
* Merge pull request #145 from devenbansod/fix_144Michal Čihař2017-03-301-0/+1
|\ | | | | Fix parsing of DELETE clauses with JOINs
| * Fix parsing of DELETE clauses with JOINsDeven Bansod2017-03-301-0/+1
| | | | | | | | | | | | | | | | | | Ref: https://dev.mysql.com/doc/refman/5.7/en/delete.html Fix #144 Fix phpmyadmin/phpmyadmin#13129 Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* | Aplly coding style fixesMichal Čihař2017-02-201-1/+1
| | | | | | | | Signed-off-by: Michal Čihař <michal@cihar.com>
* | Merge pull request #143 from devenbansod/fix_131Michal Čihař2017-02-201-0/+45
|\ \ | | | | | | Parse LOAD statement properly
| * | Parse LOAD statement properlyDeven Bansod2017-02-181-0/+45
| |/ | | | | | | | | | | | | | | Fix #131 Might help to fix phpmyadmin/phpmyadmin#12345 Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* | Fix broken clause order validationDeven Bansod2017-02-171-0/+1
|/ | | | | | Fix #113 Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* Merge remote-tracking branch 'origin/pull/137'Michal Čihař2017-02-1414-0/+28
|\
| * Apply cs fixesDamian Dlugosz2017-02-1214-0/+14
| |
* | Order importsDamian Dlugosz2017-02-122-2/+2
|/
* Merge branch 'master' into motranslatorMichal Čihař2017-01-2314-34/+34
|\
| * Added PhpMyAdmin namespace prefix to follow PSR-4.Michal Čihař2017-01-2314-34/+34
| | | | | | | | | | | | Fixes #126 Signed-off-by: Michal Čihař <michal@cihar.com>
* | Merge branch 'master' into motranslatorMichal Čihař2017-01-201-0/+2
|\ \ | |/
| * Fixed parsing of unterminated variables.Michal Čihař2017-01-201-0/+1
| | | | | | | | | | | | Fixes https://github.com/phpmyadmin/phpmyadmin/issues/12894 Signed-off-by: Michal Čihař <michal@cihar.com>
| * Properly handle operators AND, NOT, OR, XOR, DIV, MODMichal Čihař2017-01-061-0/+1
| | | | | | | | Signed-off-by: Michal Čihař <michal@cihar.com>
* | Merge branch 'master' into motranslatorMichal Čihař2017-01-0614-17/+1
|\ \ | |/
| * Apply php-cs-fixerDamian Dlugosz2017-01-0614-17/+1
| |
* | Merge branch 'master' into motranslatorMichal Čihař2017-01-031-0/+1
|\ \ | |/
| * Properly report missing expression errorMichal Čihař2017-01-031-0/+1
| | | | | | | | Signed-off-by: Michal Čihař <michal@cihar.com>
* | Merge branch 'master' into motranslatorMichal Čihař2017-01-031-0/+1
|\ \ | |/
| * Test error on double ASMichal Čihař2017-01-031-0/+1
| | | | | | | | Signed-off-by: Michal Čihař <michal@cihar.com>
* | Merge branch 'master' into motranslatorMichal Čihař2017-01-031-0/+1
|\ \ | |/
| * Add missing test for error conditionMichal Čihař2017-01-031-0/+1
| | | | | | | | Signed-off-by: Michal Čihař <michal@cihar.com>
* | Merge branch 'master' into motranslatorMichal Čihař2016-12-221-0/+3
|\ \ | |/
| * Add more tests, fix unneeded errorDeven Bansod2016-12-211-0/+1
| | | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
| * Add more testsDeven Bansod2016-12-211-0/+1
| | | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
| * Add tests for parsing of FIELDS and LINES options in SELECT..INTODeven Bansod2016-12-211-0/+1
| | | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* | Replace __( usage by Translator classMichal Čihař2016-12-211-3/+3
|/ | | | Signed-off-by: Michal Čihař <michal@cihar.com>
* Recognize BINARY as functionMichal Čihař2016-11-301-0/+1
| | | | | | Fixes https://github.com/phpmyadmin/phpmyadmin/issues/12762 Signed-off-by: Michal Čihař <michal@cihar.com>
* Add tests for prevention of incorrect errors in UNION queriesDeven Bansod2016-11-201-0/+1
| | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com> Conflicts: tests/Parser/SelectStatementTest.php
* Add a forgotten testDeven Bansod2016-11-201-0/+1
| | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* Add tests for prevention of wrong order in JOINsDeven Bansod2016-11-151-0/+1
| | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* Add parser tests for end options in SELECTDeven Bansod2016-11-121-0/+3
| | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* Add forgotten testcaseMichal Čihař2016-11-091-0/+1
| | | | Signed-off-by: Michal Čihař <michal@cihar.com>
* Add tests for #22Deven Bansod2016-11-031-0/+1
| | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* Merge pull request #95 from devenbansod/fix_93Michal Čihař2016-10-251-0/+7
|\ | | | | Fix #93 : Fix parsing of NATURAL JOIN, CROSS JOIN and related joins
| * Add call to test in test fileDeven Bansod2016-10-241-0/+1
| | | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
| * Add tests for various NATURAL JOINS, fix testDeven Bansod2016-10-241-0/+4
| | | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
| * Fix parsing of NATURAL JOIN, CROSS JOIN and related joinsDeven Bansod2016-10-241-0/+2
| | | | | | | | | | | | | | | | Fix #93 Add tests to cover parsing of these joins Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* | Add tests for ALTER DATABASE and ALTER VIEWDeven Bansod2016-10-251-0/+2
|/ | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* Fix parsing of variables being assigned value of CASE expr within SELECT ↵Deven Bansod2016-10-141-0/+1
| | | | | | | | | | statements For example, $query = "SELECT 1+ 2 AS `c2`, sum(c2), sum(c3) AS `sum_c3`, 'Status'= CASE WHEN quantity > 0 THEN 'in stock' ELSE 'out of stock' END FROM test_table" Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* Fix parsing of ON UPDATE option in TIMESTAMP field with precisionDeven Bansod2016-10-101-0/+1
| | | | | | Fix #92 Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* Merge pull request #90 from devenbansod/subquery_in_fromMichal Čihař2016-10-031-0/+4
|\ | | | | Fix parsing of subquery in FROM clause
| * Fix parsing of subquery in FROM clauseDeven Bansod2016-09-271-0/+4
| | | | | | | | | | | | Fix #52 Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* | Merge pull request #87 from devenbansod/delete_statementMichal Čihař2016-10-031-0/+22
|\ \ | | | | | | Implement parsing and building for Delete Statement
| * | Fixed some errors and add new testsDeven Bansod2016-09-271-0/+13
| | | | | | | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
| * | Added test cases for parsing DELETE statementsDeven Bansod2016-09-241-0/+9
| | | | | | | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* | | Merge pull request #88 from devenbansod/fix_pma_12100Michal Čihař2016-10-031-0/+9
|\ \ \ | |_|/ |/| | Add parsing of CASE Expressions
| * | Add more testsDeven Bansod2016-09-261-0/+3
| | | | | | | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
| * | Fix some issue with error reports and added testcasesDeven Bansod2016-09-261-0/+6
| |/ | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* | Fix parsing of user@host without backquotesDeven Bansod2016-09-201-0/+2
|/ | | | | | | | | | Introduce an option to parse 'expr=' (like var, var=, expr) Fix tests Fix phpmyadmin/phpmyadmin#12298 Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* Test error handling in INSERT and REPLACE statementsMichal Čihař2016-09-132-0/+6
| | | | Signed-off-by: Michal Čihař <michal@cihar.com>
* Merge pull request #77 from devenbansod/fix_48Michal Čihař2016-09-131-0/+4
|\ | | | | Fix parsing of REPLACE INTO ... Statements
| * Add tests for build and errorDeven Bansod2016-09-131-0/+1
| | | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
| * Fix parsing of REPLACE INTO ... StatementsDeven Bansod2016-09-131-0/+3
| | | | | | | | | | | | | | | | Now supports all three variations with REPLACE INTO .. VALUES, REPLACE INTO .. SET, REPLACE INTO .. SELECT. Fix #48 Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* | Stop SelectStatement parsing and revert back in case of ON DUPLICATE KEYDeven Bansod2016-09-131-0/+1
|/ | | | | | | | Fix parsing of INSERT INTO ... SELECT .... ON DUPLICATE KEY Fix #78 Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* Add test for non-reserved keyword as column nameMichal Čihař2016-09-131-0/+1
| | | | | | Issue #59 Signed-off-by: Michal Čihař <michal@cihar.com>
* Merge remote-tracking branch 'origin/pull/70'Michal Čihař2016-09-131-0/+2
|\
| * Fix #59: Non-reserved keywords should be allowed as a field nameDeven Bansod2016-09-071-0/+2
| | | | | | | | | | | | | | | | | | While trying to parse a fieldname, disallow only if it is a reserved keywords. Reserved keywords are still allowed if backquotes are used. Added testcases to cover both with and w/o backquotes scenarios. Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* | Merge pull request #76 from devenbansod/fix_50Michal Čihař2016-09-131-0/+4
|\ \ | | | | | | Fix parsing of INSERT...SELECT and INSERT...SET syntax
| * | Fix parsing of INSERT...SELECT and INSERT...SET syntaxDeven Bansod2016-09-121-0/+4
| |/ | | | | | | | | | | | | | | | | | | Implement separate parse function for InsertStatement Fix #50 Fix #73 Fix phpmyadmin/phpmyadmin#11628 Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* | Merge pull request #75 from devenbansod/fix_51_74Michal Čihař2016-09-131-0/+30
|\ \ | | | | | | Add correct parsing of SET CHARACTER SET, CHARSET , NAMES statements
| * | Add testcases for SET CHARACTER SET, CHARSET, NAMES and errorsDeven Bansod2016-09-101-0/+30
| |/ | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* | Fix #55 : Add support for spatial datatypesDeven Bansod2016-09-081-0/+1
|/ | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* Merge pull request #68 from devenbansod/fix_49Michal Čihař2016-09-071-0/+2
|\ | | | | Fix #49: Add Support for 'CREATE TABLE `table_copy` LIKE `table`;'
| * Added test case for missing LIKE expr and building of queryDeven Bansod2016-09-071-0/+1
| | | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
| * Added a testcase for CREATE TABLE .. LIKE 'old_table'Deven Bansod2016-09-071-0/+1
| | | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* | Merge remote-tracking branch 'origin/pull/67'Michal Čihař2016-09-071-0/+1
|\ \
| * | Added a test for 'ALTER TABLE .. COMMENT abc'Deven Bansod2016-09-071-0/+1
| |/ | | | | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>
* | Add a new test case for statements with missing delimiterDeven Bansod2016-09-071-0/+1
|/ | | | Signed-off-by: Deven Bansod <devenbansod.bits@gmail.com>