浏览代码

* Commit the DDL-transaction in the TestScript test. (interbase only)

git-svn-id: trunk@10839 -
joost 17 年之前
父节点
当前提交
08a7e289cf
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      packages/fcl-db/tests/testfieldtypes.pas

+ 5 - 0
packages/fcl-db/tests/testfieldtypes.pas

@@ -164,10 +164,15 @@ begin
       script.append('create table a (id int);');
       script.append('create table b (id int);');
       ExecuteScript;
+      // Firebird/Interbase need a commit after a DDL statement. Not necessary for the other connections
+      if SQLDbType=interbase then TSQLDBConnector(DBConnector).Transaction.CommitRetaining;
+
       end;
   finally
     TSQLDBConnector(DBConnector).Connection.ExecuteDirect('drop table a');
     TSQLDBConnector(DBConnector).Connection.ExecuteDirect('drop table b');
+    // Firebird/Interbase need a commit after a DDL statement. Not necessary for the other connections
+    if SQLDbType=interbase then TSQLDBConnector(DBConnector).Transaction.CommitRetaining;
   end;
 end;