mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 00:39:34 +02:00
* Catch case where status>0 for mysql_next_result (bug ID 30551)
git-svn-id: trunk@37862 -
This commit is contained in:
parent
97b3c0b00a
commit
7b46b3d35e
@ -621,6 +621,7 @@ Var
|
||||
i : integer;
|
||||
ParamNames,ParamValues : array of string;
|
||||
Res: PMYSQL_RES;
|
||||
Status : Integer;
|
||||
|
||||
begin
|
||||
C:=Cursor as TCursorName;
|
||||
@ -682,7 +683,20 @@ begin
|
||||
C.FRes:=Res;
|
||||
C.FSelectable:=True;
|
||||
end;
|
||||
until mysql_next_result(FMySQL)<>0;
|
||||
Status:=mysql_next_result(FMySQL);
|
||||
if (Status>0) then
|
||||
begin
|
||||
if not ForcedClose then
|
||||
MySQLError(FMySQL, SErrGettingResult, Self)
|
||||
else
|
||||
begin
|
||||
C.RowsAffected:=0;
|
||||
C.FSelectable:= False;
|
||||
C.FRes:=nil;
|
||||
break;
|
||||
end;
|
||||
end;
|
||||
until (Status<>0);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user