Skip to content

Commit

Permalink
Merge #345 - Fix #342 - Add support for altering user options
Browse files Browse the repository at this point in the history
Fixes: #342
Pull-request: #345

Signed-off-by: William Desportes <[email protected]>
  • Loading branch information
williamdes committed Aug 17, 2021
2 parents 60d2ce1 + 2eff24a commit a20e660
Show file tree
Hide file tree
Showing 13 changed files with 54 additions and 9 deletions.
40 changes: 40 additions & 0 deletions src/Components/AlterOperation.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,46 @@ class AlterOperation extends Component
'CHARACTER SET' => 3,
);

/**
* All user options.
*
* @var array
*/
public static $USER_OPTIONS = array(
'ATTRIBUTE' => array(
1,
'var'
),
'COMMENT' => array(
1,
'var'
),
'REQUIRE' => array(
1,
'var'
),
'BY' => array(
2,
'expr'
),
'PASSWORD' => array(
2,
'var'
),
'WITH' => array(
2,
'var'
),

'ACCOUNT' => 1,
'DEFAULT' => 1,

'LOCK' => 2,
'UNLOCK' => 2,

'IDENTIFIED' => 3,
);

/**
* All view options.
*
Expand Down
3 changes: 3 additions & 0 deletions src/Statements/AlterStatement.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ class AlterStatement extends Statement
'SERVER' => 3,
'TABLE' => 3,
'TABLESPACE' => 3,
'USER' => 3,
'VIEW' => 3
);

Expand Down Expand Up @@ -121,6 +122,8 @@ public function parse(Parser $parser, TokensList $list)
$options = AlterOperation::$TABLE_OPTIONS;
} elseif ($this->options->has('VIEW')) {
$options = AlterOperation::$VIEW_OPTIONS;
} elseif ($this->options->has('USER')) {
$options = AlterOperation::$USER_OPTIONS;
}

$this->altered[] = AlterOperation::parse($parser, $list, $options);
Expand Down
2 changes: 1 addition & 1 deletion tests/data/parser/parseAlter2.out
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
a:4:{s:5:"query";s:84:"ALTER /* */ TABLE /* */ table
CONVERT /* */ TO /* */ CHARACTER /* */ SET /* */ utf8;";s:5:"lexer";O:26:"PhpMyAdmin\SqlParser\Lexer":8:{s:3:"str";s:84:"ALTER /* */ TABLE /* */ table
CONVERT /* */ TO /* */ CHARACTER /* */ SET /* */ utf8;";s:3:"len";i:84;s:4:"last";i:84;s:4:"list";O:31:"PhpMyAdmin\SqlParser\TokensList":3:{s:6:"tokens";a:29:{i:0;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:5:"ALTER";s:5:"value";s:5:"ALTER";s:7:"keyword";s:5:"ALTER";s:4:"type";i:1;s:5:"flags";i:3;s:8:"position";i:0;}i:1;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:" ";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:5;}i:2;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:5:"/* */";s:5:"value";s:5:"/* */";s:7:"keyword";N;s:4:"type";i:4;s:5:"flags";i:2;s:8:"position";i:6;}i:3;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:" ";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:11;}i:4;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:5:"TABLE";s:5:"value";s:5:"TABLE";s:7:"keyword";s:5:"TABLE";s:4:"type";i:1;s:5:"flags";i:3;s:8:"position";i:12;}i:5;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:" ";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:17;}i:6;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:5:"/* */";s:5:"value";s:5:"/* */";s:7:"keyword";N;s:4:"type";i:4;s:5:"flags";i:2;s:8:"position";i:18;}i:7;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:" ";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:23;}i:8;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:5:"table";s:5:"value";s:5:"TABLE";s:7:"keyword";s:5:"TABLE";s:4:"type";i:1;s:5:"flags";i:3;s:8:"position";i:24;}i:9;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:"
";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:29;}i:10;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:7:"CONVERT";s:5:"value";s:7:"CONVERT";s:7:"keyword";s:7:"CONVERT";s:4:"type";i:1;s:5:"flags";i:35;s:8:"position";i:30;}i:11;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:" ";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:37;}i:12;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:5:"/* */";s:5:"value";s:5:"/* */";s:7:"keyword";N;s:4:"type";i:4;s:5:"flags";i:2;s:8:"position";i:38;}i:13;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:" ";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:43;}i:14;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:2:"TO";s:5:"value";s:2:"TO";s:7:"keyword";s:2:"TO";s:4:"type";i:1;s:5:"flags";i:3;s:8:"position";i:44;}i:15;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:" ";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:46;}i:16;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:5:"/* */";s:5:"value";s:5:"/* */";s:7:"keyword";N;s:4:"type";i:4;s:5:"flags";i:2;s:8:"position";i:47;}i:17;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:" ";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:52;}i:18;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:9:"CHARACTER";s:5:"value";s:9:"CHARACTER";s:7:"keyword";s:9:"CHARACTER";s:4:"type";i:1;s:5:"flags";i:11;s:8:"position";i:53;}i:19;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:" ";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:62;}i:20;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:5:"/* */";s:5:"value";s:5:"/* */";s:7:"keyword";N;s:4:"type";i:4;s:5:"flags";i:2;s:8:"position";i:63;}i:21;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:" ";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:68;}i:22;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:3:"SET";s:5:"value";s:3:"SET";s:7:"keyword";s:3:"SET";s:4:"type";i:1;s:5:"flags";i:11;s:8:"position";i:69;}i:23;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:" ";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:72;}i:24;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:5:"/* */";s:5:"value";s:5:"/* */";s:7:"keyword";N;s:4:"type";i:4;s:5:"flags";i:2;s:8:"position";i:73;}i:25;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:" ";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:78;}i:26;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:4:"utf8";s:5:"value";s:4:"utf8";s:7:"keyword";N;s:4:"type";i:0;s:5:"flags";i:0;s:8:"position";i:79;}i:27;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:";";s:5:"value";s:1:";";s:7:"keyword";N;s:4:"type";i:9;s:5:"flags";i:0;s:8:"position";i:83;}i:28;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";N;s:5:"value";N;s:7:"keyword";N;s:4:"type";i:9;s:5:"flags";i:0;s:8:"position";N;}}s:5:"count";i:29;s:3:"idx";i:29;}s:9:"delimiter";s:1:";";s:12:"delimiterLen";i:1;s:6:"strict";b:0;s:6:"errors";a:0:{}}s:6:"parser";O:27:"PhpMyAdmin\SqlParser\Parser":5:{s:4:"list";r:7;s:10:"statements";a:1:{i:0;O:46:"PhpMyAdmin\SqlParser\Statements\AlterStatement":5:{s:5:"table";N;s:7:"altered";a:1:{i:0;O:46:"PhpMyAdmin\SqlParser\Components\AlterOperation":3:{s:7:"options";O:44:"PhpMyAdmin\SqlParser\Components\OptionsArray":1:{s:7:"options";a:1:{i:2;s:2:"TO";}}s:5:"field";N;s:7:"unknown";a:3:{i:0;r:135;i:1;r:142;i:2;r:156;}}}s:7:"options";O:44:"PhpMyAdmin\SqlParser\Components\OptionsArray":1:{s:7:"options";a:2:{i:3;s:5:"TABLE";i:12;s:5:"TABLE";}}s:5:"first";i:0;s:4:"last";i:27;}}s:8:"brackets";i:0;s:6:"strict";b:0;s:6:"errors";a:0:{}}s:6:"errors";a:2:{s:5:"lexer";a:0:{}s:6:"parser";a:2:{i:0;a:3:{i:0;s:35:"This option conflicts with "TABLE".";i:1;r:65;i:2;i:0;}i:1;a:3:{i:0;s:76:"A new statement was found, but no delimiter between it and the previous one.";i:1;r:163;i:2;i:0;}}}}
";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:29;}i:10;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:7:"CONVERT";s:5:"value";s:7:"CONVERT";s:7:"keyword";s:7:"CONVERT";s:4:"type";i:1;s:5:"flags";i:35;s:8:"position";i:30;}i:11;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:" ";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:37;}i:12;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:5:"/* */";s:5:"value";s:5:"/* */";s:7:"keyword";N;s:4:"type";i:4;s:5:"flags";i:2;s:8:"position";i:38;}i:13;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:" ";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:43;}i:14;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:2:"TO";s:5:"value";s:2:"TO";s:7:"keyword";s:2:"TO";s:4:"type";i:1;s:5:"flags";i:3;s:8:"position";i:44;}i:15;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:" ";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:46;}i:16;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:5:"/* */";s:5:"value";s:5:"/* */";s:7:"keyword";N;s:4:"type";i:4;s:5:"flags";i:2;s:8:"position";i:47;}i:17;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:" ";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:52;}i:18;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:9:"CHARACTER";s:5:"value";s:9:"CHARACTER";s:7:"keyword";s:9:"CHARACTER";s:4:"type";i:1;s:5:"flags";i:11;s:8:"position";i:53;}i:19;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:" ";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:62;}i:20;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:5:"/* */";s:5:"value";s:5:"/* */";s:7:"keyword";N;s:4:"type";i:4;s:5:"flags";i:2;s:8:"position";i:63;}i:21;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:" ";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:68;}i:22;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:3:"SET";s:5:"value";s:3:"SET";s:7:"keyword";s:3:"SET";s:4:"type";i:1;s:5:"flags";i:11;s:8:"position";i:69;}i:23;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:" ";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:72;}i:24;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:5:"/* */";s:5:"value";s:5:"/* */";s:7:"keyword";N;s:4:"type";i:4;s:5:"flags";i:2;s:8:"position";i:73;}i:25;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:" ";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:78;}i:26;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:4:"utf8";s:5:"value";s:4:"utf8";s:7:"keyword";N;s:4:"type";i:0;s:5:"flags";i:0;s:8:"position";i:79;}i:27;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:";";s:5:"value";s:1:";";s:7:"keyword";N;s:4:"type";i:9;s:5:"flags";i:0;s:8:"position";i:83;}i:28;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";N;s:5:"value";N;s:7:"keyword";N;s:4:"type";i:9;s:5:"flags";i:0;s:8:"position";N;}}s:5:"count";i:29;s:3:"idx";i:29;}s:9:"delimiter";s:1:";";s:12:"delimiterLen";i:1;s:6:"strict";b:0;s:6:"errors";a:0:{}}s:6:"parser";O:27:"PhpMyAdmin\SqlParser\Parser":5:{s:4:"list";r:7;s:10:"statements";a:1:{i:0;O:46:"PhpMyAdmin\SqlParser\Statements\AlterStatement":5:{s:5:"table";N;s:7:"altered";a:1:{i:0;O:46:"PhpMyAdmin\SqlParser\Components\AlterOperation":3:{s:7:"options";O:44:"PhpMyAdmin\SqlParser\Components\OptionsArray":1:{s:7:"options";a:1:{i:2;s:2:"TO";}}s:5:"field";N;s:7:"unknown";a:3:{i:0;r:135;i:1;r:142;i:2;r:156;}}}s:7:"options";O:44:"PhpMyAdmin\SqlParser\Components\OptionsArray":1:{s:7:"options";a:2:{i:3;s:5:"TABLE";i:13;s:5:"TABLE";}}s:5:"first";i:0;s:4:"last";i:27;}}s:8:"brackets";i:0;s:6:"strict";b:0;s:6:"errors";a:0:{}}s:6:"errors";a:2:{s:5:"lexer";a:0:{}s:6:"parser";a:2:{i:0;a:3:{i:0;s:35:"This option conflicts with "TABLE".";i:1;r:65;i:2;i:0;}i:1;a:3:{i:0;s:76:"A new statement was found, but no delimiter between it and the previous one.";i:1;r:163;i:2;i:0;}}}}
2 changes: 1 addition & 1 deletion tests/data/parser/parseAlterUser.out
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
a:4:{s:5:"query";s:80:"ALTER USER 'jeffrey'@'localhost'
IDENTIFIED BY 'new_password' PASSWORD EXPIRE;";s:5:"lexer";O:26:"PhpMyAdmin\SqlParser\Lexer":8:{s:3:"str";s:80:"ALTER USER 'jeffrey'@'localhost'
IDENTIFIED BY 'new_password' PASSWORD EXPIRE;";s:3:"len";i:80;s:4:"last";i:80;s:4:"list";O:31:"PhpMyAdmin\SqlParser\TokensList":3:{s:6:"tokens";a:17:{i:0;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:5:"ALTER";s:5:"value";s:5:"ALTER";s:7:"keyword";s:5:"ALTER";s:4:"type";i:1;s:5:"flags";i:3;s:8:"position";i:0;}i:1;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:" ";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:5;}i:2;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:4:"USER";s:5:"value";s:4:"USER";s:7:"keyword";s:4:"USER";s:4:"type";i:1;s:5:"flags";i:33;s:8:"position";i:6;}i:3;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:" ";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:10;}i:4;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:21:"'jeffrey'@'localhost'";s:5:"value";s:17:"jeffrey@localhost";s:7:"keyword";N;s:4:"type";i:8;s:5:"flags";i:4;s:8:"position";i:11;}i:5;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:3:"
";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:32;}i:6;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:10:"IDENTIFIED";s:5:"value";s:10:"IDENTIFIED";s:7:"keyword";s:10:"IDENTIFIED";s:4:"type";i:1;s:5:"flags";i:1;s:8:"position";i:35;}i:7;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:" ";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:45;}i:8;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:2:"BY";s:5:"value";s:2:"BY";s:7:"keyword";s:2:"BY";s:4:"type";i:1;s:5:"flags";i:3;s:8:"position";i:46;}i:9;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:" ";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:48;}i:10;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:14:"'new_password'";s:5:"value";s:12:"new_password";s:7:"keyword";N;s:4:"type";i:7;s:5:"flags";i:1;s:8:"position";i:49;}i:11;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:" ";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:63;}i:12;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:8:"PASSWORD";s:5:"value";s:8:"PASSWORD";s:7:"keyword";s:8:"PASSWORD";s:4:"type";i:1;s:5:"flags";i:33;s:8:"position";i:64;}i:13;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:" ";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:72;}i:14;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:6:"EXPIRE";s:5:"value";s:6:"EXPIRE";s:7:"keyword";s:6:"EXPIRE";s:4:"type";i:1;s:5:"flags";i:1;s:8:"position";i:73;}i:15;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:";";s:5:"value";s:1:";";s:7:"keyword";N;s:4:"type";i:9;s:5:"flags";i:0;s:8:"position";i:79;}i:16;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";N;s:5:"value";N;s:7:"keyword";N;s:4:"type";i:9;s:5:"flags";i:0;s:8:"position";N;}}s:5:"count";i:17;s:3:"idx";i:17;}s:9:"delimiter";s:1:";";s:12:"delimiterLen";i:1;s:6:"strict";b:0;s:6:"errors";a:0:{}}s:6:"parser";O:27:"PhpMyAdmin\SqlParser\Parser":5:{s:4:"list";r:7;s:10:"statements";a:1:{i:0;O:46:"PhpMyAdmin\SqlParser\Statements\AlterStatement":5:{s:5:"table";O:42:"PhpMyAdmin\SqlParser\Components\Expression":7:{s:8:"database";N;s:5:"table";s:4:"USER";s:6:"column";N;s:4:"expr";s:4:"USER";s:5:"alias";N;s:8:"function";N;s:8:"subquery";N;}s:7:"altered";a:1:{i:0;O:46:"PhpMyAdmin\SqlParser\Components\AlterOperation":3:{s:7:"options";O:44:"PhpMyAdmin\SqlParser\Components\OptionsArray":1:{s:7:"options";a:0:{}}s:5:"field";O:42:"PhpMyAdmin\SqlParser\Components\Expression":7:{s:8:"database";N;s:5:"table";N;s:6:"column";s:17:"jeffrey@localhost";s:4:"expr";s:21:"'jeffrey'@'localhost'";s:5:"alias";N;s:8:"function";N;s:8:"subquery";N;}s:7:"unknown";a:2:{i:0;r:51;i:1;r:58;}}}s:7:"options";O:44:"PhpMyAdmin\SqlParser\Components\OptionsArray":1:{s:7:"options";a:0:{}}s:5:"first";i:0;s:4:"last";i:15;}}s:8:"brackets";i:0;s:6:"strict";b:0;s:6:"errors";a:0:{}}s:6:"errors";a:2:{s:5:"lexer";a:0:{}s:6:"parser";a:2:{i:0;a:3:{i:0;s:52:"Missing comma before start of a new alter operation.";i:1;r:65;i:2;i:0;}i:1;a:3:{i:0;s:29:"Unrecognized alter operation.";i:1;r:65;i:2;i:0;}}}}
";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:32;}i:6;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:10:"IDENTIFIED";s:5:"value";s:10:"IDENTIFIED";s:7:"keyword";s:10:"IDENTIFIED";s:4:"type";i:1;s:5:"flags";i:1;s:8:"position";i:35;}i:7;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:" ";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:45;}i:8;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:2:"BY";s:5:"value";s:2:"BY";s:7:"keyword";s:2:"BY";s:4:"type";i:1;s:5:"flags";i:3;s:8:"position";i:46;}i:9;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:" ";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:48;}i:10;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:14:"'new_password'";s:5:"value";s:12:"new_password";s:7:"keyword";N;s:4:"type";i:7;s:5:"flags";i:1;s:8:"position";i:49;}i:11;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:" ";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:63;}i:12;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:8:"PASSWORD";s:5:"value";s:8:"PASSWORD";s:7:"keyword";s:8:"PASSWORD";s:4:"type";i:1;s:5:"flags";i:33;s:8:"position";i:64;}i:13;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:" ";s:5:"value";s:1:" ";s:7:"keyword";N;s:4:"type";i:3;s:5:"flags";i:0;s:8:"position";i:72;}i:14;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:6:"EXPIRE";s:5:"value";s:6:"EXPIRE";s:7:"keyword";s:6:"EXPIRE";s:4:"type";i:1;s:5:"flags";i:1;s:8:"position";i:73;}i:15;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";s:1:";";s:5:"value";s:1:";";s:7:"keyword";N;s:4:"type";i:9;s:5:"flags";i:0;s:8:"position";i:79;}i:16;O:26:"PhpMyAdmin\SqlParser\Token":6:{s:5:"token";N;s:5:"value";N;s:7:"keyword";N;s:4:"type";i:9;s:5:"flags";i:0;s:8:"position";N;}}s:5:"count";i:17;s:3:"idx";i:17;}s:9:"delimiter";s:1:";";s:12:"delimiterLen";i:1;s:6:"strict";b:0;s:6:"errors";a:0:{}}s:6:"parser";O:27:"PhpMyAdmin\SqlParser\Parser":5:{s:4:"list";r:7;s:10:"statements";a:1:{i:0;O:46:"PhpMyAdmin\SqlParser\Statements\AlterStatement":5:{s:5:"table";O:42:"PhpMyAdmin\SqlParser\Components\Expression":7:{s:8:"database";N;s:5:"table";s:17:"jeffrey@localhost";s:6:"column";N;s:4:"expr";s:21:"'jeffrey'@'localhost'";s:5:"alias";N;s:8:"function";N;s:8:"subquery";N;}s:7:"altered";a:1:{i:0;O:46:"PhpMyAdmin\SqlParser\Components\AlterOperation":3:{s:7:"options";O:44:"PhpMyAdmin\SqlParser\Components\OptionsArray":1:{s:7:"options";a:2:{i:2;a:4:{s:4:"name";s:2:"BY";s:6:"equals";b:0;s:4:"expr";O:42:"PhpMyAdmin\SqlParser\Components\Expression":7:{s:8:"database";N;s:5:"table";N;s:6:"column";s:12:"new_password";s:4:"expr";s:22:"'new_password'PASSWORD";s:5:"alias";N;s:8:"function";N;s:8:"subquery";N;}s:5:"value";s:22:"'new_password'PASSWORD";}i:3;s:10:"IDENTIFIED";}}s:5:"field";O:42:"PhpMyAdmin\SqlParser\Components\Expression":7:{s:8:"database";N;s:5:"table";N;s:6:"column";s:6:"EXPIRE";s:4:"expr";s:6:"EXPIRE";s:5:"alias";N;s:8:"function";N;s:8:"subquery";N;}s:7:"unknown";a:0:{}}}s:7:"options";O:44:"PhpMyAdmin\SqlParser\Components\OptionsArray":1:{s:7:"options";a:1:{i:3;s:4:"USER";}}s:5:"first";i:0;s:4:"last";i:15;}}s:8:"brackets";i:0;s:6:"strict";b:0;s:6:"errors";a:0:{}}s:6:"errors";a:2:{s:5:"lexer";a:0:{}s:6:"parser";a:0:{}}}
Loading

0 comments on commit a20e660

Please sign in to comment.