diff options
author | Madhura Jayaratne <madhura.cj@gmail.com> | 2016-02-18 13:01:24 +1100 |
---|---|---|
committer | Madhura Jayaratne <madhura.cj@gmail.com> | 2016-02-18 13:05:56 +1100 |
commit | e20ce2e2a189a1f13e0ef82c962e189307042889 (patch) | |
tree | d2ebca671cfb91f3829c81d05267cfd016d15139 /src | |
parent | bccd705927af3919e0b724054b7ce3a379186946 (diff) | |
download | sql-parser-e20ce2e2a189a1f13e0ef82c962e189307042889.zip sql-parser-e20ce2e2a189a1f13e0ef82c962e189307042889.tar.gz sql-parser-e20ce2e2a189a1f13e0ef82c962e189307042889.tar.bz2 |
Fix https://github.com/phpmyadmin/phpmyadmin/issues/11977
Signed-off-by: Madhura Jayaratne <madhura.cj@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/Parser.php | 5 | ||||
-rw-r--r-- | src/Statements/DropStatement.php | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/Parser.php b/src/Parser.php index 2aca938..623cc40 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -185,6 +185,11 @@ class Parser 'class' => 'SqlParser\\Components\\JoinKeyword', 'field' => 'join', ), + 'ON' => array( + 'class' => 'SqlParser\\Components\\Expression', + 'field' => 'table', + 'options' => array('parseField' => 'table'), + ), 'RIGHT JOIN' => array( 'class' => 'SqlParser\\Components\\JoinKeyword', 'field' => 'join', diff --git a/src/Statements/DropStatement.php b/src/Statements/DropStatement.php index 70583ed..5110c9d 100644 --- a/src/Statements/DropStatement.php +++ b/src/Statements/DropStatement.php @@ -59,6 +59,7 @@ class DropStatement extends Statement '_OPTIONS' => array('_OPTIONS', 1), // Used for select expressions. 'DROP_' => array('DROP', 1), + 'ON' => array('ON', 3), ); /** @@ -67,4 +68,11 @@ class DropStatement extends Statement * @var Expression[] */ public $fields; + + /** + * Table of the dropped index. + * + * @var Expression + */ + public $table; } |