mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-27 04:31:54 +02:00
parent
141defd182
commit
af564e4da5
@ -296,7 +296,7 @@ begin
|
|||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
ParamNameStart:=p;
|
ParamNameStart:=p;
|
||||||
while not (p^ in (SQLDelimiterCharacters+[#0,'=','+','-','*','\','/','[',']'])) do
|
while not (p^ in (SQLDelimiterCharacters+[#0,'=','+','-','*','\','/','[',']','|'])) do
|
||||||
Inc(p);
|
Inc(p);
|
||||||
ParamName:=Copy(ParamNameStart,1,p-ParamNameStart);
|
ParamName:=Copy(ParamNameStart,1,p-ParamNameStart);
|
||||||
end;
|
end;
|
||||||
|
@ -74,6 +74,10 @@ begin
|
|||||||
AssertEquals( 'select * from table where id = ?',
|
AssertEquals( 'select * from table where id = ?',
|
||||||
params.ParseSQL('select * from table where id = :id',true,true,true,psInterbase));
|
params.ParseSQL('select * from table where id = :id',true,true,true,psInterbase));
|
||||||
|
|
||||||
|
// Test bug 10345
|
||||||
|
AssertEquals( 'select email from table where upper(email) like ''%''||?||''%''',
|
||||||
|
params.ParseSQL('select email from table where upper(email) like ''%''||:email||''%''',true,true,true,psInterbase));
|
||||||
|
|
||||||
// Test escape-sequences:
|
// Test escape-sequences:
|
||||||
AssertEquals( 'select * from table where ''id '''' = :id''',
|
AssertEquals( 'select * from table where ''id '''' = :id''',
|
||||||
params.ParseSQL('select * from table where ''id '''' = :id''',true,False,True,psPostgreSQL));
|
params.ParseSQL('select * from table where ''id '''' = :id''',true,False,True,psPostgreSQL));
|
||||||
|
Loading…
Reference in New Issue
Block a user