mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-08 02:07:12 +01:00
* Patch from Ladislav Karrach to parse queries with the limit keyword, bug #15456
git-svn-id: trunk@15196 -
This commit is contained in:
parent
845125c2e7
commit
6ba6be6b2b
@ -1137,7 +1137,7 @@ begin
|
||||
end;
|
||||
end;
|
||||
ppFrom : begin
|
||||
if (s = 'WHERE') or (s = 'ORDER') or (s = 'GROUP') or (CurrentP^=#0) or (CurrentP^=';') then
|
||||
if (s = 'WHERE') or (s = 'ORDER') or (s = 'GROUP') or (s = 'LIMIT') or (CurrentP^=#0) or (CurrentP^=';') then
|
||||
begin
|
||||
if (s = 'WHERE') then
|
||||
begin
|
||||
@ -1154,6 +1154,11 @@ begin
|
||||
ParsePart := ppOrder;
|
||||
StrLength := PhraseP-PStatementPart
|
||||
end
|
||||
else if (s = 'LIMIT') then
|
||||
begin
|
||||
ParsePart := ppBogus;
|
||||
StrLength := PhraseP-PStatementPart
|
||||
end
|
||||
else
|
||||
begin
|
||||
ParsePart := ppBogus;
|
||||
@ -1180,11 +1185,11 @@ begin
|
||||
end;
|
||||
end;
|
||||
ppWhere : begin
|
||||
if (s = 'ORDER') or (s = 'GROUP') or (CurrentP^=#0) or (CurrentP^=';') then
|
||||
if (s = 'ORDER') or (s = 'GROUP') or (s = 'LIMIT') or (CurrentP^=#0) or (CurrentP^=';') then
|
||||
begin
|
||||
ParsePart := ppBogus;
|
||||
FWhereStartPos := PStatementPart-PSQL;
|
||||
if (s = 'ORDER') or (s = 'GROUP') then
|
||||
if (s = 'ORDER') or (s = 'GROUP') or (s = 'LIMIT') then
|
||||
FWhereStopPos := PhraseP-PSQL+1
|
||||
else
|
||||
FWhereStopPos := CurrentP-PSQL+1;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user