Expand file tree Collapse file tree 12 files changed +1876
-319
lines changed Original file line number Diff line number Diff line change 6
6
- Move ` Misc::getAliases() ` into ` SelectStatement::getAliases() ` (#454 )
7
7
- Drop ` USE_UTF_STRINGS ` constant (#471 )
8
8
9
+ ## [ 5.10.1] - 2024-11-10
10
+
11
+ ### Fixed
12
+
13
+ - Fix parsing of ALTER TABLE … RENAME KEY (#580 )
14
+ - Fix parsing table names that start with "e1" (#578 )
15
+ - Improve handling of negative and overflowed offsets on TokensList (#582 )
16
+ - Fix parsing of queries with 'AND' (#590 )
17
+ - Fix C style comments with two asterisks (#597 )
18
+ - Fix parsing of SRID in column definition (#595 )
19
+
9
20
## [ 5.10.0] - 2024-08-29
10
21
11
22
- Fix parsing of UPDATE ... SET (#577 )
@@ -586,6 +597,7 @@ __Breaking changes:__
586
597
587
598
* First release of this library.
588
599
600
+ [ 5.10.1 ] : https://github.com/phpmyadmin/sql-parser/compare/5.10.0...5.10.1
589
601
[ 5.10.0 ] : https://github.com/phpmyadmin/sql-parser/compare/5.9.1...5.10.0
590
602
[ 5.9.1 ] : https://github.com/phpmyadmin/sql-parser/compare/5.9.0...5.9.1
591
603
[ 5.9.0 ] : https://github.com/phpmyadmin/sql-parser/compare/5.8.2...5.9.0
Original file line number Diff line number Diff line change @@ -568,7 +568,7 @@ public function parseComment(): Token|null
568
568
// - "SELECT */* comment */ FROM ..."
569
569
// - "SELECT 2*/* comment */3 AS `six`;"
570
570
$ next = $ this ->last + 1 ;
571
- if (($ next < $ this ->len ) && $ this ->str [$ next ] === '* ' ) {
571
+ if (($ next < $ this ->len ) && $ this ->str [$ next ] === '* ' && $ token === ' */ ' ) {
572
572
// Conflict in "*/*": first "*" was not for ending a comment.
573
573
// Stop here and let other parsing method define the true behavior of that first star.
574
574
$ this ->last = $ iBak ;
Original file line number Diff line number Diff line change @@ -83,6 +83,7 @@ final class CreateDefinitions implements Parseable
83
83
'ENFORCED ' => 14 ,
84
84
'NOT ' => 15 ,
85
85
'COMPRESSED ' => 16 ,
86
+ 'SRID ' => [17 , 'var ' ],
86
87
// Common entries.
87
88
//
88
89
// NOTE: Some of the common options are not in the same order which
Original file line number Diff line number Diff line change @@ -75,6 +75,7 @@ public static function lexProvider(): array
75
75
['lexer/lexOperator ' ],
76
76
['lexer/lexOperatorStarIsArithmetic ' ],
77
77
['lexer/lexOperatorStarIsWildcard ' ],
78
+ ['lexer/lexEmptyCStyleComment ' ],
78
79
['lexer/lexString ' ],
79
80
['lexer/lexStringErr1 ' ],
80
81
['lexer/lexSymbol ' ],
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ public static function createProvider(): array
59
59
['parser/parseCreateTableAsSelect ' ],
60
60
['parser/parseCreateTableLike ' ],
61
61
['parser/parseCreateTableSpatial ' ],
62
+ ['parser/parseCreateTableSRID ' ],
62
63
['parser/parseCreateTableTimestampWithPrecision ' ],
63
64
['parser/parseCreateTableEnforcedCheck ' ],
64
65
['parser/parseCreateTableNotEnforcedCheck ' ],
Original file line number Diff line number Diff line change
1
+ SELECT /**/ 1
2
+ SELECT /*+*/ 1
3
+ SELECT /***/ 1
4
+ SELECT /** */ 1
5
+ SELECT /* **/ 1
0 commit comments