Subject | Re: [firebird-support] Re: Modified code - multi connection Meta data update |
---|---|
Author | Daniel Rail |
Post date | 2004-09-24T15:36:17Z |
Hi,
At September 24, 2004, 12:14, kartinku wrote:
created within the same transaction. But, what happens if they are not
created in the same transaction, and, to take it one step further, not
on the same day? This is what Ivan is referring to.
So the closest solution might be to check if the creation of the table
and the creation of the FK are both within the same transaction(and
probably with no COMMIT RETAINING), and then maybe your patch can be
used within that context only. But, the code changes will have to make
those additional checks(that both creating the table and FK are both
within the same transaction). If both are not done within the same
transaction, the current code has to be executed.
But, this brings up another dilemma. A user would be asking why
creating a table and an FK within the same transaction is allowed, but
not in separate transactions when multiple connections to the database
exists. And, most likely, someone will be reporting it as a bug,
because of this inconsistency.
I'm sure somebody from the development team will correct me if I'm
wrong.
--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)
At September 24, 2004, 12:14, kartinku wrote:
> Within in one transaction when I create table (say T2) with FKSure, there wouldn't be any problems when the table and the FK are
> other connection cannot insert records to the table (say T2) since it
> is not aware of T2. It can insert records only when connection one is
> commited. In that case there cannot be any data corruption. We checked
> the same with multi connection , table creation in one connection and
> data insertion in other.
> Like FK , PK also involves index creation why there is exclusive
> connection check only in FK.
created within the same transaction. But, what happens if they are not
created in the same transaction, and, to take it one step further, not
on the same day? This is what Ivan is referring to.
So the closest solution might be to check if the creation of the table
and the creation of the FK are both within the same transaction(and
probably with no COMMIT RETAINING), and then maybe your patch can be
used within that context only. But, the code changes will have to make
those additional checks(that both creating the table and FK are both
within the same transaction). If both are not done within the same
transaction, the current code has to be executed.
But, this brings up another dilemma. A user would be asking why
creating a table and an FK within the same transaction is allowed, but
not in separate transactions when multiple connections to the database
exists. And, most likely, someone will be reporting it as a bug,
because of this inconsistency.
I'm sure somebody from the development team will correct me if I'm
wrong.
--
Best regards,
Daniel Rail
Senior System Engineer
ACCRA Group Inc. (www.accra.ca)
ACCRA Med Software Inc. (www.filopto.com)