Q: DDL/DML & rollback

From: BO/EBC/KX/RGFC Roger Bjaerevall 08-682 4851 <ebcrbj_at_ebcw150.ericsson.se>
Date: Wed, 1 Jun 1994 07:02:39 GMT
Message-ID: <1994Jun1.070239.7014_at_ericsson.se>


Does Oracle implicitly commits if there are mixed DML and DDL statements in the current transaction?

Scenario:

---

ora_csr csr, anotherCsr;

open(&csr);
parse(&csr, "INSERT INTO a VALUES (:anInt, :aChar)");

do (5) {

   // Set anInt and aChar
   exec(&csr);

}

open(&anotherCsr);
parse(&anotherCsr, "CREATE TABLE b (key NUMBER, name VARCHAR2(20)); exec(&anotherCsr);

rollback();
---
 

Even if I end the Oracle stuff with a rollback() there will be 5 rows in the 'a' table. The 'b' table will exist as supposed (though DDL statements can't be rollback'ed).

+------------------------------------------------------------------+
+       _/_/_/    _/_/_/   _/_/_/_/  Roger Bjärevall               +
+      _/    _/  _/    _/       _/   BO/EBC/FL/RGFC                +
+     _/    _/  _/    _/       _/    Ericsson Business Networks AB +
+    _/_/_/_/  _/_/_/_/       _/     135 83 Tyresö                 +
+   _/  _/    _/    _/  _/   _/      +46 8 6824851                 +
+  _/    _/  _/    _/  _/   _/                                     +
+ _/     _/ _/_/_/      _/_/         email: ebcrbj_at_ebc.ericsson.se +
+------------------------------------------------------------------+
Received on Wed Jun 01 1994 - 09:02:39 CEST

Original text of this message