-
-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Preparation of the fix of #610: adding test cases with wrong expectat…
…ions.
- Loading branch information
Showing
5 changed files
with
540 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE testtable ADD UNIQUE KEY name_of_the_unique_constraint (`UNIQUE_COLUMN`); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,268 @@ | ||
{ | ||
"query": "ALTER TABLE testtable ADD UNIQUE KEY name_of_the_unique_constraint (`UNIQUE_COLUMN`);\n", | ||
"lexer": { | ||
"@type": "PhpMyAdmin\\SqlParser\\Lexer", | ||
"str": "ALTER TABLE testtable ADD UNIQUE KEY name_of_the_unique_constraint (`UNIQUE_COLUMN`);\n", | ||
"len": 86, | ||
"last": 86, | ||
"list": { | ||
"@type": "PhpMyAdmin\\SqlParser\\TokensList", | ||
"tokens": [ | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": "ALTER", | ||
"value": "ALTER", | ||
"keyword": "ALTER", | ||
"type": 1, | ||
"flags": 3, | ||
"position": 0 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": " ", | ||
"value": " ", | ||
"keyword": null, | ||
"type": 3, | ||
"flags": 0, | ||
"position": 5 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": "TABLE", | ||
"value": "TABLE", | ||
"keyword": "TABLE", | ||
"type": 1, | ||
"flags": 3, | ||
"position": 6 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": " ", | ||
"value": " ", | ||
"keyword": null, | ||
"type": 3, | ||
"flags": 0, | ||
"position": 11 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": "testtable", | ||
"value": "testtable", | ||
"keyword": null, | ||
"type": 0, | ||
"flags": 0, | ||
"position": 12 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": " ", | ||
"value": " ", | ||
"keyword": null, | ||
"type": 3, | ||
"flags": 0, | ||
"position": 21 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": "ADD", | ||
"value": "ADD", | ||
"keyword": "ADD", | ||
"type": 1, | ||
"flags": 3, | ||
"position": 22 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": " ", | ||
"value": " ", | ||
"keyword": null, | ||
"type": 3, | ||
"flags": 0, | ||
"position": 25 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": "UNIQUE KEY", | ||
"value": "UNIQUE KEY", | ||
"keyword": "UNIQUE KEY", | ||
"type": 1, | ||
"flags": 23, | ||
"position": 26 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": " ", | ||
"value": " ", | ||
"keyword": null, | ||
"type": 3, | ||
"flags": 0, | ||
"position": 36 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": "name_of_the_unique_constraint", | ||
"value": "name_of_the_unique_constraint", | ||
"keyword": null, | ||
"type": 0, | ||
"flags": 0, | ||
"position": 37 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": " ", | ||
"value": " ", | ||
"keyword": null, | ||
"type": 3, | ||
"flags": 0, | ||
"position": 66 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": "(", | ||
"value": "(", | ||
"keyword": null, | ||
"type": 2, | ||
"flags": 16, | ||
"position": 67 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": "`UNIQUE_COLUMN`", | ||
"value": "UNIQUE_COLUMN", | ||
"keyword": null, | ||
"type": 8, | ||
"flags": 2, | ||
"position": 68 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": ")", | ||
"value": ")", | ||
"keyword": null, | ||
"type": 2, | ||
"flags": 16, | ||
"position": 83 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": ";", | ||
"value": ";", | ||
"keyword": null, | ||
"type": 9, | ||
"flags": 0, | ||
"position": 84 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": "\n", | ||
"value": " ", | ||
"keyword": null, | ||
"type": 3, | ||
"flags": 0, | ||
"position": 85 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": null, | ||
"value": null, | ||
"keyword": null, | ||
"type": 9, | ||
"flags": 0, | ||
"position": null | ||
} | ||
], | ||
"count": 18, | ||
"idx": 18 | ||
}, | ||
"delimiter": ";", | ||
"delimiterLen": 1, | ||
"strict": false, | ||
"errors": [] | ||
}, | ||
"parser": { | ||
"@type": "PhpMyAdmin\\SqlParser\\Parser", | ||
"list": { | ||
"@type": "@1" | ||
}, | ||
"statements": [ | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Statements\\AlterStatement", | ||
"table": { | ||
"@type": "PhpMyAdmin\\SqlParser\\Components\\Expression", | ||
"database": null, | ||
"table": "testtable", | ||
"column": null, | ||
"expr": "testtable", | ||
"alias": null, | ||
"function": null, | ||
"subquery": null | ||
}, | ||
"altered": [ | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Components\\AlterOperation", | ||
"ROUTINE_OPTIONS": { | ||
"COMMENT": [ | ||
1, | ||
"var" | ||
], | ||
"LANGUAGE SQL": 2, | ||
"CONTAINS SQL": 3, | ||
"NO SQL": 3, | ||
"READS SQL DATA": 3, | ||
"MODIFIES SQL DATA": 3, | ||
"SQL SECURITY": 4, | ||
"DEFINER": 5, | ||
"INVOKER": 5 | ||
}, | ||
"options": { | ||
"@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", | ||
"options": { | ||
"1": "ADD" | ||
} | ||
}, | ||
"field": null, | ||
"partitions": null, | ||
"unknown": [ | ||
{ | ||
"@type": "@10" | ||
}, | ||
{ | ||
"@type": "@11" | ||
}, | ||
{ | ||
"@type": "@12" | ||
}, | ||
{ | ||
"@type": "@13" | ||
}, | ||
{ | ||
"@type": "@14" | ||
}, | ||
{ | ||
"@type": "@15" | ||
}, | ||
{ | ||
"@type": "@16" | ||
} | ||
] | ||
} | ||
], | ||
"options": { | ||
"@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", | ||
"options": { | ||
"3": "TABLE" | ||
} | ||
}, | ||
"first": 0, | ||
"last": 15 | ||
} | ||
], | ||
"brackets": 0, | ||
"strict": false, | ||
"errors": [] | ||
}, | ||
"errors": { | ||
"lexer": [], | ||
"parser": [] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
ALTER TABLE testtable ADD UNIQUE name_of_the_unique_constraint (`UNIQUE_COLUMN`); |
Oops, something went wrong.