Subject | Re: [firebird-support] DDL not "entirely" under transactional control? |
---|---|
Author | Kjell Rilbe |
Post date | 2006-05-22T07:24:59Z |
Helen Borrie wrote:
Maybe I've missed something, but the question I have not yet seen
answered is this:
Assume DDL is NOT autocommitted.
Step TX 1 TX 2
==== ================ ================
1 <start>
2 CREATE TABLE X
3 <start>
4 COMMIT
5 INSERT INTO X
6 SELECT * FROM X
<returns empty result set>
7 COMMIT
In step 6, I would expect TX 2 to return "table X doesn't exist",
because TX 2 started before the DDL part of TX 1 was committed.
Or is this dependent on the transaction isolation level of TX 2? If it's
"read committed", then it should happen as above. But if it's
"repeatable read" (?) I would expect TX 2 to act as if the DB hasn't
changed after step 3, no matter what other transactions choose to do,
DDL or DML. In that case, TX 2 shouldn't be able to see table X at all.
I would be interested to know if I've got this right or not.
Kjell
--
--------------------------------------
Kjell Rilbe
Adressmarknaden AM AB
E-post: kjell.rilbe@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64
> At 02:35 PM 21/05/2006, Dave Hughes wrote:[snip]
Maybe I've missed something, but the question I have not yet seen
answered is this:
Assume DDL is NOT autocommitted.
Step TX 1 TX 2
==== ================ ================
1 <start>
2 CREATE TABLE X
3 <start>
4 COMMIT
5 INSERT INTO X
6 SELECT * FROM X
<returns empty result set>
7 COMMIT
In step 6, I would expect TX 2 to return "table X doesn't exist",
because TX 2 started before the DDL part of TX 1 was committed.
Or is this dependent on the transaction isolation level of TX 2? If it's
"read committed", then it should happen as above. But if it's
"repeatable read" (?) I would expect TX 2 to act as if the DB hasn't
changed after step 3, no matter what other transactions choose to do,
DDL or DML. In that case, TX 2 shouldn't be able to see table X at all.
I would be interested to know if I've got this right or not.
Kjell
--
--------------------------------------
Kjell Rilbe
Adressmarknaden AM AB
E-post: kjell.rilbe@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64