Subject Re: Modified code - multi connection Meta data update
Author kartinku
Within in one transaction when I create table (say T2) with FK
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.


S.Karthick


--- In firebird-support@yahoogroups.com, "Ivan Prenosil"
<Ivan.Prenosil@s...> wrote:
> The code that prevents creating FK when there are more
> active connections is not here by mistake. It prevents
> database corruption.
> With your change, existing connections will not be notified
> about creation of new constraint, thus they will be able
> to insert inconsistent data.
>
> Ivan
>
>
> ----- Original Message -----
> From: "karthick srini" <kartinku@y...>
> To: <firebird-support@yahoogroups.com>
> Sent: Friday, September 24, 2004 9:14 AM
> Subject: [firebird-support] Modified code - multi connection Meta
data update
>
>
> > Hi Members ,
> >
> > This is regarding "Create Table with foreign Key"
> > when there are more than one connection.
> > I have debugged firebird code and commented where
> > exclusive connection check is made. Then with
> > firebird I was able to create table with FK in
> > multiple connection. Herewith I have attached the
> > modified file. Find my changes with in the comment
> > "<multi connection meta data handling>".
> > In the file there is a firebird comment saying that
> > exclusive connection is got to create index properly.
> > Even when I commented the code getting exclusive
> > connection check , index gets created properly when I
> > work on multiple connection. Index get created even
> > for primarky key. But exclsive connection check is
> > made only for foreign key based index. So please do
> > let me know what is the significance in getting
> > exclusive connection for foreign key based index
> > alone.
> >
> > Thanks & regards,
> >
> > S.Karthick
> > Software Engineer
> >
> > Note: forwarded message attached.