-
-
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.
Merge pull request #581 from niconoe-/fix/580
- Loading branch information
Showing
9 changed files
with
688 additions
and
34 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
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
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 `transactions` RENAME KEY `fk_transactions_catalog_entries1_idx` TO `fk_transactions_catalog_entries2_idx` |
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,249 @@ | ||
{ | ||
"query": "ALTER TABLE `transactions` RENAME KEY `fk_transactions_catalog_entries1_idx` TO `fk_transactions_catalog_entries2_idx`\n", | ||
"lexer": { | ||
"@type": "PhpMyAdmin\\SqlParser\\Lexer", | ||
"str": "ALTER TABLE `transactions` RENAME KEY `fk_transactions_catalog_entries1_idx` TO `fk_transactions_catalog_entries2_idx`\n", | ||
"len": 119, | ||
"last": 119, | ||
"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": "`transactions`", | ||
"value": "transactions", | ||
"keyword": null, | ||
"type": 8, | ||
"flags": 2, | ||
"position": 12 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": " ", | ||
"value": " ", | ||
"keyword": null, | ||
"type": 3, | ||
"flags": 0, | ||
"position": 26 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": "RENAME", | ||
"value": "RENAME", | ||
"keyword": "RENAME", | ||
"type": 1, | ||
"flags": 3, | ||
"position": 27 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": " ", | ||
"value": " ", | ||
"keyword": null, | ||
"type": 3, | ||
"flags": 0, | ||
"position": 33 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": "KEY", | ||
"value": "KEY", | ||
"keyword": "KEY", | ||
"type": 1, | ||
"flags": 19, | ||
"position": 34 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": " ", | ||
"value": " ", | ||
"keyword": null, | ||
"type": 3, | ||
"flags": 0, | ||
"position": 37 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": "`fk_transactions_catalog_entries1_idx`", | ||
"value": "fk_transactions_catalog_entries1_idx", | ||
"keyword": null, | ||
"type": 8, | ||
"flags": 2, | ||
"position": 38 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": " ", | ||
"value": " ", | ||
"keyword": null, | ||
"type": 3, | ||
"flags": 0, | ||
"position": 76 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": "TO", | ||
"value": "TO", | ||
"keyword": "TO", | ||
"type": 1, | ||
"flags": 3, | ||
"position": 77 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": " ", | ||
"value": " ", | ||
"keyword": null, | ||
"type": 3, | ||
"flags": 0, | ||
"position": 79 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": "`fk_transactions_catalog_entries2_idx`", | ||
"value": "fk_transactions_catalog_entries2_idx", | ||
"keyword": null, | ||
"type": 8, | ||
"flags": 2, | ||
"position": 80 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": "\n", | ||
"value": " ", | ||
"keyword": null, | ||
"type": 3, | ||
"flags": 0, | ||
"position": 118 | ||
}, | ||
{ | ||
"@type": "PhpMyAdmin\\SqlParser\\Token", | ||
"token": null, | ||
"value": null, | ||
"keyword": null, | ||
"type": 9, | ||
"flags": 0, | ||
"position": null | ||
} | ||
], | ||
"count": 17, | ||
"idx": 17 | ||
}, | ||
"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": "transactions", | ||
"column": null, | ||
"expr": "`transactions`", | ||
"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": "RENAME", | ||
"2": { | ||
"name": "KEY", | ||
"equals": false, | ||
"expr": "`fk_transactions_catalog_entries1_idx`", | ||
"value": "fk_transactions_catalog_entries1_idx" | ||
}, | ||
"3": { | ||
"name": "TO", | ||
"equals": false, | ||
"expr": "`fk_transactions_catalog_entries2_idx`", | ||
"value": "fk_transactions_catalog_entries2_idx" | ||
} | ||
} | ||
}, | ||
"field": null, | ||
"partitions": null, | ||
"unknown": [] | ||
} | ||
], | ||
"options": { | ||
"@type": "PhpMyAdmin\\SqlParser\\Components\\OptionsArray", | ||
"options": { | ||
"3": "TABLE" | ||
} | ||
}, | ||
"first": 0, | ||
"last": 16 | ||
} | ||
], | ||
"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 RENAME KEY my_index TO my_index2, ALGORITHM=INPLACE, LOCK=NONE; |
Oops, something went wrong.