Browse Source

* Fix bug ID #30391 (let ReleaseMySQL also return refcount)

git-svn-id: trunk@34510 -
michael 9 years ago
parent
commit
b08475b5ba
1 changed files with 4 additions and 3 deletions
  1. 4 3
      packages/mysql/src/mysql.inc

+ 4 - 3
packages/mysql/src/mysql.inc

@@ -1832,7 +1832,7 @@ uses
 Function InitialiseMysql(Const LibraryName : AnsiString) : Integer;
 Function InitialiseMysql(Const LibraryName : AnsiString; argc: cint; argv:PPchar = Nil; groups:PPchar = nil) : Integer;
 Function InitialiseMysql(argc:cint = -1; argv:PPchar = nil; groups:PPchar = nil) : Integer;
-Procedure ReleaseMysql;
+Function ReleaseMysql : Integer;
 
 var MysqlLibraryHandle : TLibHandle;
   MysqlLoadedLibrary : String;
@@ -2015,7 +2015,7 @@ begin
     end;
 end;
 
-Procedure ReleaseMysql;
+Function ReleaseMysql : Integer;
 
 begin
   if RefCount> 1 then
@@ -2029,7 +2029,8 @@ begin
       MysqlLibraryHandle := NilHandle;
       MysqlLoadedLibrary:='';
       end
-    end
+    end;
+  Result:=RefCount;
 end;
 
 {$ENDIF}