Skip to content

Commit a70dec0

Browse files
committed
Merge #391 - Fix #374 - Adding NOT to the select options
Pull-request: #391 Ref: #388 This fixes the first implementation Signed-off-by: William Desportes <williamdes@wdes.fr>
2 parents 448c92e + 392686d commit a70dec0

File tree

119 files changed

+1886
-1286
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+1886
-1286
lines changed

src/Components/ExpressionArray.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ public static function parse(Parser $parser, TokensList $list, array $options =
7474
&& ($token->value !== 'DUAL')
7575
&& ($token->value !== 'NULL')
7676
&& ($token->value !== 'CASE')
77+
&& ($token->value !== 'NOT')
7778
) {
7879
// No keyword is expected.
7980
break;

src/Statements/SelectStatement.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ class SelectStatement extends Statement
6969
'SQL_CACHE' => 8,
7070
'SQL_NO_CACHE' => 8,
7171
'SQL_CALC_FOUND_ROWS' => 9,
72-
'NOT' => 10,
7372
];
7473

7574
/**

tests/Parser/SelectStatementTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public function selectProvider(): array
4343
['parser/parseSelect11'],
4444
['parser/parseSelect12'],
4545
['parser/parseSelect13'],
46+
['parser/parseSelect14'],
4647
['parser/parseSelectErr1'],
4748
['parser/parseSelectErr2'],
4849
['parser/parseSelectNested'],

tests/data/bugs/gh9.out

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1025,8 +1025,7 @@
10251025
"SQL_BUFFER_RESULT": 7,
10261026
"SQL_CACHE": 8,
10271027
"SQL_NO_CACHE": 8,
1028-
"SQL_CALC_FOUND_ROWS": 9,
1029-
"NOT": 10
1028+
"SQL_CALC_FOUND_ROWS": 9
10301029
},
10311030
"END_OPTIONS": {
10321031
"FOR UPDATE": 1,
@@ -1246,8 +1245,7 @@
12461245
"SQL_BUFFER_RESULT": 7,
12471246
"SQL_CACHE": 8,
12481247
"SQL_NO_CACHE": 8,
1249-
"SQL_CALC_FOUND_ROWS": 9,
1250-
"NOT": 10
1248+
"SQL_CALC_FOUND_ROWS": 9
12511249
},
12521250
"END_OPTIONS": {
12531251
"FOR UPDATE": 1,

tests/data/bugs/pma11800.out

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,8 +431,7 @@
431431
"SQL_BUFFER_RESULT": 7,
432432
"SQL_CACHE": 8,
433433
"SQL_NO_CACHE": 8,
434-
"SQL_CALC_FOUND_ROWS": 9,
435-
"NOT": 10
434+
"SQL_CALC_FOUND_ROWS": 9
436435
},
437436
"END_OPTIONS": {
438437
"FOR UPDATE": 1,

tests/data/bugs/pma11836.out

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -755,8 +755,7 @@
755755
"SQL_BUFFER_RESULT": 7,
756756
"SQL_CACHE": 8,
757757
"SQL_NO_CACHE": 8,
758-
"SQL_CALC_FOUND_ROWS": 9,
759-
"NOT": 10
758+
"SQL_CALC_FOUND_ROWS": 9
760759
},
761760
"END_OPTIONS": {
762761
"FOR UPDATE": 1,

tests/data/parser/parse.out

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,8 +395,7 @@
395395
"SQL_BUFFER_RESULT": 7,
396396
"SQL_CACHE": 8,
397397
"SQL_NO_CACHE": 8,
398-
"SQL_CALC_FOUND_ROWS": 9,
399-
"NOT": 10
398+
"SQL_CALC_FOUND_ROWS": 9
400399
},
401400
"END_OPTIONS": {
402401
"FOR UPDATE": 1,

tests/data/parser/parse2.out

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,7 @@
485485
"SQL_BUFFER_RESULT": 7,
486486
"SQL_CACHE": 8,
487487
"SQL_NO_CACHE": 8,
488-
"SQL_CALC_FOUND_ROWS": 9,
489-
"NOT": 10
488+
"SQL_CALC_FOUND_ROWS": 9
490489
},
491490
"END_OPTIONS": {
492491
"FOR UPDATE": 1,
@@ -681,8 +680,7 @@
681680
"SQL_BUFFER_RESULT": 7,
682681
"SQL_CACHE": 8,
683682
"SQL_NO_CACHE": 8,
684-
"SQL_CALC_FOUND_ROWS": 9,
685-
"NOT": 10
683+
"SQL_CALC_FOUND_ROWS": 9
686684
},
687685
"END_OPTIONS": {
688686
"FOR UPDATE": 1,

tests/data/parser/parseArrayErr1.out

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,8 +503,7 @@
503503
"SQL_BUFFER_RESULT": 7,
504504
"SQL_CACHE": 8,
505505
"SQL_NO_CACHE": 8,
506-
"SQL_CALC_FOUND_ROWS": 9,
507-
"NOT": 10
506+
"SQL_CALC_FOUND_ROWS": 9
508507
},
509508
"END_OPTIONS": {
510509
"FOR UPDATE": 1,

tests/data/parser/parseArrayErr3.out

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,8 +503,7 @@
503503
"SQL_BUFFER_RESULT": 7,
504504
"SQL_CACHE": 8,
505505
"SQL_NO_CACHE": 8,
506-
"SQL_CALC_FOUND_ROWS": 9,
507-
"NOT": 10
506+
"SQL_CALC_FOUND_ROWS": 9
508507
},
509508
"END_OPTIONS": {
510509
"FOR UPDATE": 1,

0 commit comments

Comments
 (0)