mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 12:46:11 +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;
|
i : integer;
|
||||||
ParamNames,ParamValues : array of string;
|
ParamNames,ParamValues : array of string;
|
||||||
Res: PMYSQL_RES;
|
Res: PMYSQL_RES;
|
||||||
|
Status : Integer;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
C:=Cursor as TCursorName;
|
C:=Cursor as TCursorName;
|
||||||
@ -682,7 +683,20 @@ begin
|
|||||||
C.FRes:=Res;
|
C.FRes:=Res;
|
||||||
C.FSelectable:=True;
|
C.FSelectable:=True;
|
||||||
end;
|
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;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user