* Catch case where status>0 for mysql_next_result (bug ID 30551)

git-svn-id: trunk@37862 -
This commit is contained in:
michael 2017-12-29 13:11:08 +00:00
parent 97b3c0b00a
commit 7b46b3d35e

View File

@ -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;