瀏覽代碼

Fix compilation of dbconfig program

git-svn-id: trunk@39181 -
pierre 7 年之前
父節點
當前提交
be91b22d0f
共有 1 個文件被更改,包括 8 次插入4 次删除
  1. 8 4
      tests/utils/dbconfig.pp

+ 8 - 4
tests/utils/dbconfig.pp

@@ -539,8 +539,8 @@ end;
 Procedure InsertRunsIntoConfigAndHistory(var GlobalRes : TSQLQuery);
 
 var
-  i,fid, num_fields : Integer;
-  Row : PPchar;
+  i,fid,num_fields,row_count : Integer;
+  Row : Variant;
   s : string;
   runid,previd : Integer;
 begin
@@ -548,11 +548,14 @@ begin
     begin
       num_fields:=FieldCount;
       First;
+      Last; { be sure to read all }
+      row_count:=RecordCount;
       Writeln('Row count=',row_count);
+      First;
       for i:=0 to row_count-1 do
         begin
-          row:=mysql_fetch_row(GlobalRes);
-          runid:=StrToIntDef(strpas(Row[0]),-1);
+          row:=FieldValues['TR_ID'];
+          runid:=StrToIntDef(Row,-1);
           previd:=GetTestPreviousRunHistoryID(RunID);
           if previd>=0 then
             begin
@@ -568,6 +571,7 @@ begin
               else
                 UpdateTestConfigID(RunID);
             end;
+          Next;
         end;
     end;
 end;