瀏覽代碼

+ Fix a leak of connections

git-svn-id: trunk@3149 -
joost 19 年之前
父節點
當前提交
8b67fbcba4
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      fcl/db/sqldb/mysql/mysqlconn.inc

+ 5 - 1
fcl/db/sqldb/mysql/mysqlconn.inc

@@ -260,7 +260,11 @@ end;
 
 procedure TConnectionName.UnPrepareStatement(cursor: TSQLCursor);
 begin
-  // not necessary
+  With Cursor as TCursorName do
+    begin
+    mysql_close(FQMySQL);
+    FQMysql := nil;
+    end;
 end;
 
 procedure TConnectionName.FreeFldBuffers(cursor: TSQLCursor);